AGI Scripts and PHP Scripts with Asterisk

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

AGI Scripts and PHP Scripts with Asterisk

Postby larsonc » Mon May 23, 2005 7:55 am

I have two questions:

1. Can anybody tell me what is needed to run a PHP script from Asterisk. For example I have tried:

exten => 850,AGI,sample.php

exten =>850,AGI |PHP,sample.php

exten =>850,PHP,sample.php

and on and on and on.... :-)

and this doesn't work... I have read about phpagi but is this something I need and if so where does it go? Any info would be great.

I can get an AGI script to run just fine...

2. Is there any good sites to get AGI scripts for Asterisk? I have searched various ways with GOOGLE and such, but it would be nice if there were a site that listed all of the AGI Scripts available for use with Asterisk..
larsonc
Oldsterisk
 
Posts: 55
Joined: Thu Dec 21, 2006 10:56 pm

Postby cydonia » Tue May 24, 2005 6:16 pm

Have you seen these on Voip-Info.org:


http://www.voip-info.org/wiki-Asterisk+AGI+php

http://sourceforge.net/projects/phpagi/


Goodluck!

P.S. There you go, i've at least attempted to answer one of your questions :D.
cydonia
Oldsterisk
 
Posts: 57
Joined: Thu Dec 21, 2006 10:56 pm

Yes, some good info..

Postby larsonc » Tue May 24, 2005 7:56 pm

I think I have found a good source and will let you know once I have it working...

Thanks for the links...

I make my own problems by pushing Asterisk to the limits.... :-)

I'm very impressed that everyday I get it to do more and more...
larsonc
Oldsterisk
 
Posts: 55
Joined: Thu Dec 21, 2006 10:56 pm

Postby SGM » Tue May 24, 2005 10:08 pm

Try adding '#!/usr/bin/php -q' at the beginning of the file and then just chmod it to 0755 for example.
SGM
Oldsterisk
 
Posts: 193
Joined: Thu Dec 21, 2006 10:56 pm


Return to Asterisk Support

Who is online

Users browsing this forum: Google [Bot] and 14 guests