[asterisk-users] Perl AGI
michel freiha
michofr at gmail.com
Wed Apr 8 16:27:44 CDT 2009
Hi all,
I have the below peace of my AGI script...the problem here is that I cannot
fetch the extension value to inside the script and assign it to another
variable...I highlighted it in red
#!/usr/bin/perl
#use DBD::mysql;
use DBI;
use DBD::mysql;
use Asterisk::AGI;
############################
#To read asterisk variable values.
$AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();
$AGI->verbose("AGI Environment Dump:", 3);
my $micho = $input{9};
$AGI->verbose("my dialed no is :$micho");
foreach my $i (sort keys %input) {
$AGI->verbose(" -- $i = $input{$i}", 3);
}
##################
#To get the asterisk dial no whihc is 112 in our case
my $no=$AGI->get_variable ('extnum');
*my $dest=$AGI->get_variable ('extension');*
$AGI->verbose("my dialed no is :$no");
$AGI->verbose("my dialed no is :$dest");
When the script run I got: dial.pl: my dialed no is :
Can you please help me to fix this issue?
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090409/bee811e5/attachment.htm
More information about the asterisk-users
mailing list