aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-14 17:54:11 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-14 17:54:11 +0000
commit50b7e1e02eb7f5817f290b0fbf0781d8d65ce522 (patch)
tree05274d790d3cf171242be0dcd9b9d0283c0b6619 /apps/app_dial.c
parent0bddb3b02abfc5df799e4f4525da583577387402 (diff)
Merged revisions 130792 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r130792 | mmichelson | 2008-07-14 12:50:21 -0500 (Mon, 14 Jul 2008) | 8 lines Add a check to the CAN_EARLY_BRIDGE macro in app_dial to be sure there are no audiohooks present on the channels involved. This fixed a one-way audio situation I had in my test setup. I couldn't find any open issues that suggested one-way audio with regards to mixmonitor (or other audiohook) usage, though. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@130794 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index fa56184c5..9b5fe44df 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -327,9 +327,10 @@ AST_APP_OPTIONS(dial_exec_options, BEGIN_OPTIONS
AST_APP_OPTION('X', OPT_CALLER_MIXMONITOR),
END_OPTIONS );
-#define CAN_EARLY_BRIDGE(flags) (!ast_test_flag64(flags, OPT_CALLEE_HANGUP | \
+#define CAN_EARLY_BRIDGE(flags,chan,peer) (!ast_test_flag64(flags, OPT_CALLEE_HANGUP | \
OPT_CALLER_HANGUP | OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER | \
- OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR | OPT_CALLEE_PARK | OPT_CALLER_PARK))
+ OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR | OPT_CALLEE_PARK | OPT_CALLER_PARK) && \
+ !chan->audiohooks && !peer->audiohooks)
/*
* The list of active channels
@@ -680,7 +681,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
DIAL_NOFORWARDHTML);
ast_string_field_set(c, dialcontext, "");
ast_copy_string(c->exten, "", sizeof(c->exten));
- if (CAN_EARLY_BRIDGE(peerflags))
+ if (CAN_EARLY_BRIDGE(peerflags, in, peer))
/* Setup early bridge if appropriate */
ast_channel_early_bridge(in, peer);
}
@@ -707,7 +708,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
case AST_CONTROL_RINGING:
ast_verb(3, "%s is ringing\n", c->name);
/* Setup early media if appropriate */
- if (single && CAN_EARLY_BRIDGE(peerflags))
+ if (single && CAN_EARLY_BRIDGE(peerflags, in, c))
ast_channel_early_bridge(in, c);
if (!(pa->sentringing) && !ast_test_flag64(outgoing, OPT_MUSICBACK)) {
ast_indicate(in, AST_CONTROL_RINGING);
@@ -717,7 +718,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
case AST_CONTROL_PROGRESS:
ast_verb(3, "%s is making progress passing it to %s\n", c->name, in->name);
/* Setup early media if appropriate */
- if (single && CAN_EARLY_BRIDGE(peerflags))
+ if (single && CAN_EARLY_BRIDGE(peerflags, in, c))
ast_channel_early_bridge(in, c);
if (!ast_test_flag64(outgoing, OPT_RINGBACK))
ast_indicate(in, AST_CONTROL_PROGRESS);
@@ -732,7 +733,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in,
break;
case AST_CONTROL_PROCEEDING:
ast_verb(3, "%s is proceeding passing it to %s\n", c->name, in->name);
- if (single && CAN_EARLY_BRIDGE(peerflags))
+ if (single && CAN_EARLY_BRIDGE(peerflags, in, c))
ast_channel_early_bridge(in, c);
if (!ast_test_flag64(outgoing, OPT_RINGBACK))
ast_indicate(in, AST_CONTROL_PROCEEDING);