aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_macro.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-07 22:16:50 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-04-07 22:16:50 +0000
commitdfbead24ff85eb07a9da1789f2c4c2838eedb4c3 (patch)
tree07c672475fbd8dee046ed756c8aea0c4a6f50e73 /apps/app_macro.c
parentfe5bbddb30456e7d51dd9e144d38a7d4006d84e2 (diff)
Fix Macro documentation to match current (and intended) behavior.
(See -dev mailing list) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@186775 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_macro.c')
-rw-r--r--apps/app_macro.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/apps/app_macro.c b/apps/app_macro.c
index eac1cc157..af042913a 100644
--- a/apps/app_macro.c
+++ b/apps/app_macro.c
@@ -61,17 +61,23 @@ static char *descrip =
"will be returned at the location of the Goto.\n"
"If ${MACRO_OFFSET} is set at termination, Macro will attempt to continue\n"
"at priority MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.\n"
-"Extensions: While a macro is being executed, it becomes the current context.\n"
-" This means that if a hangup occurs, for instance, that the macro\n"
-" will be searched for an 'h' extension, NOT the context from which\n"
-" the macro was called. So, make sure to define all appropriate\n"
-" extensions in your macro! (you can use 'catch' in AEL) \n"
"WARNING: Because of the way Macro is implemented (it executes the priorities\n"
" contained within it via sub-engine), and a fixed per-thread\n"
" memory stack allowance, macros are limited to 7 levels\n"
" of nesting (macro calling macro calling macro, etc.); It\n"
-" may be possible that stack-intensive applications in deeply nested macros\n"
-" could cause asterisk to crash earlier than this limit.\n";
+" may be possible that stack-intensive applications in deeply nested\n"
+" macros could cause asterisk to crash earlier than this limit.\n"
+"NOTE: a bug existed in earlier versions of Asterisk that caused Macro not\n"
+"to reset its context and extension correctly upon exit. This meant that\n"
+"the 'h' extension within a Macro sometimes would execute, when the dialplan\n"
+"exited while that Macro was running. However, since this bug has been in\n"
+"Asterisk for so long, users started to depend upon this behavior. Therefore,\n"
+"when a channel hangs up when in the midst of executing a Macro, the macro\n"
+"context will first be checked for an 'h' extension, followed by the main\n"
+"context from which the Macro was originally called. This behavior in 1.4\n"
+"exists only for compatibility with earlier versions. You are strongly\n"
+"encouraged to make use of the 'h' extension only in the context from which\n"
+"Macro was originally called.\n";
static char *if_descrip =
" MacroIf(<expr>?macroname_a[|arg1][:macroname_b[|arg1]])\n"