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

FreeSWITCH SVN mikej at freeswitch.org
Mon Apr 6 10:39:07 PDT 2009


Author: mikej
Date: Mon Apr  6 12:39:07 2009
New Revision: 12917

Log:
add ESL::IVR::setVar from intralanman

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	Mon Apr  6 12:39:07 2009
@@ -55,6 +55,24 @@
 
 }
 
+sub setVar($;) {
+  my $self = shift;
+  my ($var, $val) = @_;
+  my $e = $self->api("uuid_setvar", "$self->{_uuid} $var $val");
+  my $input;
+  if ($e) {
+    $input = $e->getBody() . "\n";
+    if ($input eq "_undef_") {
+      $input = undef;
+    }
+  }
+
+  chomp $input;
+
+  return $input;
+
+}
+
 sub playAndGetDigits($;) {
   my $self = shift;
   my ($min, $max, $tries, $to, $term, $file, $invalid_file, $var) = @_;



More information about the Freeswitch-svn mailing list