]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
avoiding sillyness
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 13 Mar 2009 22:01:39 +0000 (22:01 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 13 Mar 2009 22:01:39 +0000 (22:01 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12595 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_bridge.c

index b3fdb197d32a0affc4ac187a5e719da6e8301d60..7631257c5787e0f449bedc0ad05473d7c0f13f76 100644 (file)
@@ -320,6 +320,19 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
                                continue;
                        }
                }
+
+               if (!ans_a && !ans_b) {
+                       switch_channel_t *un = ans_a ? chan_b : chan_a;
+                       
+                       if (switch_channel_answer(un) != SWITCH_STATUS_SUCCESS) {
+                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Media Establishment Failed.\n", switch_channel_get_name(un));
+                               goto end_of_bridge_loop;
+                       }
+                       
+                       if (ans_a) ans_b++; else ans_a++;
+               }
+               
+
 #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 */