[asterisk-users] AGI script
michel freiha
michofr at gmail.com
Fri Feb 20 14:12:08 CST 2009
Dear Sir,
The file dial.pl is executable and own by root as you can see below
ls -lrt
total 296
-rwxr-xr-x 1 root root 1339 Feb 15 23:26 helloworld.php
-rw-r--r-- 1 root root 0 Feb 15 23:26 my_agi.log
-rw-r--r-- 1 root root 1250 Feb 17 23:35 ani.agi
-rwxrwxrwx 1 root root 1604 Feb 20 00:57 micho.php
-rwxrwxrwx 1 root root 3874 Feb 20 01:37 directory.agi
-rwxr-xr-x 1 root root 14530 Feb 20 16:43 jukebox.agi
-rwxr-xr-x 1 root root 117743 Feb 20 16:43 eagi-test
-rwxr-xr-x 1 root root 90971 Feb 20 16:43 eagi-sphinx-test
-rwxr-xr-x 1 root root 1742 Feb 20 16:43 agi-test.agi
-rwxrwxrwx 1 root root 1865 Feb 20 21:18 dial.pl
Regarding the script debug test please find below what did I get:
[root at switch1 agi-bin]# /usr/bin/perl -wc dial.pl
Can't locate Asterisk/AGI.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5
/usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/5.8.8 .) at dial.pl line 6.
BEGIN failed--compilation aborted at dial.pl line 6.
[root at switch1 agi-bin]#
Really appreciate your help
Regards
On Fri, Feb 20, 2009 at 9:44 PM, Danny Nicholas <danny at debsinc.com> wrote:
> Dial.pl is
>
> 1. executable
> 2. owned by asterisk
> 3. passed perl syntax (perl –wc dial.pl)
>
>
> ------------------------------
>
> *From:* asterisk-users-bounces at lists.digium.com [mailto:
> asterisk-users-bounces at lists.digium.com] *On Behalf Of *michel freiha
> *Sent:* Friday, February 20, 2009 1:41 PM
> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> *Subject:* Re: [asterisk-users] AGI script
>
>
>
> Dear Sir,
>
> I'm facing the below problem:
>
> -- Executing [112 at did:1] AGI("SIP/123456-08f44c00", "dial.pl|112") in new
> stack
> -- Launched AGI Script /var/lib/asterisk/agi-bin/dial.pl
> == dial.pl|112: Failed to execute '/var/lib/asterisk/agi-bin/dial.pl':
> No such file or directory
> == Auto fallthrough, channel 'SIP/123456-08f44c00' status is 'UNKNOWN'
>
> The file dial.pl is already created and exist in the correct location as
> you can see below:
>
> [root at switch1 agi-bin]# ls
> agi-test.agi ani.agi dial.pl directory.agi eagi-sphinx-test eagi-test
> helloworld.php jukebox.agi micho.php my_agi.log
> [root at switch1 agi-bin]# pwd
> /var/lib/asterisk/agi-bin
> [root at switch1 agi-bin]#
>
> What could be the issue here?
>
> Thanks a lot for help
>
> On Fri, Feb 20, 2009 at 3:30 PM, Yawar Hadi <yawarhadi at gmail.com> wrote:
>
> okay
> this is the dial plan u can test it and let me know if u want more
> information ...
> and script is attached.
>
> exten=>112,1,AGI(DialNumber.pl|${EXTEN});
> exten=>112,2,Dial(SIP/Terminator/${DestNo}|);
> exten=>112,3,Hangup();
>
> on second in place of termeinator u have to use the ip of terminator to
> which u r sending ur traffic.if u want to call sip sip of from one soft
> phone to second soft phone then remoce /terminator ok... like
> (SIP/${DestNo})
>
> mail be back if any problem.
>
>
>
> On Fri, Feb 20, 2009 at 1:07 PM, michel freiha <michofr at gmail.com> wrote:
>
> Dear Yawar,
>
> I'll appreciate a lot if you send to me these scripts in order to test
>
> Regards
>
> On Fri, Feb 20, 2009 at 5:58 AM, Yawar Hadi <yawarhadi at gmail.com> wrote:
>
> i have in perl AGI script if u want then let me know ...?
>
>
>
> On Fri, Feb 20, 2009 at 4:59 AM, Steve Edwards <asterisk.org at sedwards.com>
> wrote:
>
> On Fri, 20 Feb 2009, michel freiha wrote:
>
> > I need the following....A customer will dial a specific number like
> 112,this
> > will fire a php AGI script...The AGI script will connect to the database
> and
> > see if this number (112) is registered in a specific table...If yes, AGI
> > script will return to asterisk a destination number registered in that
> table
> > and match the 112 then asterisk will dial out the number fetched
> >
> > Please let me know if you need any other information
>
> 1) How much are you paying for us to do your work?
>
> 2) Shouldn't this be on -biz?
>
> Thanks in advance,
> ------------------------------------------------------------------------
> Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
> Newline Fax: +1-760-731-3000
>
>
> _______________________________________________
> -- 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
>
>
>
> --
> Best regards
>
> Yawar Hadi Noshahi
> QAU Islamabad
> (+92-0300-5504798)
>
> _______________________________________________
> -- 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
>
>
>
>
> --
> Best regards
>
> Yawar Hadi Noshahi
> QAU Islamabad
> (+92-0300-5504798)
>
>
> _______________________________________________
> -- 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090220/44d637b5/attachment.htm
More information about the asterisk-users
mailing list