aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-05 22:35:52 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-05 22:35:52 +0000
commitb7c261be9bc040f538d01d67af955cb2defe7051 (patch)
tree12074b533bbb5a0416e732276f79dd8903bdf973 /apps/app_dial.c
parent069aa4bfceca910436e972ebb79e67a07a1b5d2e (diff)
The 'G' option for Dial() did not properly handle the case where only a label was
provided. This was due to the fact that the answering channel did not have an extension set, so ast_parseable_goto would fail. This fix eliminates the call to ast_parseable_goto on the answering channel since it is a wasteful call. The answering channel and the calling channel are both directed to the same extension and context, just different priorities, so we can just copy the values from the calling channel to the answering channel and increment the answering channel's priority. (closes issue #11382, reported by jon, patch by me with correction by jon) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@91273 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 4d1097e4a..cc9722e93 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1528,8 +1528,10 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if (chan && peer && ast_test_flag(&opts, OPT_GOTO) && !ast_strlen_zero(opt_args[OPT_ARG_GOTO])) {
replace_macro_delimiter(opt_args[OPT_ARG_GOTO]);
ast_parseable_goto(chan, opt_args[OPT_ARG_GOTO]);
- ast_parseable_goto(peer, opt_args[OPT_ARG_GOTO]);
- peer->priority++;
+ /* peer goes to the same context and extension as chan, so just copy info from chan*/
+ ast_copy_string(peer->context, chan->context, sizeof(peer->context));
+ ast_copy_string(peer->exten, chan->exten, sizeof(peer->exten));
+ peer->priority = chan->priority + 2;
ast_pbx_start(peer);
hanguptree(outgoing, NULL);
if (continue_exec)