mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user