fix sofia (part 1)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3856 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-12-28 01:08:06 +00:00
parent 9b3b7ce0ab
commit 905a48c85f
3 changed files with 119 additions and 54 deletions

View File

@@ -1939,6 +1939,8 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
switch_mutex_unlock(data->mutex);
}
}
switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
msg.from = __FILE__;
@@ -3304,19 +3306,18 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
switch_event_fire(&event);
}
if (switch_channel_get_state(caller_channel) != CS_EXECUTE && !switch_channel_test_flag(caller_channel, CF_TRANSFER)) {
switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_CLEARING);
}
if (switch_channel_test_flag(caller_channel, CF_TRANSFER) && !switch_channel_test_flag(peer_channel, CF_TRANSFER)) {
switch_channel_hangup(peer_channel, SWITCH_CAUSE_NORMAL_CLEARING);
}
if (!switch_channel_test_flag(caller_channel, CF_TRANSFER) && switch_channel_test_flag(peer_channel, CF_TRANSFER)) {
switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_CLEARING);
//switch_channel_hangup(peer_channel, SWITCH_CAUSE_NORMAL_CLEARING);
switch_yield(2000000);
}
this_audio_thread->objs[0] = NULL;
if (!switch_channel_test_flag(caller_channel, CF_TRANSFER) && switch_channel_test_flag(peer_channel, CF_TRANSFER)) {
//switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_CLEARING);
switch_yield(2000000);
}
this_audio_thread->objs[0] = NULL;
this_audio_thread->objs[1] = NULL;
this_audio_thread->objs[2] = NULL;
this_audio_thread->input_callback = NULL;