[Asterisk-Dev] PHP AGI - seems to ignore anything but EXEC

Terence Parker terence at parker.com.hk
Sun May 9 20:41:33 MST 2004


Ahh.... you could be right there - I wasn't reading the result of most of my
commands.

Still one question though (sorry to drag this thread our further) - the
function from Paul now works... I can send "SAY DIGITS" and get it to say
them without issuing an Exec SayDigits instead. However, I still can't get
"WAIT FOR DIGIT 3000" to work.

Is there a proper way of using this? I am under the assumption that this
automatically pauses for the 3 seconds to wait for the digit - or do I
separately have to issue a wait command? When I tried simply WAIT FOR DIGIT
it doesn't wait at all and just progresses to the next line in the script.

So, with my next line reading out the result, it would always read out 200.

Thanks,

Terence


> Paul Cadach wrote:
>
> > Don't forget to add fflush($stdout) after issuing each command because
PHP uses
> > buffering for its output.
>
> It's not the buffering that holds up php scripts, it's the fact you were
> reading the return values...
>
> For example the scripts I coded up to better handle enum parsing/dialing
> ( http://www.e164.org/enum.php ) does no flushing yet there is a read
> line after every command...
>
> -- 
> Best regards,
>   Duane





More information about the asterisk-dev mailing list