return channels to the execute state when hangup_after_bridge is false on a bridge started with the intercept app

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9288 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2008-08-13 21:46:06 +00:00
1 parent a3e6f8f68f
commit 10d681e90d
4 files changed
+63 -1

No files matched your search

+7 -1
View File
@@ -814,13 +814,19 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
state = switch_channel_get_state(caller_channel);
if (!switch_channel_test_flag(caller_channel, CF_TRANSFER) && !inner_bridge) {
if ((state != CS_EXECUTE && state != CS_PARK && state != CS_ROUTING) ||
if ((state != CS_EXECUTE && state != CS_SOFT_EXECUTE && state != CS_PARK && state != CS_ROUTING) ||
(switch_channel_test_flag(peer_channel, CF_ANSWERED) && state < CS_HANGUP &&
switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE)))) {
switch_channel_hangup(caller_channel, switch_channel_get_cause(peer_channel));
}
}
state = switch_channel_get_state(caller_channel);
if (state == CS_SOFT_EXECUTE || state == CS_PARK) {
switch_channel_set_state(caller_channel, CS_EXECUTE);
}
return status;
}