From 806983240acc744bf25d687bc34812ab8053ac8c Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 6 Apr 2009 17:39:07 +0000 Subject: [PATCH] add ESL::IVR::setVar from intralanman git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12917 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/esl/perl/ESL/IVR.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/libs/esl/perl/ESL/IVR.pm b/libs/esl/perl/ESL/IVR.pm index cbb37b7bb9..6ea8063cef 100644 --- a/libs/esl/perl/ESL/IVR.pm +++ b/libs/esl/perl/ESL/IVR.pm @@ -55,6 +55,24 @@ sub getVar($;) { } +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) = @_;