[Asterisk-Users] Request for comments on queue statistics

TC trclark at shaw.ca
Tue Sep 9 11:41:04 MST 2003


>As a first step towards getting real queue statistics going (a project
>arguably adjunct to Asterisk itself), I propose that the Queue app be
>modified to produce its own "Queue Log," which could be stored either as
>text or in a SQL table.  For simplicity I would probably just implement a
>MySQL backend.


This is always a thorn, I would argue this should be done via a
database astraction layer, database like opinons, everybody has thier own

>The "Queue Log" could record events such as when an agent took a call,
>when a call was abandoned, when a call enters the queue, etc.
>
>It's been suggested that queue stats can be gleaned from CDR, but I submit
>that they really can't be, as there is no way to tell queue holdtime,
>whether a call is abandoned, etc.  In theory the Queue Log could link back
>into the CDR by way of the unique identifier field
AGREED this is most certainly the correct way to do it, then we can make
simple
joins to the the cdr & the queue table  via this foreign key relationship
>and serve as an enhancement to CDR; but it can exist be independent of CDR.
Let CDR do
>its thing, let the queue app worry about queue logging.
TOTALLY AGREED
>Once a rich Queue Log is available, it becomes fairly easy to generate the
>sorts of statistics people have been asking for.  Thoughts?
Yup this is the right high level approach we now need to agree on the
schema(s),
and the events of interest
To get the ball rolling & very incomplete, off the top of my head :)
I'd suggest with have a
queueEntry- the header table 1 for each unique call
 -QueueEntryID - PK for this table
 -UniqueCallID - FK to the CDR entry
 -QueueName
 -StartTime
 -WaitTime
 -Agent
 -Group
 ...kitchen sink
queueEntryEvent - many events that are recorded against a given unique
queueEntry
I guess i could also submit to a denormalized single table as well :)

queueEntryEvent - the header table 1 for each unique call
 -QueueEntryEventID - FK for this table
 -QueueEntryID - FK to table queueEntry
 -QueueEventType
 -StartTime
 -End Time
 -Note (arbitrary stuff that is unique to an event type)
...
Then in queue.conf
queueDB=csv, mysql, ..whatever
queueLog - yes/no to log calls on this queue
queueEvents -definintion of events of interest that will trigger entry into
the queueEntry Tables
                  - that is defined for each queue
                  -a comma delimited list of event names of interest
                   eg join, leave, hungup, exitToContext, Duration, Parked,
Transfered ...








More information about the asterisk-users mailing list