]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix FSCORE-181
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 9 Sep 2008 17:47:01 +0000 (17:47 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 9 Sep 2008 17:47:01 +0000 (17:47 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9495 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_menu.c

index 36bacdf6c8bfd389faa1846a34bb32cf9e692a6a..eff415876de9ea6bb0f6b0a93f869c5f7ee9fde0 100644 (file)
@@ -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);