Using PHP with the Asterisk Gateway Interface (AGI) PHP Tips and Examples Script Location Asterisk expects to find scripts in the /var/lib/asterisk/agi-bin/ directory for AGI execution. File Permissions Remember to make your files executable with chmod 755 /var/lib/asterisk/agi-bin/*.php . The Shebang The first line in your script will of course determine which executable runs it. Be aware of the