How to play audio file in background in dialplan?
Tags: BackGround, background thread, credit card authorizations, expiration, Feb, file, mainline code, steve edwards
> On Fri, 3 Feb 2012, Yaroslav Panych wrote:
>
>> What exactly commands I should invoke in AGI instead of
>>
>> 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.’