make the impossible possible
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8425 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f4e5aa395e
commit
43b4c0d0bd
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue