<div dir="ltr">Hi all,<br><br>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<br><br>#!/usr/bin/perl<br>
#use DBD::mysql;<br>use DBI;<br>use DBD::mysql;<br>use Asterisk::AGI;<br><br>############################<br>#To read asterisk variable values.<br><br>$AGI = new Asterisk::AGI;<br>my %input = $AGI->ReadParse();<br><br>
$AGI->verbose("AGI Environment Dump:", 3);<br>my $micho = $input{9};<br>$AGI->verbose("my dialed no is :$micho");<br>foreach my $i (sort keys %input) {<br> $AGI->verbose(" -- $i = $input{$i}", 3);<br>
}<br><br><br>##################<br>#To get the asterisk dial no whihc is 112 in our case<br>my $no=$AGI->get_variable ('extnum');<br><b style="color: rgb(255, 0, 0);">my $dest=$AGI->get_variable ('extension');</b><br>
$AGI->verbose("my dialed no is :$no");<br><span style="color: rgb(255, 0, 0);">$AGI->verbose("my dialed no is :$dest");</span><br><br>When the script run I got: dial.pl: my dialed no is :<br><br>
Can you please help me to fix this issue?<br><br>Regards<br><br><br></div>