Dear All, the script is running smoothly but it seems that it's not reading variables correctly fro asterisk as you can see below:
Executing [...@did:1] AGI("SIP/123456-b7e03650", "dial.agi|112") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/dial.agi -- dial.agi|112: AGI Environment Dump: -- dial.agi|112: -- accountcode = 10 -- dial.agi|112: -- callerid = 123456 -- dial.agi|112: -- calleridname = AS1 -- dial.agi|112: -- callingani2 = 0 -- dial.agi|112: -- callingpres = 0 -- dial.agi|112: -- callingtns = 0 -- dial.agi|112: -- callington = 0 -- dial.agi|112: -- channel = SIP/123456-b7e03650 -- dial.agi|112: -- context = did -- dial.agi|112: -- dnid = 112 -- dial.agi|112: -- enhanced = 0.0 -- dial.agi|112: -- extension = 112 -- dial.agi|112: -- language = en -- dial.agi|112: -- priority = 1 -- dial.agi|112: -- rdnis = unknown -- dial.agi|112: -- request = dial.agi -- dial.agi|112: -- type = SIP -- dial.agi|112: -- uniqueid = ergatel.net-1235170972.16 dial.agi|112: my dialed no is : dial.agi|112: Query is:SELECT dst_nb FROM test where extension = '' regards On Sat, Feb 21, 2009 at 12:06 AM, michel freiha <mich...@gmail.com> wrote: > Dear All, > > i found the issue...it was just the #!/user/bin/perl instead of > #!user/bin/perl > > Thanks a lot for all help > > Regards > > On Fri, Feb 20, 2009 at 11:58 PM, michel freiha <mich...@gmail.com> wrote: > >> Dear Kai, >> >> If I change directory to /usr/bin and type the following command I got: >> >> [r...@switch1 bin]# ./perl /var/lib/asterisk/agi-bin/dial.pl >> >> VERBOSE "AGI Environment Dump:" 3 >> >> GET VARIABLE extension >> >> VERBOSE "my dialed no is :" >> >> VERBOSE "Query is:SELECT dst_nb FROM test where extension = ''" >> >> SET VARIABLE DestNo >> >> Regards >> >> >> On Fri, Feb 20, 2009 at 11:44 PM, Tilghman Lesher < >> tilgh...@mail.jeffandtilghman.com> wrote: >> >>> On Friday 20 February 2009 14:36:57 Danny Nicholas wrote: >>> > You will need to download AGI from www.cpan.org <http://www.cpan.org/> >>> and >>> > install it. Here it is in simple steps >>> > >>> > >>> > >>> > Cd /usr/src >>> > >>> > Wget >>> > >>> http://search.cpan.org/CPAN/authors/id/J/JA/JAMESGOL/asterisk-perl-0.10.tar >>> >. gz >>> > >>> > Tar xvf asterisk-perl-0.10.tar.gz >>> > >>> > Cd asterisk-perl-0.10 >>> > >>> > Make && make install >>> >>> Even easier: >>> >>> perl -MCPAN -e'install Asterisk::AGI' >>> >>> -- >>> Tilghman >>> >>> _______________________________________________ >>> -- 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 >>> >> >> >
_______________________________________________ -- 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