[asterisk-users] Extensions in a macro

Yuan LIU yliu11 at hotmail.com
Wed Jan 10 18:06:29 MST 2007


I have a question regarding how a macro interacts with the "main" call flow.

In my observation, if I Goto an extension (without explicitly referencing 
context) that exists within a marco, call flows to that extension.  But if I 
Goto an extension that does not, presumably invalid, instead of flowing to 
the "i" extension inside the macro, the call seems to flow back to 
${MACRO_CONTEXT}.  In this manner, a macro is not a container like a 
subroutine; but instead, it's like an "include" that simply extends 
available extensions, except that it has variable substitution.  However, 
it's not totally like an "include" because it can have extensions that the 
calling context already has (such as "s").

Can someone enlighten me?

Yuan Liu




More information about the asterisk-users mailing list