From: Anthony Minessale Date: Tue, 2 Oct 2012 14:29:25 +0000 (-0500) Subject: auto-answer A leg when B leg is already answered in all conditions not just when... X-Git-Tag: v1.3.0~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff3c0139fc9ab48b71b5a2723f6db06c0fd0f054;p=thirdparty%2Ffreeswitch.git auto-answer A leg when B leg is already answered in all conditions not just when A leg is both unanswered and has no media --- diff --git a/src/switch_ivr_bridge.c b/src/switch_ivr_bridge.c index 590ebcea34..990b121f00 100644 --- a/src/switch_ivr_bridge.c +++ b/src/switch_ivr_bridge.c @@ -1304,10 +1304,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses switch_core_session_rwunlock(peer_session); goto done; } + } - if (switch_channel_test_flag(peer_channel, CF_ANSWERED) && !switch_channel_test_flag(caller_channel, CF_ANSWERED)) { - switch_channel_answer(caller_channel); - } + if (switch_channel_test_flag(peer_channel, CF_ANSWERED) && !switch_channel_test_flag(caller_channel, CF_ANSWERED)) { + switch_channel_answer(caller_channel); } switch_channel_wait_for_flag(peer_channel, CF_BROADCAST, SWITCH_FALSE, 10000, caller_channel);