[asterisk-users] AGI: blocking script until playback complete
Chris Bagnall
asterisk at lists.minotaur.cc
Wed Feb 22 08:40:19 CST 2012
Greetings list,
I've done AGI scripting before, but in the past I've always wanted
control to be returned to the dialplan as soon as possible.
However, today I have a scenario where I want the script to remain
running during the playback of a file so that I can read DTMF at the end
of playback. However, doing this:
GET DATA en_welcome 5000 6
Results (correctly) in the following in the asterisk console:
-- <SIP/a.b.c.d-dc027b50> Playing 'en_welcome' (language 'en')
But the AGI continues to run on after this point, not waiting for either
the sound file to be played, nor for the expected 6 DTMF digits.
Adding a simple 10 second sleep/wait to the AGI allows the sound file to
be successfully played back.
I'm sure I must be missing something very obvious, buy my google-fu is
failing me this afternoon.
Suggestions gratefully received :-)
Thanks in advance.
Kind regards,
Chris
--
This email is made from 100% recycled electrons
More information about the asterisk-users
mailing list