aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2011-02-04 18:53:06 +0000
committerrmudgett <rmudgett@f38db490-d61c-443f-a65b-d21fe96a405b>2011-02-04 18:53:06 +0000
commitec0ed10089f098d48d9647181c334f2d10d6ec51 (patch)
treef414cadc92c974a56d6dfe630da8f9312fdec96b /apps
parentb734ea38b436b4ac7cbec55b2c17aeeb82454b45 (diff)
Don't send redirecting updates to the caller if the dialplan forked the call.
Each fork in the dial could be redirected and confuse the caller. For ISDN the DivLeg1 and DivLeg3 messages would get confused because ISDN redirects calls in sequence not in parallel. * Also fixed a formatting inconsistency in app_dial.c and make a warning message more useful about what frame type could not be written. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@306324 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c32
-rw-r--r--apps/app_queue.c2
2 files changed, 18 insertions, 16 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 581a88170..408a8739f 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1276,7 +1276,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
case AST_CONTROL_REDIRECTING:
if (ast_test_flag64(peerflags, OPT_IGNORE_CONNECTEDLINE)) {
ast_verb(3, "Redirecting update to %s prevented.\n", in->name);
- } else {
+ } else if (single) {
ast_verb(3, "%s redirecting info has changed, passing it to %s\n", c->name, in->name);
if (ast_channel_redirecting_macro(c, in, f, 1, 1)) {
ast_indicate_data(in, AST_CONTROL_REDIRECTING, f->data.ptr, f->datalen);
@@ -1321,20 +1321,22 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
}
} else if (single) {
switch (f->frametype) {
- case AST_FRAME_VOICE:
- case AST_FRAME_IMAGE:
- case AST_FRAME_TEXT:
- if (ast_write(in, f)) {
- ast_log(LOG_WARNING, "Unable to write frame\n");
- }
- break;
- case AST_FRAME_HTML:
- if (!ast_test_flag64(outgoing, DIAL_NOFORWARDHTML) && ast_channel_sendhtml(in, f->subclass.integer, f->data.ptr, f->datalen) == -1) {
- ast_log(LOG_WARNING, "Unable to send URL\n");
- }
- break;
- default:
- break;
+ case AST_FRAME_VOICE:
+ case AST_FRAME_IMAGE:
+ case AST_FRAME_TEXT:
+ if (ast_write(in, f)) {
+ ast_log(LOG_WARNING, "Unable to write frametype: %d\n",
+ f->frametype);
+ }
+ break;
+ case AST_FRAME_HTML:
+ if (!ast_test_flag64(outgoing, DIAL_NOFORWARDHTML)
+ && ast_channel_sendhtml(in, f->subclass.integer, f->data.ptr, f->datalen) == -1) {
+ ast_log(LOG_WARNING, "Unable to send URL\n");
+ }
+ break;
+ default:
+ break;
}
}
ast_frfree(f);
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 2c0833360..553d57aa7 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3754,7 +3754,7 @@ static struct callattempt *wait_for_answer(struct queue_ent *qe, struct callatte
case AST_CONTROL_REDIRECTING:
if (!update_connectedline) {
ast_verb(3, "Redirecting update to %s prevented\n", inchan_name);
- } else {
+ } else if (qe->parent->strategy != QUEUE_STRATEGY_RINGALL) {
ast_verb(3, "%s redirecting info has changed, passing it to %s\n", ochan_name, inchan_name);
if (ast_channel_redirecting_macro(o->chan, in, f, 1, 1)) {
ast_indicate_data(in, AST_CONTROL_REDIRECTING, f->data.ptr, f->datalen);