From ea8ddfd4f20273b5e70b45230a21768ccff38a2c Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 6 Jan 2009 21:22:01 +0000 Subject: [PATCH] fix some media issues (shoud go into the 1.0 branch) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11080 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index f934ba1f6e..2fc9d1f713 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -54,8 +54,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_sleep(switch_core_session_t *session, int sval = 0; const char *var; - if (switch_channel_media_ready(channel) && (var = switch_channel_get_variable(channel, SWITCH_SEND_SILENCE_WHEN_IDLE_VARIABLE)) && (sval = atoi(var))) { - switch_channel_pre_answer(channel); + if (switch_channel_media_ready(channel) && + (var = switch_channel_get_variable(channel, SWITCH_SEND_SILENCE_WHEN_IDLE_VARIABLE)) && + (sval = atoi(var)) && sval >= 1000) { switch_core_session_get_read_impl(session, &imp); if (switch_core_codec_init(&codec,