[commit] r12921 - in freeswitch/trunk: libs/esl/perl/ESL src
Author: mikej Date: Mon Apr 6 14:25:02 2009 New Revision: 12921 Log: fix play_and_get_digits to unset the var if the regex didn't match. and fix ESL/IVR to include the regex Modified: freeswitch/trunk/libs/esl/perl/ESL/IVR.pm freeswitch/trunk/src/switch_ivr_play_say.c Modified: freeswitch/trunk/libs/esl/perl/ESL/IVR.pm ============================================================================== --- freeswitch/trunk/libs/esl/perl/ESL/IVR.pm (original) +++ freeswitch/trunk/libs/esl/perl/ESL/IVR.pm Mon Apr 6 14:25:02 2009 @@ -75,13 +75,13 @@ sub playAndGetDigits($;) { my $self = shift; - my ($min, $max, $tries, $to, $term, $file, $invalid_file, $var) = @_; + my ($min, $max, $tries, $to, $term, $file, $invalid_file, $var, $regex) = @_; if (!$self->{_esl}->connected()) { return undef; } - $self->execute("play_and_get_digits", "$min $max $tries $to $term $file $invalid_file $var"); + $self->execute("play_and_get_digits", "$min $max $tries $to $term $file $invalid_file $var $regex"); return $self->getVar($var); Modified: freeswitch/trunk/src/switch_ivr_play_say.c ============================================================================== --- freeswitch/trunk/src/switch_ivr_play_say.c (original) +++ freeswitch/trunk/src/switch_ivr_play_say.c Mon Apr 6 14:25:02 2009 @@ -1561,6 +1561,8 @@ } if (switch_regex_match(digit_buffer, digits_regex) == SWITCH_STATUS_SUCCESS) { return SWITCH_STATUS_SUCCESS; + } else { + switch_channel_set_variable(channel, var_name, NULL); } } }
participants (1)
-
FreeSWITCH SVN