bug in asterisk app_macro.c

Christian Töpp christian.toepp at lokale-internetwerbung.de
Thu Aug 11 06:28:41 UTC 2016


 The ael parser creates macros with extension '~s~'. If the macro is
called from the Dial application, asterisk searches for extension 's'
which is not existent.

The Bug is already submittet to the developers of asterisk but they may
fix it only for newer versions.

attached a patch for version 11.13.1~dfsg-2. would be great if you can
apply the patch in short time.

regards
-Chris
-------------- next part --------------
Description: fixes macro execution from dial command
 The ael parser creates macros with extension '~s~'. If the macro is called 
 from the Dial application, asterisk searches for extension 's' which is not existent.
 .
 asterisk (1:11.13.1~dfsg-2) testing-proposed-updates; urgency=high
 .
Author: Christian Toepp <toepp at lokale-internetwerbung.de>

--- asterisk-11.13.1~dfsg.orig/apps/app_macro.c
+++ asterisk-11.13.1~dfsg/apps/app_macro.c
@@ -303,12 +303,12 @@ static int _macro_exec(struct ast_channe
        }
 
        snprintf(fullmacro, sizeof(fullmacro), "macro-%s", macro);
-       if (!ast_exists_extension(chan, fullmacro, "s", 1,
+       if (!ast_exists_extension(chan, fullmacro, "~~s~~", 1,
                S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL))) {
                if (!ast_context_find(fullmacro)) 
                        ast_log(LOG_WARNING, "No such context '%s' for macro '%s'. Was called by %s@%s\n", fullmacro, macro, ast_channel_exten(chan), ast_channel_context(chan));
                else
-                       ast_log(LOG_WARNING, "Context '%s' for macro '%s' lacks 's' extension, priority 1\n", fullmacro, macro);
+                       ast_log(LOG_WARNING, "Context '%s' for macro '%s' lacks '~~s~~' extension, priority 1\n", fullmacro, macro);
                return 0;
        }
 


More information about the Pkg-voip-maintainers mailing list