FSCORE-554
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16706 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
969688a0d3
commit
d4b1da5c67
|
@ -1732,21 +1732,18 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
|
|||
status = SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (status == SWITCH_STATUS_TOO_SMALL && strlen(digit_buffer) == 0) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (status == SWITCH_STATUS_SUCCESS) {
|
||||
if (!zstr(digit_buffer)) {
|
||||
if (zstr(digits_regex)) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Test Regex [%s][%s]\n", digit_buffer, digits_regex);
|
||||
if (switch_regex_match(digit_buffer, digits_regex) == SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
} else {
|
||||
switch_channel_set_variable(channel, var_name, NULL);
|
||||
if (!(status == SWITCH_STATUS_TOO_SMALL && strlen(digit_buffer) == 0)) {
|
||||
if (status == SWITCH_STATUS_SUCCESS) {
|
||||
if (!zstr(digit_buffer)) {
|
||||
if (zstr(digits_regex)) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Test Regex [%s][%s]\n", digit_buffer, digits_regex);
|
||||
if (switch_regex_match(digit_buffer, digits_regex) == SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
} else {
|
||||
switch_channel_set_variable(channel, var_name, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue