[asterisk-users] Queue stats

Philipp Kempgen philipp.kempgen at amooma.de
Sat Jul 28 05:13:41 CDT 2007


Jay Moore wrote (received 2007-07-28):

> My boss would like some statistics on how many calls are answered out of 
> specific queues during a given time period, and I'm not sure how exactly 
> to obtain those stats.  Here's how our queue system works.
> 
> 1) Call comes in and enters our 'ring' queue where the phones ring for 
> 15 seconds (caller hears the standard ring tone).
> 
> 2) After 15 seconds, the caller falls into our 'music on hold' queue, a 
> message is played and the caller hears our music on hold while the 
> phones are rung again.
> 
> 3) After 30 seconds, if the caller is still in our 'moh' queue, they 
> drop out of queue and immediately re-enter the 'moh' queue again until 
> the call is answered or the caller hangs up.

So why drop them out of the queue?

> How can I find out how many calls are answered out of each queue during 
> certain times (1st shift, 2nd shift, etc...)?  Also, I'm curious how I 
> can track how many times a call repeats the 'moh' queue.

There are various ways to solve this. I would suggest to get
familiar with the queue log (/var/log/asterisk/queue_log). You
could use a script in whatever language you like to read that
file. Or you could write a script to import the log entries into
an SQL database. (There are some scripts around to do that,
search for "asterisk queue_log mysql".)
Or you could call a custom logger script directly from the
dialplan with TrySystem() for example.
Another option would be to listen to events from the manager
interface (AMI) but that's probably not what you are looking
for.

Hope that helps.

Regards,
  Philipp Kempgen

-- 
amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de
    Let's use IT to solve problems and not to create new ones.
          Asterisk? -> http://www.das-asterisk-buch.de
              My pick of the month: rfc 2822 3.6.5

Geschäftsführer: Stefan Wintermeyer
Handelsregister: Neuwied B 14998



More information about the asterisk-users mailing list