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

Lee Jenkins lee at datatrakpos.com
Mon Feb 26 21:43:18 MST 2007


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
-- 

Warm Regards,

Lee



More information about the asterisk-users mailing list