]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix some media issues (shoud go into the 1.0 branch)
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 6 Jan 2009 21:22:01 +0000 (21:22 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 6 Jan 2009 21:22:01 +0000 (21:22 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11080 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr.c

index f934ba1f6e28109cdc19932625bccf24b9d73de7..2fc9d1f71356861022d3b52a5e8a16402435df28 100644 (file)
@@ -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,