OK Asterisk gurus, here’s my problem. Working on a little project that goes like this: 1. Send DTMF command to ASL that calls a script. This script is also sending commands to another program. 2. Play an audio file over ASL indicating the function being performed. 3. Now the tricky part, wait until audio playback has completed before moving on to the next command in the script. Don’t want Allison’s lovely voice coming out of places she should not! How can I do this? Seems like a simple task until you go to do it. I know there is a ${PLAYBACKSTATUS} variable in the system that returns SUCCESS or FAILURE, but not quite sure how to go about accessing it. Ed W8VT
On 1/13/20 8:45 PM, Ed Wilhelm wrote:
OK Asterisk gurus, here’s my problem. Working on a little project that goes like this:
1. Send DTMF command to ASL that calls a script. This script is also sending commands to another program. 2. Play an audio file over ASL indicating the function being performed. 3. Now the tricky part, wait until audio playback has completed before moving on to the next command in the script. Don’t want Allison’s lovely voice coming out of places she should not! How can I do this? Seems like a simple task until you go to do it. I know there is a ${PLAYBACKSTATUS} variable in the system that returns SUCCESS or FAILURE, but not quite sure how to go about accessing it.
Ed, Look at the Asterisk Gateway Interface (AGI) function of Asterisk. https://www.voip-info.org/asterisk-agi/ -Stacy KG7QIN
If your sound file is a predictable length you can just use "sleep" in your script. with the number of seconds you want the script to wait (eg sleep 5 = 5 seconds). add an "m" for minutes (eg: sleep 5m), d for days, etc. On Mon, Jan 13, 2020 at 11:45 PM Ed Wilhelm <vacuumtubesforever@gmail.com> wrote:
OK Asterisk gurus, here’s my problem. Working on a little project that goes like this:
Send DTMF command to ASL that calls a script. This script is also sending commands to another program. Play an audio file over ASL indicating the function being performed. Now the tricky part, wait until audio playback has completed before moving on to the next command in the script. Don’t want Allison’s lovely voice coming out of places she should not! How can I do this? Seems like a simple task until you go to do it. I know there is a ${PLAYBACKSTATUS} variable in the system that returns SUCCESS or FAILURE, but not quite sure how to go about accessing it.
Ed W8VT
_______________________________________________ App_rpt-users mailing list App_rpt-users@lists.keekles.org http://lists.keekles.org/cgi-bin/mailman/listinfo/app_rpt-users
To unsubscribe from this list please visit http://lists.keekles.org/cgi-bin/mailman/listinfo/app_rpt-users Unsubscribe posts to the list will result in public shaming.
participants (3)
-
Brian G -
Ed Wilhelm -
Stacy