[asterisk-users] PLAYIN MUSIC WHILE SEARCHING MYSQL

Steve Edwards asterisk.org at sedwards.com
Wed Sep 26 13:48:26 CDT 2012


On Wed, 26 Sep 2012, Mehdi Rahimi wrote:

> I want to play music in my AGI while i am searching for a field in DB. 
> Actually during some processes in AGI i need to play music .

Many moons ago, I had a client that wanted 'instantaneous' response to a 
credit card authorization request. (The request could take a couple of 
seconds because it involved an external vendor.)

My solution was an AGI that played a prompt ('Please wait while your card 
is being processed and get ready for a good time') in one thread while the 
'mainline' code processed the auth. By the time the prompt finished, I had 
the auth response and the 'experience' was that the auth was 
instantaneous.

One of the 'gotchas' is that you can't do any 'AGI' stuff in the mainline 
code while the background thread is playing the prompt -- which is kind of 
obvious if you understand the AGI protocol.

Another option to consider is the externalivr() application.

-- 
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