Bharath B. Reddy Bynagari
2010-Mar-31 20:29 UTC
[asterisk-users] How to run Music while looking for the caller in Database
Hi, We are using Asterisk and PERL. We have all the call logic in PERL. We are trying to identify the caller using the CID in the Database. As the Database lookup is taking more time (>15 seconds), we want to play some tune while the caller is waiting. How can we do that? Any ideas will be greatly appreciated. - Bharath -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100331/81ee24e3/attachment.htm
Mark Michelson
2010-Mar-31 20:43 UTC
[asterisk-users] How to run Music while looking for the caller in Database
Bharath B. Reddy Bynagari wrote:> Hi, > > > > We are using Asterisk and PERL. We have all the call logic in PERL. We > are trying to identify the caller using the CID in the Database. As the > Database lookup is taking more time (>15 seconds), we want to play some > tune while the caller is waiting. > > > > How can we do that? Any ideas will be greatly appreciated. > > > > - BharathAssuming that you are using a perl AGI script, you can use the AGI command SET MUSIC ON to play music on the channel. You can stop the music by using SET MUSIC OFF. For a bit more information, you can run the CLI command "agi show set music" Mark Michelson
Steve Edwards
2010-Mar-31 20:48 UTC
[asterisk-users] How to run Music while looking for the caller in Database
On Wed, 31 Mar 2010, Bharath B. Reddy Bynagari wrote:> We are using Asterisk and PERL. We have all the call logic in PERL. We > are trying to identify the caller using the CID in the Database. As the > Database lookup is taking more time (>15 seconds),Fix the database! Anything else is a band-aid. What DBM? How many rows? What indexes? How long does it take to execute your query from a shell?> we want to play some tune while the caller is waiting.You can create a separate thread in your AGI to play the "Please wait while..." while you do your database stuff. I did this several years ago with an AGI written in C to process a credit card authorization request and response -- but I was only trying to hide a task that took a second or two. The "customer experience" was that the authorization was instantaneous. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000