mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-17 16:54:13 +00:00
add args to sleep
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8930 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
d53d96fd73
commit
32bbdb74a8
18 files changed
+294
-16
No files matched your search
@@ -586,16 +586,6 @@ SWITCH_STANDARD_APP(sched_broadcast_function)
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_STANDARD_APP(sleep_function)
|
||||
{
|
||||
if (switch_strlen_zero(data)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No timeout specified.\n");
|
||||
} else {
|
||||
uint32_t ms = atoi(data);
|
||||
switch_ivr_sleep(session, ms);
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_STANDARD_APP(delay_function)
|
||||
{
|
||||
uint32_t len = 0;
|
||||
@@ -1323,6 +1313,26 @@ static switch_status_t on_dtmf(switch_core_session_t *session, void *input, swit
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_STANDARD_APP(sleep_function)
|
||||
{
|
||||
if (switch_strlen_zero(data)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No timeout specified.\n");
|
||||
} else {
|
||||
uint32_t ms = atoi(data);
|
||||
char buf[10];
|
||||
switch_input_args_t args = { 0 };
|
||||
|
||||
args.input_callback = on_dtmf;
|
||||
args.buf = buf;
|
||||
args.buflen = sizeof(buf);
|
||||
|
||||
switch_ivr_sleep(session, ms, &args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
SWITCH_STANDARD_APP(clear_speech_cache_function)
|
||||
{
|
||||
switch_ivr_clear_speech_cache(session);
|
||||
|
||||
@@ -855,7 +855,7 @@ SWITCH_STANDARD_APP(fifo_function)
|
||||
if (announce) {
|
||||
switch_ivr_play_file(session, NULL, announce, NULL);
|
||||
} else {
|
||||
switch_ivr_sleep(session, 500);
|
||||
switch_ivr_sleep(session, 500, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1314,7 +1314,7 @@ static void voicemail_check_main(switch_core_session_t *session, const char *pro
|
||||
status = switch_ivr_phrase_macro(session, VM_HELLO_MACRO, NULL, NULL, &args);
|
||||
|
||||
while (switch_channel_ready(channel)) {
|
||||
switch_ivr_sleep(session, 100);
|
||||
switch_ivr_sleep(session, 100, NULL);
|
||||
|
||||
switch (vm_check_state) {
|
||||
case VM_CHECK_START:
|
||||
|
||||
Reference in new issue
Block a user