AGI Scripts and PHP Scripts with Asterisk

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… :smile:

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…

  1. 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…

Have you seen these on


P.S. There you go, i’ve at least attempted to answer one of your questions :smiley:.

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… :smile:

I’m very impressed that everyday I get it to do more and more…

Try adding ‘#!/usr/bin/php -q’ at the beginning of the file and then just chmod it to 0755 for example.