From: Anthony Minessale Date: Tue, 24 Mar 2009 18:06:25 +0000 (+0000) Subject: update X-Git-Tag: v1.0.4~1390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0a00c2f766be20f19f8ece85779e44cca2db3ca;p=thirdparty%2Ffreeswitch.git update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12761 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/libs/esl/perl/ESL/IVR.pm b/libs/esl/perl/ESL/IVR.pm index f2da4330bd..cbb37b7bb9 100644 --- a/libs/esl/perl/ESL/IVR.pm +++ b/libs/esl/perl/ESL/IVR.pm @@ -58,6 +58,10 @@ sub getVar($;) { sub playAndGetDigits($;) { my $self = shift; my ($min, $max, $tries, $to, $term, $file, $invalid_file, $var) = @_; + + if (!$self->{_esl}->connected()) { + return undef; + } $self->execute("play_and_get_digits", "$min $max $tries $to $term $file $invalid_file $var"); @@ -69,6 +73,10 @@ sub read($;) { my $self = shift; my ($min, $max, $file, $var, $to, $term) = @_; + if (!$self->{_esl}->connected()) { + return undef; + } + $self->execute("read", "$min $max $file $var $to $term"); return $self->getVar($var); @@ -79,6 +87,10 @@ sub playback($;) { my $self = shift; my ($file) = @_; + if (!$self->{_esl}->connected()) { + return undef; + } + $self->execute("playback", $file); return $self->getVar("playback_terminators_used");