[Asterisk-Users] Setting variable for a context for all
extensions?
Mark Wormgoor
mark at wormgoor.com
Mon May 9 05:04:17 MST 2005
Hi,
The problem is, that once I use:
exten => _.,1,SetGlobalVar(RING=r2)
it will never get to the extension anymore. The following line is never
reached, because now all extensions need to be _.
[ext-local]
exten => 1,1,dial(Zap/1R{RING})
The only workaround I can find is to set the RING for every single
extension, which seems a bit ugly to me.
Kind regards,
Mark
Daniel Salama said:
> Not entirely sure, but, I wonder what would happen if you define RING
> in the [globals] section first, and the use SetVar or SetGlobalVar in
> the other contexts to override its value.
>
> - Daniel
>
> On May 8, 2005, at 2:48 AM, Mark Wormgoor wrote:
>
>> Hi,
>>
>> Is it possible to set a variable for a context for all extensions?
>> I haven't been able to find it. I want something like this in
>> extensions.conf:
>>
>> [from-iaxfwd]
>> exten => .,1,RING=r3
>> exten => 123456,1,Goto(from-pstn,s,1)
>>
>> [from-internal]
>> exten => .,1,RING=r2
>> include => ext-local
>>
>> [ext-local]
>> exten => 1,1,Dial(Zap/1,${LONGTIMEOUT})
>> exten => 2,1,Dial(SIP/2,${LONGTIMEOUT})
>>
>> But how do I do this? I want to change the ring depending on the
>> starting context. The above doesn't work.
>>
>> Kind regards,
>>
>> Mark
>> _______________________________________________
>> Asterisk-Users mailing list
>> Asterisk-Users at lists.digium.com
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>> To UNSUBSCRIBE or update options visit:
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
--
***************************************************************
* |\ /| | /| / Mark Wormgoor *
* | \ / | | / | / mailto:mark at wormgoor.com *
* | \/ |ark |/ |/ormgoor http://www.wormgoor.com/mark/ *
***************************************************************
More information about the asterisk-users
mailing list