[asterisk-users] PLAYIN MUSIC WHILE SEARCHING MYSQL

Steve Edwards asterisk.org at sedwards.com
Fri Sep 28 12:54:11 CDT 2012


> On 27/09/12 02:13 PM, 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 .

On Fri, 28 Sep 2012, Leif Madsen wrote:

> It's been quite some time since I did this, so I can't give you a specific 
> example (that's left as an exercise to the reader), and I may be 
> misremembering, but essentially I had 2 Local channels that I "called" via 
> the Dial() application. One path played MusicOnHold() and the other would 
> perform some fancy stuff (I think it was an API call via CURL() that would 
> attempt to return a valid agent; a sort of dialplan based queuing system that 
> used an external API interface that managed the availability of the agents).
>
> Anyways, the one Local channel would play MusicOnHold(), then when the API 
> returns data to CURL(), the dialplan would continue and pull the caller out 
> of the MusicOnHold() application, and then send them to the dialplan section 
> to call the agent.
>
> The same principles could be applied here. I think it was a combination of 
> MusicOnHold(), Local channels, and the Bridge() application.
>
> Sometimes you just have to be really clever with Asterisk to make it do what 
> you want :)

A multi-threaded AGI or externalivr() sound easier to me if it meets your 
needs.

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