[asterisk-users] Perl AGI
Danny Nicholas
danny at debsinc.com
Wed Apr 8 16:37:45 CDT 2009
This is at least correct on my setup
$dest = $input{dnid}
_____
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of michel freiha
Sent: Wednesday, April 08, 2009 4:28 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Perl AGI
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/20090408/a9064f08/attachment.htm
More information about the asterisk-users
mailing list