From d374fcaed60f1e9d05940b2eaf0306d432869780 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 22 Oct 2009 16:09:46 +0000 Subject: [PATCH] FSCORE-418 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15195 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_bridge.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index e7228f2c98..e885adc307 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -221,8 +221,12 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj) } if ((var = switch_channel_get_variable(chan_a, SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE)) && switch_true(var)) { + if (switch_stristr("loopback", switch_channel_get_name(chan_a)) || switch_stristr("loopback", switch_channel_get_name(chan_b))) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Cannot bypass media while bridged to a loopback address.\n"); + } else { + switch_channel_set_variable(chan_a, SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE, NULL); + } bypass_media_after_bridge = 1; - switch_channel_set_variable(chan_a, SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE, NULL); } if ((silence_var = switch_channel_get_variable(chan_a, "bridge_generate_comfort_noise"))) {