aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-09 00:45:37 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-09 00:45:37 +0000
commita2273cc0dd4e12da18eabdd5a4656ccc75a1ce40 (patch)
tree4d37a4e2ad8f39280031dffb0ac2fb55103d7cbd /apps/app_dial.c
parent78bc8a0e0a2d82d72f11dcd90ff8086d969b488a (diff)
Merged revisions 167935 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r167935 | twilson | 2009-01-08 18:13:12 -0600 (Thu, 08 Jan 2009) | 2 lines Set peer context and exten values so MACRO_EXTEN and MACRO_CONTEXT will be set ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@167972 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index ad73c1591..39c4bd1e2 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1783,6 +1783,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
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);