summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2009-01-09 00:13:12 +0000
committerTerry Wilson <twilson@digium.com>2009-01-09 00:13:12 +0000
commitc37aa68d77e2b22199f6da8d2cc6273e6c718087 (patch)
tree8945a8f0f0f21d877568f162ba673111e6e39055 /apps/app_dial.c
parent8c9b9519749c88df9318ee728a043c16f6660256 (diff)
Set peer context and exten values so MACRO_EXTEN and MACRO_CONTEXT will be set
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 f59aeb4ec..1da4c8b5f 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1991,6 +1991,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);