From: Jeff Lenk Date: Wed, 22 Dec 2010 04:15:03 +0000 (-0600) Subject: FS-2789 fix secondary issue with min_digits = 0 and terminator key pressed to cancel X-Git-Tag: v1.2-rc1~223^2~8^2^2^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe005bddd7eaf6bb2f8e3569b5f7563265c00052;p=thirdparty%2Ffreeswitch.git FS-2789 fix secondary issue with min_digits = 0 and terminator key pressed to cancel --- 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)) {