[asterisk-commits] schmitds: trunk r291361 - /trunk/apps/app_macro.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 13 03:58:44 CDT 2010


Author: schmitds
Date: Wed Oct 13 03:58:41 2010
New Revision: 291361

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=291361
Log:
Report what extension called a failed macro

Add the extension and context of the calling channel to the log output if a macro could not be found.

(closes issue #18112)
Reported by: prado
Patches: 
	app_macro-info.diff uploaded by prado (license 510)
Tested by: schmidts


Modified:
    trunk/apps/app_macro.c

Modified: trunk/apps/app_macro.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_macro.c?view=diff&rev=291361&r1=291360&r2=291361
==============================================================================
--- trunk/apps/app_macro.c (original)
+++ trunk/apps/app_macro.c Wed Oct 13 03:58:41 2010
@@ -301,7 +301,7 @@
 	if (!ast_exists_extension(chan, fullmacro, "s", 1,
 		S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
 		if (!ast_context_find(fullmacro)) 
-			ast_log(LOG_WARNING, "No such context '%s' for macro '%s'\n", fullmacro, macro);
+			ast_log(LOG_WARNING, "No such context '%s' for macro '%s'. Was called by %s@%s\n", fullmacro, macro, chan->exten, chan->context);
 		else
 			ast_log(LOG_WARNING, "Context '%s' for macro '%s' lacks 's' extension, priority 1\n", fullmacro, macro);
 		return 0;




More information about the asterisk-commits mailing list