summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-05-10 21:29:41 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-05-10 21:29:41 +0000
commit4ea636c7768bca2e2decb96f1b08bfdd9f32bca9 (patch)
tree3abc3aa14879d0e0f6d80218499a4f6b86f4d5ff /apps/app_dial.c
parentdd81b047dbf15a501b81354db505daf50703a1a0 (diff)
Run predial routine on local;2 channel where you would expect.
Before this patch, the predial routine executes on the ;1 channel of a local channel pair. Executing predial on the ;1 channel of a local channel pair is of limited utility. Any channel variables set by the predial routine executing on the ;1 channel will not be available when the local channel executes dialplan on the ;2 channel. * Create ast_pre_call() and an associated pre_call() technology callback to handle running the predial routine. If a channel technology does not provide the callback, the predial routine is simply run on the channel. Review: https://reviewboard.asterisk.org/r/1903/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 72a38ce9c..ceca20f12 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -2478,7 +2478,7 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
ast_autoservice_start(chan);
ast_replace_subargument_delimiter(opt_args[OPT_ARG_PREDIAL_CALLEE]);
AST_LIST_TRAVERSE(&out_chans, tmp, node) {
- ast_app_exec_sub(NULL, tmp->chan, opt_args[OPT_ARG_PREDIAL_CALLEE]);
+ ast_pre_call(tmp->chan, opt_args[OPT_ARG_PREDIAL_CALLEE]);
}
ast_autoservice_stop(chan);
}