Dear All, 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 . Thanks in advanced. Regards, Mehdi
Thorsten Göllner
2012-Sep-26 10:11 UTC
[asterisk-users] PLAYIN MUSIC WHILE SEARCHING MYSQL
Do your query really takes "so" long? You should consider to use to optimize your database or query instead. OR take a look at AsncAGI: http://ofps.oreilly.com/titles/9780596517342/AGI.html Am 26.09.2012 11:35, schrieb Mehdi Rahimi:> Dear All, > > 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 . > Thanks in advanced. > > Regards, > Mehdi > > -- > _____________________________________________________________________ > -- 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
+1 - if your query is going to take long enough that you need to play music, you need to optimize the process somewhere. FWIW, if you do play music, you will need to "fork" the process as the music process is not asynchronous. -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Thorsten G?llner Sent: Wednesday, September 26, 2012 5:11 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] PLAYIN MUSIC WHILE SEARCHING MYSQL Do your query really takes "so" long? You should consider to use to optimize your database or query instead. OR take a look at AsncAGI: http://ofps.oreilly.com/titles/9780596517342/AGI.html Am 26.09.2012 11:35, schrieb Mehdi Rahimi:> Dear All, > > 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 . > Thanks in advanced. > > Regards, > Mehdi > > -- > _____________________________________________________________________ > -- 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-- _____________________________________________________________________ -- 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
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
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. -- Leif Madsen http://www.oreilly.com/catalog/asterisk
Dear Leif Madsen, Please explain more 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. > > -- > Leif Madsen > http://www.oreilly.com/catalog/asterisk > > > -- > _____________________________________________________________________ > -- 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