[Asterisk-Users] new2agi -php
Derek Bruce
dbruce at calgarytelecom.com
Sat Mar 6 16:06:09 MST 2004
your code:
#!/usr/bin/php -q
<?php
ob_implicit_flush(true);
set_time_limit(6);
$stdout = fopen('php://stdout', 'w');
fwrite($stdout,"STREAM FILE demo-congrats" );
fflush($stdout);
?>
The error message is generated by PHP... If your PHP version is higher that v4.3.0
line 5: $stdout = fopen('php://stdout', 'w');
should be
$stdout = fopen(STDOUT, 'w');
I suspect that is the problem, as everything else looks file.
----- Original Message -----
From: Doug Harris
To: Asterisk-Users at Lists. Digium. Com
Sent: Saturday, March 06, 2004 11:07 AM
Subject: [Asterisk-Users] new2agi -php
Hi firiends,
Sorry for a basic question here.
I am trying to write an agi script using php. Nothing fancy just simple script first.
I call the php script from the extensions.conf
exten => 91234/1001,1,Wait,1
exten => 91234/1001,2,AGI,test.agi
exten => 91234/1001,3,Hangup
php script is ;
#!/usr/bin/php -q
<?php
ob_implicit_flush(true);
set_time_limit(6);
$stdout = fopen('php://stdout', 'w');
fwrite($stdout,"STREAM FILE demo-congrats" );
fflush($stdout);
?>
* telles me "Error in Argument 1, char 3, option not found. ".
script can be run from command line.
Appreciate some help to get going here.
Dough
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20040306/899afa60/attachment.htm
More information about the asterisk-users
mailing list