From: Anthony Minessale Date: Thu, 15 May 2008 21:36:32 +0000 (+0000) Subject: make the impossible possible X-Git-Tag: v1.0-rc6~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43b4c0d0bdb2a658674ab49d706e4bb3cf80df58;p=thirdparty%2Ffreeswitch.git make the impossible possible git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8425 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_dptools/mod_dptools.c b/src/mod/applications/mod_dptools/mod_dptools.c index 22cfe1140a..b8e296d41c 100644 --- a/src/mod/applications/mod_dptools/mod_dptools.c +++ b/src/mod/applications/mod_dptools/mod_dptools.c @@ -1404,19 +1404,24 @@ SWITCH_STANDARD_APP(att_xfer_function) switch_channel_set_flag(channel, CF_INNER_BRIDGE); switch_ivr_multi_threaded_bridge(session, peer_session, xfer_on_dtmf, peer_session, NULL); - + + switch_channel_clear_flag(peer_channel, CF_INNER_BRIDGE); + switch_channel_clear_flag(channel, CF_INNER_BRIDGE); + if (bond) { switch_core_session_t *b_session; char buf[128] = ""; - if ((b_session = switch_core_session_locate(bond))) { + if (!switch_channel_ready(channel)) { + switch_ivr_uuid_bridge(switch_core_session_get_uuid(peer_session), bond); + } else if ((b_session = switch_core_session_locate(bond))) { switch_channel_t *b_channel = switch_core_session_get_channel(b_session); switch_snprintf(buf, sizeof(buf), "%s %s", switch_core_session_get_uuid(peer_session), switch_core_session_get_uuid(session)); switch_channel_set_variable(b_channel, "xfer_uuids", buf); switch_snprintf(buf, sizeof(buf), "%s %s", switch_core_session_get_uuid(peer_session), bond); switch_channel_set_variable(channel, "xfer_uuids", buf); - + switch_core_event_hook_add_state_change(session, hanguphook); switch_core_event_hook_add_state_change(b_session, hanguphook); diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index 1aecd37478..d57693c445 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -369,8 +369,8 @@ static switch_status_t audio_bridge_on_exchange_media(switch_core_session_t *ses switch_channel_clear_state_handler(channel, &audio_bridge_peer_state_handlers); state = switch_channel_get_state(channel); - - if (!switch_channel_test_flag(channel, CF_TRANSFER) && state != CS_PARK && state != CS_ROUTING) { + + if (!switch_channel_test_flag(channel, CF_TRANSFER) && state != CS_PARK && state != CS_ROUTING && !switch_channel_test_flag(channel, CF_INNER_BRIDGE)) { switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING); }