[asterisk-users] AGI: blocking script until playback complete

Zohair Raza engineerzuhairraza at gmail.com
Wed Feb 22 08:50:11 CST 2012


Try passing escape character

GET DATA $filename $timeout $max_digits $escape_character


Regards,
Zohair Raza


On Wed, Feb 22, 2012 at 6:40 PM, Chris Bagnall
<asterisk at lists.minotaur.cc>wrote:

> 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
>
> --
> ______________________________**______________________________**_________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>              http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/**mailman/listinfo/asterisk-**users<http://lists.digium.com/mailman/listinfo/asterisk-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120222/2a3d950e/attachment.htm>


More information about the asterisk-users mailing list