<div dir="ltr">Dear All,<br><br>the script is running smoothly but it seems that it's not reading variables correctly fro asterisk as you can see below:<br><br> Executing [112@did:1] AGI("SIP/123456-b7e03650", "dial.agi|112") in new stack<br>
-- Launched AGI Script /var/lib/asterisk/agi-bin/dial.agi<br> -- dial.agi|112: AGI Environment Dump:<br> -- dial.agi|112: -- accountcode = 10<br> -- dial.agi|112: -- callerid = 123456<br> -- dial.agi|112: -- calleridname = AS1<br>
-- dial.agi|112: -- callingani2 = 0<br> -- dial.agi|112: -- callingpres = 0<br> -- dial.agi|112: -- callingtns = 0<br> -- dial.agi|112: -- callington = 0<br> -- dial.agi|112: -- channel = SIP/123456-b7e03650<br>
-- dial.agi|112: -- context = did<br> -- dial.agi|112: -- dnid = 112<br> -- dial.agi|112: -- enhanced = 0.0<br> -- dial.agi|112: -- extension = 112<br> -- dial.agi|112: -- language = en<br> -- dial.agi|112: -- priority = 1<br>
-- dial.agi|112: -- rdnis = unknown<br> -- dial.agi|112: -- request = dial.agi<br> -- dial.agi|112: -- type = SIP<br> -- dial.agi|112: -- uniqueid = ergatel.net-1235170972.16<br> dial.agi|112: my dialed no is :<br>
dial.agi|112: Query is:SELECT dst_nb FROM test where extension = ''<br><br>regards<br><br><div class="gmail_quote">On Sat, Feb 21, 2009 at 12:06 AM, michel freiha <span dir="ltr"><<a href="mailto:michofr@gmail.com">michofr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">Dear All,<br><br>i found the issue...it was just the #!/user/bin/perl instead of #!user/bin/perl<br>
<br>Thanks a lot for all help<br><br>Regards<div><div></div><div class="Wj3C7c"><br><div class="gmail_quote">On Fri, Feb 20, 2009 at 11:58 PM, michel freiha <span dir="ltr"><<a href="mailto:michofr@gmail.com" target="_blank">michofr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">Dear Kai,<br><br>If I change directory to /usr/bin and type the following command I got:<br>
<br>[root@switch1 bin]# ./perl /var/lib/asterisk/agi-bin/dial.pl<br><br>VERBOSE "AGI Environment Dump:" 3<br>
<br>GET VARIABLE extension<br><br>VERBOSE "my dialed no is :" <br><br>VERBOSE "Query is:SELECT dst_nb FROM test where extension = ''" <br><br>SET VARIABLE DestNo <br><br>Regards<div><div></div>
<div><br><br><div class="gmail_quote">
On Fri, Feb 20, 2009 at 11:44 PM, Tilghman Lesher <span dir="ltr"><<a href="mailto:tilghman@mail.jeffandtilghman.com" target="_blank">tilghman@mail.jeffandtilghman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Friday 20 February 2009 14:36:57 Danny Nicholas wrote:<br>
> You will need to download AGI from <a href="http://www.cpan.org" target="_blank">www.cpan.org</a> <<a href="http://www.cpan.org/" target="_blank">http://www.cpan.org/</a>> and<br>
<div>> install it. Here it is in simple steps<br>
><br>
><br>
><br>
> Cd /usr/src<br>
><br>
> Wget<br>
> <a href="http://search.cpan.org/CPAN/authors/id/J/JA/JAMESGOL/asterisk-perl-0.10.tar" target="_blank">http://search.cpan.org/CPAN/authors/id/J/JA/JAMESGOL/asterisk-perl-0.10.tar</a><br>
>. gz<br>
><br>
> Tar xvf asterisk-perl-0.10.tar.gz<br>
><br>
> Cd asterisk-perl-0.10<br>
><br>
> Make && make install<br>
<br>
</div>Even easier:<br>
<br>
perl -MCPAN -e'install Asterisk::AGI'<br>
<br>
--<br>
<font color="#888888">Tilghman<br>
</font><div><div></div><div><br>
_______________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>