]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
auto-answer A leg when B leg is already answered in all conditions not just when...
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 2 Oct 2012 14:29:25 +0000 (09:29 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 2 Oct 2012 14:29:59 +0000 (09:29 -0500)
src/switch_ivr_bridge.c

index 590ebcea3436aa53ab4aedf999e886e506b88b4d..990b121f0070e85d9880b74cee6cedf2f546c48f 100644 (file)
@@ -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);