[asterisk-users] PLAYIN MUSIC WHILE SEARCHING MYSQL

Leif Madsen leif.madsen at asteriskdocs.org
Fri Sep 28 06:36:15 CDT 2012


On 27/09/12 02:13 PM, Mehdi Rahimi wrote:
> On Wed, Sep 26, 2012 at 11:31 PM, Leif Madsen
> <leif.madsen at asteriskdocs.org> wrote:
>> On 26/09/12 05:35 AM, 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 .
>>
>>
>> Probably Local channels to the rescue here.
 >
> Dear Leif Madsen,
>
> Please explain more

<top posting fix resolved :)>

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

-- 
Leif Madsen
http://www.oreilly.com/catalog/asterisk



More information about the asterisk-users mailing list