aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-14 17:50:21 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-07-14 17:50:21 +0000
commit22f6926dad617ea56407acf8b2e40510b2bf05ae (patch)
tree6d58ad6ccb12a7b835dd500882575bc28248026c /apps/app_dial.c
parent2a2254f5a29d43775e51dffd89bd30f6adb1e3b4 (diff)
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/branches/1.4@130792 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 e5891c4b8..fb46e5837 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -298,9 +298,10 @@ AST_APP_OPTIONS(dial_exec_options, {
AST_APP_OPTION('W', OPT_CALLER_MONITOR),
});
-#define CAN_EARLY_BRIDGE(flags) (!ast_test_flag(flags, OPT_CALLEE_HANGUP | \
+#define CAN_EARLY_BRIDGE(flags,chan,peer) (!ast_test_flag(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)
/* We define a custom "local user" structure because we
use it not only for keeping track of what is in use but
@@ -586,7 +587,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
ast_copy_string(c->dialcontext, "", sizeof(c->dialcontext));
ast_copy_string(c->exten, "", sizeof(c->exten));
/* Setup RTP early bridge if appropriate */
- if (CAN_EARLY_BRIDGE(peerflags))
+ if (CAN_EARLY_BRIDGE(peerflags, in, peer))
ast_rtp_early_bridge(in, peer);
}
/* If call has been answered, then the eventual hangup is likely to be normal hangup */
@@ -615,7 +616,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_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_rtp_early_bridge(in, c);
if (!(*sentringing) && !ast_test_flag(outgoing, OPT_MUSICBACK)) {
ast_indicate(in, AST_CONTROL_RINGING);
@@ -626,7 +627,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_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_rtp_early_bridge(in, c);
if (!ast_test_flag(outgoing, OPT_RINGBACK))
ast_indicate(in, AST_CONTROL_PROGRESS);
@@ -644,7 +645,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
case AST_CONTROL_PROCEEDING:
if (option_verbose > 2)
ast_verbose (VERBOSE_PREFIX_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_rtp_early_bridge(in, c);
if (!ast_test_flag(outgoing, OPT_RINGBACK))
ast_indicate(in, AST_CONTROL_PROCEEDING);