From b4250c87a53310d934052ef2226b9a5983ff9e6f Mon Sep 17 00:00:00 2001 From: Moises Silva Date: Mon, 20 Apr 2015 18:23:57 -0400 Subject: [PATCH] Fix switch_ivr_parse_event() to not hangup a session when there is no media yet If the lead-frames header is set but there is no media ready yet do not attempt to read media from the channel and continue with command execution FS-7455 #resolve --- src/switch_ivr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index ad9b6b1139..9fb9b354d8 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -521,7 +521,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se elp = 1; } - if (lead_frames) { + if (lead_frames && switch_channel_media_ready(channel)) { switch_frame_t *read_frame; int frame_count = atoi(lead_frames); int max_frames = frame_count * 2;