diff --git a/src/switch_ivr.c b/src/switch_ivr.c index bc9f699f41..1f6b5695ea 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -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; }