[asterisk-users] How to play audio file in background in dialplan?

Steve Edwards asterisk.org at sedwards.com
Fri Feb 3 16:36:04 CST 2012


> On Fri, 3 Feb 2012, Yaroslav Panych wrote:
>
>> What exactly commands I should invoke in AGI instead of <start music> and 
>> <stop music> ? STREAM FILE returns only after file ends, this is not what I 
>> want.

On Fri, 3 Feb 2012, Steve Edwards wrote:

> Execute 'stream file' in a separate thread.

I use this when processing credit card authorizations. My dialplan 
executes my AGI (auth-card) with the card number and expiration date in 
channel variables.

The AGI creates a 'background' thread that plays 'Please wait while we 
authorize your card -- and get ready for a good time!' while the 
'mainline' code ships the card number and expiration date off to the card 
processor.

We almost always get a response (authorized or declined) back before the 
background thread finishes so the 'user experience' is that credit card 
authorizations are 'instantaneous.'

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list