$agi->agi_exec("BACKGROUND demo-instruct #") and it just skips the command during execution.
In contrast this works fine:
$agi->agi_exec("BACKGROUND demo-instruct #")
If anyone has a code snippet including the get_dtmf or some command that captures the users input let me know.
As far as I can tell this command is only available through mods to extensions.conf (not agi), but there appear to be perl agi modules that support background.
I am not using the latest 2.0 code for phpagi.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It states that you can send a string of digits that can interrupt the file being streamed when using STREAM FILE.
I modified my phpagi version's agi_text2wav function to send this parameter when it calls STREAM to play the wav file and then changed it to return a value (chr($res[result])) and it works.
The talking is interrupted and I know what the user pressed.
Just out of curiosity could I have saved my self some time and used the 2.0 phpagi version in CVS?
Does it have this feature?
Thanks Matthew and crew for phpagi, its a nice framework for writing agi scripts in php.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can the background command be used with agi?
I tried:
$agi->agi_exec("BACKGROUND demo-instruct #") and it just skips the command during execution.
In contrast this works fine:
$agi->agi_exec("BACKGROUND demo-instruct #")
If anyone has a code snippet including the get_dtmf or some command that captures the users input let me know.
As far as I can tell this command is only available through mods to extensions.conf (not agi), but there appear to be perl agi modules that support background.
I am not using the latest 2.0 code for phpagi.
Sorry typo'd the second (working) command instead of BACKGROUND it should say STREAM FILE.
I figured it out. Turns out that you don't need background at all.
This page got me started:
http://asterisk.drunkcoder.com/agi.cgi
It states that you can send a string of digits that can interrupt the file being streamed when using STREAM FILE.
I modified my phpagi version's agi_text2wav function to send this parameter when it calls STREAM to play the wav file and then changed it to return a value (chr($res[result])) and it works.
The talking is interrupted and I know what the user pressed.
Just out of curiosity could I have saved my self some time and used the 2.0 phpagi version in CVS?
Does it have this feature?
Thanks Matthew and crew for phpagi, its a nice framework for writing agi scripts in php.