[Freeswitch-svn] [commit] r12761 - freeswitch/trunk/libs/esl/perl/ESL

FreeSWITCH SVN anthm at freeswitch.org
Tue Mar 24 11:06:25 PDT 2009


Author: anthm
Date: Tue Mar 24 13:06:25 2009
New Revision: 12761

Log:
update

Modified:
   freeswitch/trunk/libs/esl/perl/ESL/IVR.pm

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	Tue Mar 24 13:06:25 2009
@@ -58,6 +58,10 @@
 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 @@
   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 @@
   my $self = shift;
   my ($file) = @_;
 
+  if (!$self->{_esl}->connected()) {
+    return undef;
+  }
+
   $self->execute("playback", $file);
   return $self->getVar("playback_terminators_used");
   



More information about the Freeswitch-svn mailing list