[Asterisk-Users] Pass variable to context (NOT macro)

Eric "ManxPower" Wieling eric at fnords.org
Mon Oct 17 04:59:58 MST 2005


Bob Goddard wrote:
> On Monday 17 Oct 2005 04:11, Kevin P. Fleming wrote:
> 
>>Samy Antoun wrote:
>>
>>>[context1]
>>>exten => s,1,Answer
>>>exten => s,2,SetVar(MYVAR=1)
>>>exten => s,3,Goto(context2,s,1)
>>>[context2]
>>>exten => s,1,NoOp(${MYVAR})
>>>
>>>The NoOp in context2 will return 1?
>>
>>Variables are set on the channel itself, they aren't related to contexts
>>at all.
> 
> 
> There are 2 channels involved though, are there not,
> source and destination?
> 
> I'd like to see these variables set for the source channel,
> not the destination. To me, that seems more logical, especially
> when dialling multiple phones at once.

When dealing with channel variables, you can consider both legs of a 
call to be one "channel"



More information about the asterisk-users mailing list