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

Eric "ManxPower" Wieling eric at fnords.org
Sat Oct 15 19:17:03 MST 2005


Samy Antoun wrote:
> Hi,
> 
> Is there anyway to pass a variable from one context to another (NOT
> macro and NOT global)

That is the default.  Once you set a variable it should exist for the 
life of the channel.  Now, if you are wanting to access that variable 
when one channel spawns another channel (like chan_local does), then 
prefix the name of the variable by _ or __ .  I'm sure it's documented 
somewhere, but I have no idea where.  The underscore and double 
underscore prefix feature is NOT available in 1.0.x, only in CVS-HEAD 
and 1.2 and later.  See the mailing list archives, it's been discussed 
before.



More information about the asterisk-users mailing list