[Freeswitch-svn] [commit] r13279 - freeswitch/trunk/src
FreeSWITCH SVN
anthm at freeswitch.org
Mon May 11 13:20:11 PDT 2009
Author: anthm
Date: Mon May 11 15:20:11 2009
New Revision: 13279
Log:
use menu-timeout instead of menu-inter-digit-timeout when no digits have been entered
Modified:
freeswitch/trunk/src/switch_ivr_menu.c
Modified: freeswitch/trunk/src/switch_ivr_menu.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_menu.c (original)
+++ freeswitch/trunk/src/switch_ivr_menu.c Mon May 11 15:20:11 2009
@@ -292,6 +292,7 @@
switch_input_args_t args = { 0 };
switch_channel_t *channel;
char *sound_expanded = sound;
+ switch_size_t menu_buf_len = 0;
if (!session || !menu || switch_strlen_zero(sound)) {
return status;
@@ -324,12 +325,14 @@
return status;
}
- menu->ptr += strlen(menu->buf);
- if (strlen(menu->buf) < need) {
+ menu_buf_len = strlen(menu->buf);
+
+ menu->ptr += menu_buf_len;
+ if (menu_buf_len < need) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "waiting for %u/%u digits t/o %d\n",
(uint32_t)(menu->inlen - strlen(menu->buf)), (uint32_t)need, menu->inter_timeout);
status = switch_ivr_collect_digits_count(session, menu->ptr, menu->inlen - strlen(menu->buf),
- need, "#", &terminator, menu->inter_timeout, 0, 0);
+ need, "#", &terminator, menu_buf_len ? menu->inter_timeout : menu->timeout, 0, 0);
}
if (menu->confirm_macro && status == SWITCH_STATUS_SUCCESS && *menu->buf != '\0') {
More information about the Freeswitch-svn
mailing list