I am having a problem with PHPAGI. I send the command $agi->say_digits(“1234567”) from a PHP script and it returns immediately, prior to asterisk completing its stream of the digit sound files. I have tried with and without the 2nd parameter to say_digits() where 2nd parm is a string of acceptable early term digits. Both cases the say_digits() call returns to the AGI script immediately after the command is queued which is not the functionality if the same command (SayDigits) is used within a dialplan.
If I execute the PHP function sleep(10) after the say_digits() call asterisk streams the digits in their entirety. It seems that if asterisk receives an additional AGI command prior to completion of the say_digits() the playback is terminated. Same thing happens if say_digits() is called at the end of the script… as soon as the script ends the playback of the digits is terminated.
What am I missing? Is there some timeout taking effect of which I am unaware? I would like control to stay with asterisk until all of the digits in the say_digits() call are streamed on the channel.
Thanks in advance for everyone’s help!