Executing a PHP Script with Asterisk

Can aboby provide any good info on how to setup and execute a .php script with Asterisk AGI.

I have found so many bits and pieces, but nothing seems to work.

If I create an .agi script it works just fine. If I run the .php from a web browser it works just fine.

When I use any of the following, it fails:

exten => 77,agi,wakeup.php
exten = > 77,agi|php wakeup.php

I have also created a ln -s /usr/lib/php php

and on and on… I get a permisson denied… I have done a chmod 755, 777, chgrp to asterisk, root, apache, etc., etc., etc… on the file as well.

Any help on executing a .php script within asterisk would be great…

Thanks,

Cliff

use the system command. check the wiki for the exact usage but its something like this (i dont remember how you execute php programs from the command line)

exten = > 77,1,System(php /directory/wakeup.php)

try this link http://www.voip-info.org/tiki-index.php?page=Asterisk+AGI+php