summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2011-04-11 23:20:39 +0000
committerRichard Mudgett <rmudgett@digium.com>2011-04-11 23:20:39 +0000
commit663ed7fd5c2b4144f357125d0d68d76ce04dab25 (patch)
tree55f2aa595e6a69717bb40d418d10d31ec44a9403 /apps
parent530afe7d97832a611b3a767cae2d17015465c3c7 (diff)
Merged revisions 313368-313369 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r313368 | rmudgett | 2011-04-11 18:03:02 -0500 (Mon, 11 Apr 2011) | 2 lines Backport a restructuring change from trunk to make the next change stand out. ........ r313369 | rmudgett | 2011-04-11 18:08:02 -0500 (Mon, 11 Apr 2011) | 13 lines Frames from the inbound channel should go to all outbound channels in app_dial.c. In app_dial.c:wait_for_answer() frames from the inbound channel should be sent to all outbound channels instead of only if there is just one outbound channel. Control frames like AST_CONTROL_CONNECTED_LINE need to be passed to all of the the outbound channels. This can happen if a blond transfer is done by a remote switch on the inbound channel. JIRA AST-443 JIRA SWP-2730 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@313383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 314b8e4e0..a66225ae1 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1418,12 +1418,17 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
}
}
- if (single) {
+ /* Send the frame from the in channel to all outgoing channels. */
+ for (o = outgoing; o; o = o->next) {
+ if (!o->chan || !ast_test_flag64(o, DIAL_STILLGOING)) {
+ /* This outgoing channel has died so don't send the frame to it. */
+ continue;
+ }
switch (f->frametype) {
case AST_FRAME_HTML:
/* Forward HTML stuff */
- if (!ast_test_flag64(outgoing, DIAL_NOFORWARDHTML)
- && ast_channel_sendhtml(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen) == -1) {
+ if (!ast_test_flag64(o, DIAL_NOFORWARDHTML)
+ && ast_channel_sendhtml(o->chan, f->subclass.integer, f->data.ptr, f->datalen) == -1) {
ast_log(LOG_WARNING, "Unable to send URL\n");
}
break;
@@ -1432,7 +1437,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
case AST_FRAME_TEXT:
case AST_FRAME_DTMF_BEGIN:
case AST_FRAME_DTMF_END:
- if (ast_write(outgoing->chan, f)) {
+ if (ast_write(o->chan, f)) {
ast_log(LOG_WARNING, "Unable to forward frametype: %d\n",
f->frametype);
}
@@ -1443,17 +1448,18 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
case AST_CONTROL_UNHOLD:
case AST_CONTROL_VIDUPDATE:
case AST_CONTROL_SRCUPDATE:
- ast_verb(3, "%s requested special control %d, passing it to %s\n", in->name, f->subclass.integer, outgoing->chan->name);
- ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
+ ast_verb(3, "%s requested special control %d, passing it to %s\n",
+ in->name, f->subclass.integer, o->chan->name);
+ ast_indicate_data(o->chan, f->subclass.integer, f->data.ptr, f->datalen);
break;
case AST_CONTROL_CONNECTED_LINE:
- if (ast_channel_connected_line_macro(in, outgoing->chan, f, 0, 1)) {
- ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
+ if (ast_channel_connected_line_macro(in, o->chan, f, 0, 1)) {
+ ast_indicate_data(o->chan, f->subclass.integer, f->data.ptr, f->datalen);
}
break;
case AST_CONTROL_REDIRECTING:
- if (ast_channel_redirecting_macro(in, outgoing->chan, f, 0, 1)) {
- ast_indicate_data(outgoing->chan, f->subclass.integer, f->data.ptr, f->datalen);
+ if (ast_channel_redirecting_macro(in, o->chan, f, 0, 1)) {
+ ast_indicate_data(o->chan, f->subclass.integer, f->data.ptr, f->datalen);
}
break;
default: