From 8f9ddb5a8966602810a5a49aba70723f13b8393d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 5 Jan 2011 10:42:33 -0600 Subject: [PATCH] 42 --- src/mod/applications/mod_fifo/mod_fifo.c | 3 +++ src/switch_ivr_bridge.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/mod/applications/mod_fifo/mod_fifo.c b/src/mod/applications/mod_fifo/mod_fifo.c index 74af6f7cc9..570b2fd430 100644 --- a/src/mod/applications/mod_fifo/mod_fifo.c +++ b/src/mod/applications/mod_fifo/mod_fifo.c @@ -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) { diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index ee7c12703e..7448125788 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -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));