mod_rayo FS-6071 fix DTMF overflow and increase max DTMF matching from 64 to 256

This commit is contained in:
Chris Rienzo 2014-01-06 09:50:28 -05:00
parent 8db351858b
commit 8d30da28d7
1 changed files with 7 additions and 2 deletions

View File

@ -32,7 +32,7 @@
#include "srgs.h"
#include "nlsml.h"
#define MAX_DTMF 64
#define MAX_DTMF 256
#define INPUT_MATCH_TAG "match"
#define INPUT_MATCH INPUT_MATCH_TAG, RAYO_INPUT_COMPLETE_NS
@ -183,13 +183,18 @@ static switch_status_t input_component_on_dtmf(switch_core_session_t *session, c
match = srgs_grammar_match(component->grammar, component->digits, &interpretation);
/* adjust result if terminating digit was pressed */
if (is_term_digit) {
/* finalize result if terminating digit was pressed */
if (match == SMT_MATCH_PARTIAL) {
match = SMT_NO_MATCH;
} else if (match == SMT_MATCH) {
match = SMT_MATCH_END;
}
} else if (component->num_digits >= MAX_DTMF) {
/* maximum digits collected and still not a definitive match */
if (match != SMT_MATCH_END) {
match = SMT_NO_MATCH;
}
}
switch (match) {