[asterisk-users] How to run Music while looking for the caller in Database

Steve Edwards asterisk.org at sedwards.com
Wed Mar 31 15:48:50 CDT 2010


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



More information about the asterisk-users mailing list