Asterisk Project : Asterisk 10 Application_Macro This page last changed on Oct 14, 2011 by wikibot. # Macro() ### Synopsis Macro Implementation. ### Description Executes a macro using the context macro- name, 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 The calling extension, context, and priority are stored in `None` - `MACRO_EXTEN`, The calling extension, context, and priority are stored in `None` - `MACRO_CONTEXT` and The calling extension, context, and priority are stored in `None` - `MACRO_PRIORITY` respectively. Arguments become The calling extension, context, and priority are stored in `None` - `ARG1`, The calling extension, context, and priority are stored in `None` - `ARG2`, etc in the macro context. If you Goto out of the Macro context, the Macro will terminate and control will be returned at the location of the Goto. If If `None` - `MACRO_OFFSET` is set at termination, Macro will attempt to continue at priority MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise. Because of the way Macro is implemented (it executes the priorities contained within it via sub-engine), and a fixed per-thread memory stack allowance, macros are limited to 7 levels of nesting (macro calling macro calling macro, etc.); It may be possible that stack-intensive applications in deeply nested macros could cause asterisk to crash earlier than this limit. It is advised that if you need to deeply nest macro calls, that you use the Gosub application (now allows arguments like a Macro) with explict Return() calls instead. Use of the application `WaitExten` within a macro will not function as expected. Please use the `Read` application in order to read DTMF from a channel currently executing a macro. ### Syntax
    Macro(name[,arg1[,arg2[,...]]])
##### Arguments `name` - The name of the macro `args` `arg1` `arg2` ### See Also Asterisk 10 Application_MacroExit Asterisk 10 Application_Goto Asterisk 10 Application_Gosub ### Import Version This documentation was imported from Asterisk version SVN-branch-10-r340810.

Document generated by Confluence on Oct 14, 2011 13:24