<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-&gt;ReadParse();<br><br>
$AGI-&gt;verbose(&quot;AGI Environment Dump:&quot;, 3);<br>my $micho = $input{9};<br>$AGI-&gt;verbose(&quot;my dialed no is :$micho&quot;);<br>foreach my $i (sort keys %input) {<br>        $AGI-&gt;verbose(&quot; -- $i = $input{$i}&quot;, 3);<br>
}<br><br><br>##################<br>#To get the asterisk dial no whihc is 112 in our case<br>my $no=$AGI-&gt;get_variable (&#39;extnum&#39;);<br><b style="color: rgb(255, 0, 0);">my $dest=$AGI-&gt;get_variable (&#39;extension&#39;);</b><br>
$AGI-&gt;verbose(&quot;my dialed no is :$no&quot;);<br><span style="color: rgb(255, 0, 0);">$AGI-&gt;verbose(&quot;my dialed no is :$dest&quot;);</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>