Skip to content
Snippets Groups Projects
Commit c37aa68d authored by Terry Wilson's avatar Terry Wilson
Browse files

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
parent 8c9b9519
Branches
Tags
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment