[asterisk-users] How to get values of local channels context

Eric "ManxPower" Wieling eric at fnords.org
Tue Feb 27 06:39:20 MST 2007


Lee Jenkins wrote:
> kjcsb wrote:
>> The variable ${CONTEXT} stores the value of the current context. 
>> However if we are in a macro that will be the name of the macro. How 
>> do I access the name of the local channel's context.
>>  
>> For example:
>> [macro-test]
>> exten => s,n,NoOp(Context ${CONTEXT})
>>  
>> CLI shows:
>>     -- Executing NoOp("Local/2592 at 1100006-2000-e802,2 
>> <mailto:Local/2592 at 1100006-2000-e802,2>", "Context macro-test") in new 
>> stack
>>  
>> I want to get 1100006-2000 somehow.
>>
> 
> Hi,
> 
> Check out ${MACRO_CONTEXT}
> 
> http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+Macro

Check out /path/to/src/asterisk/doc/README.variables


More information about the asterisk-users mailing list