]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
sleep_eat_digits var (behaviour change please document)
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 2 Jul 2009 00:18:56 +0000 (00:18 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 2 Jul 2009 00:18:56 +0000 (00:18 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14102 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c

index c950bfe0d61b003fff6ce2140ddfde1529d8a35d..7e2309b515c39eb22da8470cf0ab40d4215d3910 100644 (file)
@@ -1415,11 +1415,12 @@ SWITCH_STANDARD_APP(sleep_function)
                char buf[10];
                switch_input_args_t args = { 0 };
 
-               args.input_callback = on_dtmf;
-               args.buf = buf;
-               args.buflen = sizeof(buf);
-               
-               switch_channel_set_variable(channel, SWITCH_PLAYBACK_TERMINATOR_USED, "" );
+               if (switch_true(switch_channel_get_variable(channel, "sleep_eat_digits"))) {
+                       args.input_callback = on_dtmf;
+                       args.buf = buf;
+                       args.buflen = sizeof(buf);
+                       switch_channel_set_variable(channel, SWITCH_PLAYBACK_TERMINATOR_USED, "" );
+               }
 
                switch_ivr_sleep(session, ms, SWITCH_TRUE, &args);
        }