Author: rmudgett
Date: Thu Aug 15 17:10:20 2013
New Revision: 396814
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396814
Log:
Bridge: Don't suspend/unspend the channel for interception routines.
By their nature, the connected line and redirecting interception routines
are not supposed to affect the channel's media. Therefore, they should
not suspend and unsuspend the channel while running. The
suspend/unsuspend operations could be expensive depending upon the bridge
and channel technology involved.
Modified:
trunk/main/bridge_channel.c
Modified: trunk/main/bridge_channel.c
URL:
http://svnview.digium.com/svn/asterisk/trunk/main/bridge_channel.c?view=diff&rev=396814&r1=396813&r2=396814
==============================================================================
--- trunk/main/bridge_channel.c (original)
+++ trunk/main/bridge_channel.c Thu Aug 15 17:10:20 2013
@@ -1477,27 +1477,20 @@
struct ast_channel *chan;
struct ast_option_header *aoh;
int is_caller;
- int intercept_failed;
chan = bridge_channel->chan;
switch (fr->subclass.integer) {
case AST_CONTROL_REDIRECTING:
is_caller = !ast_test_flag(ast_channel_flags(chan),
AST_FLAG_OUTGOING);
- bridge_channel_suspend(bridge_channel);
- intercept_failed = ast_channel_redirecting_sub(NULL, chan, fr,
1)
- && ast_channel_redirecting_macro(NULL, chan, fr,
is_caller, 1);
- bridge_channel_unsuspend(bridge_channel);
- if (intercept_failed) {
+ if (ast_channel_redirecting_sub(NULL, chan, fr, 1) &&
+ ast_channel_redirecting_macro(NULL, chan, fr,
is_caller, 1)) {
ast_indicate_data(chan, fr->subclass.integer,
fr->data.ptr, fr->datalen);
}
break;
case AST_CONTROL_CONNECTED_LINE:
is_caller = !ast_test_flag(ast_channel_flags(chan),
AST_FLAG_OUTGOING);
- bridge_channel_suspend(bridge_channel);
- intercept_failed = ast_channel_connected_line_sub(NULL, chan,
fr, 1)
- && ast_channel_connected_line_macro(NULL, chan, fr,
is_caller, 1);
- bridge_channel_unsuspend(bridge_channel);
- if (intercept_failed) {
+ if (ast_channel_connected_line_sub(NULL, chan, fr, 1) &&
+ ast_channel_connected_line_macro(NULL, chan, fr,
is_caller, 1)) {
ast_indicate_data(chan, fr->subclass.integer,
fr->data.ptr, fr->datalen);
}
break;
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
svn-commits mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/svn-commits