Hello,I have succeded in compiling and configuring My TDM Card and asterisk, all works fine. But I have a problem using the PHP Agi.The CLI tells me that when I call my number :-- Starting simple switch on 'Zap/4-1' -- Executing [s at incoming:1] Answer("Zap/4-1", "") in new stack -- Executing [s at incoming:2] AGI("Zap/4-1", "rabot.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/rabot.agi == rabot.agi: Failed to execute '/var/lib/asterisk/agi-bin/rabot.agi': No such file or directory -- AGI Script rabot.agi completed, returning 0 == Auto fallthrough, channel 'Zap/4-1' status is 'UNKNOWN' -- Hungup 'Zap/4-1'I tought first that it was a problem of chmod so I change the chmod of all the directory agi-bin TO 777But it changed nothing. I have verify that php was well indicate at the beginning of the script :#!/usr/bin/php-qAnd there is a php exec at /usr/binAny ideas about this problem ?Thank for you helpKheraud _________________________________________________________________ Windows Live Messenger vous offre 30 nouvelles ?motic?nes gratuites, install?es directement dans votre Messenger ! http://www.emoticones-messenger.fr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070823/6134e14e/attachment.htm
Did you confirm that the file exists? /var/lib/asterisk/agi-bin/rabot.agi Also, in your script (wherever it actually is), put a space between php and -q #!/usr/bin/php -q Karim H wrote:> Hello, > I have succeded in compiling and configuring My TDM Card and asterisk, > all works fine. > But I have a problem using the PHP Agi. > The CLI tells me that when I call my number : > > -- Starting simple switch on 'Zap/4-1' > -- Executing [s at incoming:1] Answer("Zap/4-1", "") in new stack > -- Executing [s at incoming:2] AGI("Zap/4-1", "rabot.agi") in new stack > -- Launched AGI Script /var/lib/asterisk/agi-bin/rabot.agi > == rabot.agi: Failed to execute > '/var/lib/asterisk/agi-bin/rabot.agi': No such file or directory > -- AGI Script rabot.agi completed, returning 0 > == Auto fallthrough, channel 'Zap/4-1' status is 'UNKNOWN' > -- Hungup 'Zap/4-1' > > I tought first that it was a problem of chmod so I change the chmod of > all the directory agi-bin TO 777 > > But it changed nothing. I have verify that php was well indicate at the > beginning of the script : > #!/usr/bin/php-q > > And there is a php exec at /usr/bin > > Any ideas about this problem ? > > Thank for you help > > Kheraud > > ------------------------------------------------------------------------ > Besoin d'un e-mail ? Cr?ez gratuitement un compte Windows Live Hotmail > et b?n?ficiez de 2 Go de stockage ! Windows Live Hotmail > <http://www.windowslive.fr/hotmail/default.asp> > > > ------------------------------------------------------------------------ > > _______________________________________________ > --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
Problem resolved :Two things :1 - php agi instead of php-cli (I have apache running on my server too and it edits himself all the php.ini it finds)2 - Error using php-q it is amistake : php -q (of course =) )Their is a real problem with asterisk concerning errors in agi script.If there is an error in the script itself asterisk give back : No such file or directory even if the error is just that ";" is missing...Thanks for the helpFrom: marikounet at hotmail.comTo: asterisk-users at lists.digium.comDate: Thu, 23 Aug 2007 14:51:27 +0000Subject: [asterisk-users] [PHP-AGI] Problem executing script Hello,I have succeded in compiling and configuring My TDM Card and asterisk, all works fine. But I have a problem using the PHP Agi.The CLI tells me that when I call my number :-- Starting simple switch on 'Zap/4-1' -- Executing [s at incoming:1] Answer("Zap/4-1", "") in new stack -- Executing [s at incoming:2] AGI("Zap/4-1", "rabot.agi") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/rabot.agi == rabot.agi: Failed to execute '/var/lib/asterisk/agi-bin/rabot.agi': No such file or directory -- AGI Script rabot.agi completed, returning 0 == Auto fallthrough, channel 'Zap/4-1' status is 'UNKNOWN' -- Hungup 'Zap/4-1'I tought first that it was a problem of chmod so I change the chmod of all the directory agi-bin TO 777But it changed nothing. I have verify that php was well indicate at the beginning of the script :#!/usr/bin/php-qAnd there is a php exec at /usr/binAny ideas about this problem ?Thank for you helpKheraudBesoin d'un e-mail ? Cr?ez gratuitement un compte Windows Live Hotmail et b?n?ficiez de 2 Go de stockage ! Windows Live Hotmail _________________________________________________________________ Windows Live Messenger vous offre 30 nouvelles ?motic?nes gratuites, install?es directement dans votre Messenger ! http://www.emoticones-messenger.fr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070823/bf0a8589/attachment.htm
Hey there, The file must be accessible by the process calling upon it. Try a chown using the Asterisk process user name. Cheers, Louis-Eric At 09:51 AM 8/23/2007, Karim H wrote:>Hello, >I have succeded in compiling and configuring My >TDM Card and asterisk, all works fine. >But I have a problem using the PHP Agi. >The CLI tells me that when I call my number : > >-- Starting simple switch on 'Zap/4-1' > -- Executing [s at incoming:1] Answer("Zap/4-1", "") in new stack > -- Executing [s at incoming:2] AGI("Zap/4-1", "rabot.agi") in new stack > -- Launched AGI Script /var/lib/asterisk/agi-bin/rabot.agi > == rabot.agi: Failed to execute > '/var/lib/asterisk/agi-bin/rabot.agi': No such file or directory > -- AGI Script rabot.agi completed, returning 0 > == Auto fallthrough, channel 'Zap/4-1' status is 'UNKNOWN' > -- Hungup 'Zap/4-1' > >I tought first that it was a problem of chmod so >I change the chmod of all the directory agi-bin TO 777 > >But it changed nothing. I have verify that php >was well indicate at the beginning of the script : >#!/usr/bin/php-q > >And there is a php exec at /usr/bin > >Any ideas about this problem ? > >Thank for you help > >Kheraud > > >---------- >Besoin d'un e-mail ? Cr?ez gratuitement un >compte Windows Live Hotmail et b?n?ficiez de 2 >Go de stockage ! ><http://www.windowslive.fr/hotmail/default.asp>Windows Live Hotmail >_______________________________________________ >--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/20070823/fdf43d10/attachment.htm