From 0468d160365226323a428d994ec0173998f3b668 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 9 Sep 2008 17:47:01 +0000 Subject: [PATCH] fix FSCORE-181 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9495 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_menu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/switch_ivr_menu.c b/src/switch_ivr_menu.c index 36bacdf6c8..eff415876d 100644 --- a/src/switch_ivr_menu.c +++ b/src/switch_ivr_menu.c @@ -494,12 +494,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s if (*menu->buf) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "IVR menu '%s' caught invalid input '%s'\n", menu->name, menu->buf); if (menu->invalid_sound) { - play_and_collect(session, menu, menu->invalid_sound, 0); + status = play_and_collect(session, menu, menu->invalid_sound, 0); } } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "IVR menu '%s' no input detected\n", menu->name); } errs++; + + if (status == SWITCH_STATUS_TIMEOUT) { + status = SWITCH_STATUS_SUCCESS; + } + if (status == SWITCH_STATUS_SUCCESS) { status = switch_ivr_sleep(session, 1000, NULL); } @@ -512,7 +517,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "exit-sound '%s'\n", menu->exit_sound); if (!switch_strlen_zero(menu->exit_sound)) { - play_and_collect(session, menu, menu->exit_sound, 0); + status = play_and_collect(session, menu, menu->exit_sound, 0); } switch_safe_free(menu->buf);