[asterisk-commits] twilson: trunk r167935 - /trunk/apps/app_dial.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 8 18:13:12 CST 2009


Author: twilson
Date: Thu Jan  8 18:13:12 2009
New Revision: 167935

URL: http://svn.digium.com/view/asterisk?view=rev&rev=167935
Log:
Set peer context and exten values so MACRO_EXTEN and MACRO_CONTEXT will be set

Modified:
    trunk/apps/app_dial.c

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?view=diff&rev=167935&r1=167934&r2=167935
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Thu Jan  8 18:13:12 2009
@@ -1991,6 +1991,10 @@
 			theapp = pbx_findapp("Macro");
 
 			if (theapp && !res) { /* XXX why check res here ? */
+				/* Set peer->exten and peer->context so that MACRO_EXTEN and MACRO_CONTEXT get set */
+				ast_copy_string(peer->context, chan->context, sizeof(peer->context));
+				ast_copy_string(peer->exten, chan->exten, sizeof(peer->exten));
+
 				replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_MACRO]);
 				res = pbx_exec(peer, theapp, opt_args[OPT_ARG_CALLEE_MACRO]);
 				ast_debug(1, "Macro exited with status %d\n", res);




More information about the asterisk-commits mailing list