Asterisk Gateway Interface Scripting with PHP
Jan 28, 2009, 04:04 (0 Talkback[s])
[ Thanks to Ramsai
Karri for this link. ]
"PHP-CLI vs PHP-CGI
Most Linux distributions include both versions of PHP when
installed, especially if you are using a modern distribution such
as CentOS or Mandriva. When writing AGI scripts with PHP, it is
imperative that you use PHP-CLI, and not PHP-CGI.
"Why is this so important? The main issue is that PHP-CLI and
PHP-CGI handle their STDIN (standard input) slightly differently,
which makes the reading of channel variables via PHP-CGI slightly
more problematic.
"The php.ini configuration file
The PHP interpreter includes a configuration file that defines a
set of defaults for the interpreter. For your scripts to work in an
efficient manner, the following must be set—either via the
php.ini file, or by your PHP script:
"ob_implicit_flush(false);
set_time_limit(5);
error_log = filename;
error_reporting(0);"
Complete Story
Related Stories:
- Asterisk: The Next Big IT Certification?(Jan 22, 2009)
- Open-Source Mobile Telephony Goes Legit(Jan 22, 2009)
- FreeSWITCH 1.0.2 with New Codecs and Fax for VoIP(Jan 10, 2009)
- Digium: Asterisk Accelerates As Economy Crumbles(Dec 18, 2008)
- Followup: Asterisk Bug is Old, Fix is Also Old(Dec 10, 2008)
- Asterisk Founder Talks About Hardest Part of Being Open Source PBX Creator(Nov 26, 2008)
- Digium Reinvents AsteriskNOW(Oct 29, 2008)
- Open source identity: Free Telephony Project founder David Rowe(Oct 24, 2008)
- Skype Meets Asterisk(Oct 15, 2008)