diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 7774042b45..6af32747f6 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -71,7 +71,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session, break; } - if (switch_channel_test_flag(channel, CF_SERVICE)) { + if (switch_channel_test_flag(channel, CF_SERVICE) || + (!switch_channel_test_flag(channel, CF_ANSWERED) && !switch_channel_test_flag(channel, CF_EARLY_MEDIA))) { switch_yield(1000); } else { status = switch_core_session_read_frame(session, &read_frame, left, 0);