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
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to