On Mon, Feb 26, 2007 at 08:06:40PM -0800, 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/[EMAIL PROTECTED],2", "Context macro-test") in 
> new stack
> 
> I want to get 1100006-2000 somehow.
> 
> Any suggestions would be appreciated.

>From the text of 'show application macro':

[Description]
  Macro(macroname|arg1|arg2...): Executes a macro using the context
'macro-<macroname>', jumping to the 's' extension of that context and
executing each step, then returning when the steps end. 
The calling extension, context, and priority are stored in ${MACRO_EXTEN}, 
${MACRO_CONTEXT} and ${MACRO_PRIORITY} respectively.  Arguments become
${ARG1}, ${ARG2}, etc in the macro context.

So use ${MACRO_CONTEXT} .

-- 
               Tzafrir Cohen       
icq#16849755                    jabber:[EMAIL PROTECTED]
+972-50-7952406           mailto:[EMAIL PROTECTED]       
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to