Asterisk calculate wait time


#1

I need to trace on a mysql Db the time between calls arriving on ivr and wait time on the choosen queue…
Between ivr starting and queue answer (or abbandoned)…
This to monitor cc Service Level…
Could have i any suggestions?
Thanks


#2

${CDR(duration)} Duration of the call.
${CDR(billsec)} Duration of the call once it was answered.

Can i subtract these two values?


#3

I don’t understand what do you mean in your last question. Those values are available for your use after the call hangup, If you have a CDR setup properly those values are in DB too.


#4

Sorry…i’ll try to explain better…

I need to calculate time passed between call answered by IVR and queue agent answer…

There is an authority for water distribution company (acqueduct) that force to take over this value…

I’ve Asternic (with license) installed…but this program take on core the cc performance…so IVR time is not included on surveys…
I wish i could keep on a DB the timestamps on both answer events and calculate month by month the average wait time…


#5

Although I don’t know how well this works in practice, the expectation is that you would use the Queue application, and take this information from the queue log.


#6

Queue log could take over calls before they enter a queue?
If not i wish i could set timestamps of the two events and do any math on those…
I’ve only to report the average wait time on hook before agent answer…


#7

What happens between the IVR and entering the queue. For most people, entering the queue is when the wait time starts.

If dialplan is active, you can capture the time just by setting a channel variable to the time.


#8

Yes…for call starts i know how to do…but how can i check this on queue answer?


#9

You can run dialplan on queue answer.

You haven’t explained why the normal queue statistics don’t give you the value you need.


#10

Because as you said for normal queue statistics entering the queue is when the wait time starts.

When you say “You can run dialplan on queue answer.” you mean i have to fill the dots?

On priority 2 i’ll obtain answer timestamp if set correctly? (sorry for bothering you)

exten => 1000,1,Queue(1000,tT)
exten => 1000,2,…
exten => 1000,3,Hangup


#11

Entering the queue is when most people want the wait time to start being counted!

The Queue and Dial applications handle the whole of the connected phase of the call, so priority 2 will not be run until the agent hangs up or the queue gives up.

Please read queues.conf.sample for how to run a subroutine when the agent is called.