From: Anthony Minessale Date: Fri, 21 Nov 2008 19:52:18 +0000 (+0000) Subject: update X-Git-Tag: v1.0.2~430 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0180ec39f8b430c25796e8c972ec109658457705;p=thirdparty%2Ffreeswitch.git update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10504 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index 696cd1557e..c398e34d46 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -464,11 +464,11 @@ static switch_status_t audio_bridge_on_exchange_media(switch_core_session_t *ses if (state < CS_HANGUP && switch_true(switch_channel_get_variable(channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE))) { switch_ivr_park_session(session); - } - - if (!switch_channel_test_flag(channel, CF_TRANSFER) && !switch_channel_test_flag(channel, CF_REDIRECT) && bd && !bd->clean_exit && state != CS_PARK && - state != CS_ROUTING && !switch_channel_test_flag(channel, CF_INNER_BRIDGE)) { - switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); + } else { + if (!switch_channel_test_flag(channel, CF_TRANSFER) && !switch_channel_test_flag(channel, CF_REDIRECT) && bd && !bd->clean_exit && state != CS_PARK && + state != CS_ROUTING && !switch_channel_test_flag(channel, CF_INNER_BRIDGE)) { + switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); + } } if (switch_true(switch_channel_get_variable(channel, SWITCH_COPY_XML_CDR_VARIABLE))) { @@ -947,10 +947,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses && !a_leg->clean_exit && !inner_bridge) { 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)) { - if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) { - switch_channel_hangup(caller_channel, switch_channel_get_cause(peer_channel)); - } else if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE))) { + if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE))) { switch_ivr_park_session(session); + } else if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) { + switch_channel_hangup(caller_channel, switch_channel_get_cause(peer_channel)); } } }