From: Mike Murdock Date: Mon, 19 Feb 2007 16:57:14 +0000 (+0000) Subject: No entry at menu should not play the invalid prompt but still count as an invalid... X-Git-Tag: v1.0-beta1~1047 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e858fc38c7a100a634bfc9cb04dd6d4f6c92e0c;p=thirdparty%2Ffreeswitch.git No entry at menu should not play the invalid prompt but still count as an invalid entry and repeat the menu git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4325 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 3697189351..7d9d795406 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -4406,13 +4406,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s if (!match) { if (*menu->buf) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "IVR menu '%s' caught invalid input '%s'\n", menu->name, menu->buf); - } - else { + if (menu->invalid_sound) { + play_or_say(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); } - if (menu->invalid_sound) { - play_or_say(session, menu, menu->invalid_sound, 0); - } errs++; if (status == SWITCH_STATUS_SUCCESS) { status = switch_ivr_sleep(session, 1000);