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 MACRO_EXTEN
, MACRO_CONTEXT
and MACRO_PRIORITY
respectively. Arguments become ARG1
, 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 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.
Syntax
Macro(name,arg1,[arg2[,...]])
Arguments
name
- The name of the macroargs
arg1
arg2
See Also
Import Version
This documentation was imported from Asterisk Version SVN-branch-1.8-r418641
1 Comment
Denis Pantsyrev
You can call macro from another macro, but when you do this, the args are not cleared and called macro sees the args passed to parent macro. See examples in this bug report
ASTERISK-1736
-
Macros do not clear argument variables when calling other macros
Closed