From: Moises Silva Date: Mon, 20 Apr 2015 22:23:57 +0000 (-0400) Subject: Fix switch_ivr_parse_event() to not hangup a session when there is no media yet X-Git-Tag: v1.6.2~592^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4250c87a53310d934052ef2226b9a5983ff9e6f;p=thirdparty%2Ffreeswitch.git 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 --- 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;