From fe005bddd7eaf6bb2f8e3569b5f7563265c00052 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Tue, 21 Dec 2010 22:15:03 -0600 Subject: [PATCH] FS-2789 fix secondary issue with min_digits = 0 and terminator key pressed to cancel --- src/switch_ivr_play_say.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index 710c0a738c..b983d5ed91 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -1874,6 +1874,11 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t status = SWITCH_STATUS_SUCCESS; } + if ((min_digits == 0) && (strlen(digit_buffer) == 0) && switch_channel_get_variable(channel, SWITCH_READ_TERMINATOR_USED_VARIABLE) != 0) + { + return SWITCH_STATUS_SUCCESS; + } + if (!(status == SWITCH_STATUS_TOO_SMALL && strlen(digit_buffer) == 0)) { if (status == SWITCH_STATUS_SUCCESS) { if (!zstr(digit_buffer)) {