]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Make sure we pass early media after the pre-answer (thanks Mike Murdock for the repor...
authorMichael Jerris <mike@jerris.com>
Mon, 8 Jan 2007 01:55:16 +0000 (01:55 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 8 Jan 2007 01:55:16 +0000 (01:55 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3928 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr.c

index bc9f699f41d05ac480b1f72212603deb634b7288..1f6b5695ea3a8404afe9d9f076fd3ef2262c6832 100644 (file)
@@ -1928,11 +1928,14 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
                                switch_channel_answer(chan_a);
                                ans_a++;
                        } else if (!pre_b && switch_channel_test_flag(chan_b, CF_EARLY_MEDIA)) {
-                               switch_channel_pre_answer(chan_a);
-                               pre_b++;
+                               if (switch_channel_pre_answer(chan_a) == SWITCH_STATUS_SUCCESS) {
+                                       pre_b++;
+                               }
+                       }
+                       if (!pre_b) {
+                               switch_yield(10000);
+                               continue;
                        }
-                       switch_yield(10000);
-                       continue;
                }