From: Anthony Minessale Date: Mon, 20 May 2013 17:22:58 +0000 (-0500) Subject: FS-5360 X-Git-Tag: v1.2.13~360 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36116944a72bd3e0a3463877f94daa3326ae752c;p=thirdparty%2Ffreeswitch.git FS-5360 --- diff --git a/src/switch_ivr_menu.c b/src/switch_ivr_menu.c index 6d7798b188..a4c2bfa926 100644 --- a/src/switch_ivr_menu.c +++ b/src/switch_ivr_menu.c @@ -467,9 +467,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *s char digit_buffer[128] = ""; char *digits_regex = switch_core_session_sprintf(session, "^%s$", menu->pin); - switch_play_and_get_digits(session, strlen(menu->pin), strlen(menu->pin), 3, 3000, "#", - menu->prompt_pin_file, menu->bad_pin_file, NULL, digit_buffer, sizeof(digit_buffer), - digits_regex, 10000, NULL); + if (switch_play_and_get_digits(session, strlen(menu->pin), strlen(menu->pin), 3, 3000, "#", + menu->prompt_pin_file, menu->bad_pin_file, NULL, digit_buffer, sizeof(digit_buffer), + digits_regex, 10000, NULL) != SWITCH_STATUS_SUCCESS) { + switch_goto_status(SWITCH_STATUS_FALSE, end); + } } @@ -875,7 +877,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_ prompt_pin_file = "ivr/ivr-please_enter_pin_followed_by_pound.wav"; } if (zstr(bad_pin_file)) { - prompt_pin_file = "ivr/ivr-pin_or_extension_is-invalid.wav"; + bad_pin_file = "ivr/ivr-pin_or_extension_is-invalid.wav"; } menu->pin = switch_core_strdup(menu->pool, pin); menu->prompt_pin_file = switch_core_strdup(menu->pool, prompt_pin_file);