[asterisk-users] Passing a variable from one Asterisk box to
another
Richard Lyman
pchammer at dynx.net
Tue Feb 20 15:27:31 MST 2007
Richard Lyman wrote:
> Eric Bishop wrote:
>> Hi all,
>>
>> We currently have 2 Asterisk boxes and we pass calls to a fro. All works
>> great except we now need to pass variables between them.
>>
>> For example now on box 1 we have:
>>
>> exten => _23XX,1,SetVar(Foo=1234)
>> exten => _23XX,2,Dial(SIP/${EXTEN:0}@Box2)
>>
>> When the call dials into Box 2 the variable Foo does not get passed...
>>
>> Does anyone have any clever ideas?
> as noted in asterisk/docs/README.variables (iirc)
>
> you should see that variable inheritance can occur by prefacing the
> variable with '_' or '__'
>
> also, depending on the age of your asterisk you might want to start
> using 'Set' vice 'SetVar'
>
> also, having ${EXTEN:0} , the :0 doesn't do anything, so you should
> not use it and just have ${EXTEN}
>
> i hope this helps
>
>
sadly replying to my own post, but, i forgot to mention that
passing variables with IAX2 can be an issue sometimes when you use
user and peer (the user side can pass vars the peer side can not, or
doesn't accept them iirc)
this does not happen using friend, but that has its own issues... check
the wiki for more thoughts about this.
More information about the asterisk-users
mailing list