Dear all
I am just getting started with AGI
so I wrote the following script as a simple test
but all that happens is silence before it times out and hangs up
can someone help to get me started?
yet if i use the agi-test.agi script everything works  I don't see the 
difference
Thanks
php -q
<?php
         fputs(STDOUT 'SAY NUMBER 123 "#*"\n');
         $lin = fgets(STDIN);
?>
yet all I get on the console is
     -- Launched AGI Script /var/lib/asterisk/agi-bin/test.php
     -- AGI Script test.php completed, returning 0
  my conf file looks like
exten => 4000,1,Wait,1                  ; Wait
exten => 4000,2,Answer                 ; Answer
exten => 4000,3,AGI,test.php         ; run script
'SAY NUMBER 123 "#*" isn't a valid * command - it should be saynumber followed by a valid string of arguments. Do a "show application saynumber" in *. Iain --On Thursday, May 20, 2004 7:14 am -0400 Jer <jer@multihaven.org> wrote:> Dear all > > I am just getting started with AGI > > so I wrote the following script as a simple test > but all that happens is silence before it times out and hangs up > can someone help to get me started? > yet if i use the agi-test.agi script everything works I don't see the > difference > > Thanks > > php -q > <?php > fputs(STDOUT 'SAY NUMBER 123 "#*"\n'); > $lin = fgets(STDIN); > ?> > > yet all I get on the console is > -- Launched AGI Script /var/lib/asterisk/agi-bin/test.php > -- AGI Script test.php completed, returning 0 > > my conf file looks like > > exten => 4000,1,Wait,1 ; Wait > exten => 4000,2,Answer ; Answer > exten => 4000,3,AGI,test.php ; run script > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Hi!> I am just getting started with AGI > > so I wrote the following script as a simple test > but all that happens is silence before it times out and hangs up > can someone help to get me started?Look here: http://www.voip-info.org/wiki-Asterisk+AGI+php> php -q > <?php > fputs(STDOUT 'SAY NUMBER 123 "#*"\n'); > $lin = fgets(STDIN); > ?>Is that really your entire script, or did you cut out most of the lines? If not, then I am afraid that you need to do quite some reading on both AGI and PHP first. Cheers, Philipp