This commit is contained in:
Anthony Minessale 2011-01-05 10:42:33 -06:00
parent 3734f4cd44
commit 8f9ddb5a89
2 changed files with 8 additions and 0 deletions

View File

@ -978,6 +978,9 @@ static switch_status_t messagehook (switch_core_session_t *session, switch_core_
switch (msg->message_id) {
case SWITCH_MESSAGE_INDICATE_BRIDGE:
case SWITCH_MESSAGE_INDICATE_UNBRIDGE:
if (msg->numeric_arg == 42) {
goto end;
}
if ((caller_session = switch_core_session_locate(msg->string_arg))) {
caller_channel = switch_core_session_get_channel(caller_session);
if (msg->message_id == SWITCH_MESSAGE_INDICATE_BRIDGE) {

View File

@ -315,6 +315,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
if (read_frame_count > DEFAULT_LEAD_FRAMES && switch_channel_media_ack(chan_a) && switch_core_session_private_event_count(session_a)) {
switch_channel_set_flag(chan_b, CF_SUSPEND);
msg.numeric_arg = 42;
msg.string_arg = data->b_uuid;
msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
msg.from = __FILE__;
@ -1184,6 +1185,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
}
}
switch_channel_wait_for_flag(peer_channel, CF_BROADCAST, SWITCH_FALSE, 10000, caller_channel);
switch_ivr_parse_all_events(peer_session);
switch_ivr_parse_all_events(session);
msg.message_id = SWITCH_MESSAGE_INDICATE_BRIDGE;
msg.from = __FILE__;
msg.string_arg = switch_core_session_strdup(peer_session, switch_core_session_get_uuid(session));