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       sedwa...@sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

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

Reply via email to