[asterisk-users] AGI script

michel freiha michofr at gmail.com
Fri Feb 20 14:55:01 CST 2009


Dear All,

Please find below my dialplan:
[did]
exten=>112,1,AGI(dial.pl|${EXTEN});
exten => 112,1,Dial(SIP/${DestNo}@80.169.210.181 <DestNo%7D at 80.169.210.181>
,60)
exten=>112,3,Hangup();

And below are commands results sent by steve:

[root at switch1 ~]# sudo su
[root at switch1 ~]# /etc/init.d/asterisk restart
Shutting down asterisk: [  OK  ]
Starting asterisk: [  OK  ]
[root at switch1 ~]# ps -aef | grep asterisk | grep -v grep
root     10470     1  0 22:18 pts/0    00:00:00 /bin/sh
/usr/sbin/safe_asterisk
root     10473 10470  0 22:18 pts/0    00:00:00 /usr/sbin/asterisk -f -vvvg
-c
[root at switch1 ~]# ls -l /var/lib/asterisk/agi-bin/dial.pl
-rwxrwxrwx 1 root root 1865 Feb 20 21:18 /var/lib/asterisk/agi-bin/dial.pl
[root at switch1 ~]# head -1 /var/lib/asterisk/agi-bin/dial.pl
#!user/bin/perl


The file dial.pl is executable as you can see below:

-rwxrwxrwx 1 root root   1865 Feb 20 21:18 dial.pl

Regards

On Fri, Feb 20, 2009 at 10:15 PM, Steve Edwards
<asterisk.org at sedwards.com>wrote:

> On Fri, 20 Feb 2009, michel freiha wrote:
>
> > I'm facing the below problem:
> >  ==  dial.pl|112: Failed to execute '/var/lib/asterisk/agi-bin/dial.pl':
> No
> > such file or directory
> >
> > What could be the issue here?
>
> These commands may point you in the right direction:
>
> 1) ps -aef | grep asterisk | grep -v grep
>
> 2) ls -l /var/lib/asterisk/agi-bin/dial.pl
>
> 3) head -1 /var/lib/asterisk/agi-bin/dial.pl
>
> Also, note that you copied the "example" dialplan snippet verbatim. The
> script as provided does not look at the "passed extension," it looks at
> the AGI environment variable.
>
> A suggestion -- you should not be logging in as root. You should be using
> the "sudo" command.
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090220/2af93898/attachment.htm 


More information about the asterisk-users mailing list