From 4b73a5f1118d5004adcc30d5ab0d1384a597456c Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 13 Oct 2009 20:03:18 +0000 Subject: [PATCH] send update after both sides are answered git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15149 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_bridge.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index 21f2c6aeba..04f0af9eaf 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -161,7 +161,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj) const char *silence_var, *var; int silence_val = 0, bypass_media_after_bridge = 0; const char *bridge_answer_timeout = NULL; - int answer_timeout; + int answer_timeout, sent_update = -5; time_t answer_limit = 0; #ifdef SWITCH_VIDEO_IN_THREADS @@ -400,6 +400,13 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj) } + if (originator && sent_update < 0 && ans_a && ans_b) { + if (!++sent_update) { + switch_ivr_bridge_display(session_a, session_b); + sent_update = 1; + } + } + #ifndef SWITCH_VIDEO_IN_THREADS if (switch_channel_test_flag(chan_a, CF_VIDEO) && switch_channel_test_flag(chan_b, CF_VIDEO)) { /* read video from 1 channel and write it to the other */ @@ -888,8 +895,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses return switch_ivr_signal_bridge(session, peer_session); } - switch_ivr_bridge_display(session, peer_session); - switch_channel_set_flag(caller_channel, CF_BRIDGE_ORIGINATOR); b_leg->session = peer_session;