How do I find the average waiting time in the queue?
from the asterisk cli:-
queue show (queue)
rasterisk -x “queue show”
for a prettier view maybe:-
7007 has 0 calls (max 20) in ‘rrmemory’ strategy (180s holdtime, 417s talktime), W:0, C:1577, A:385, SL:69.3% within 60s
And after several minutes:
7007 has 0 calls (max 20) in ‘rrmemory’ strategy (88s holdtime, 191s talktime), W:0, C:1581, A:388, SL:69.3% within 60s
But I want to know average waiting time in queue for ALL calls.
Is it possible?
- And by the way, when I look in CDR Reports numbers of Unanswered calls to destination 7007, it does not show any call.
But queue show showed me that there should be at least 388.
Why is this happening?
It’s just simple mathematics, look at the code for the “wallboard” I pointed you at and rewrite it if doesn’t do exactly what you want.
For the unanswered calls look at the DID that was dialed not the queue, the queues do their best to keep your CDR records as clean as possible.
You might however be better off just buying the asternic package from :-
Simpler for me to write few strings of python code:
-- coding:utf-8 --
f = open(file, ‘r’)
lines = f.readlines()
lines = rf(‘queue_log’)
data = re.search(r’|(12\d)|COMPLETECALLER|(\d+)|(\d+)|\d+’, string)
tel_id = data.group(1)
wait_time = data.group(2)
if wait_time != ‘0’:
waiting = [search_wait(line) for line in lines if search_wait(line) != None]
waiting = sorted( [int(x) for x in waiting] )
print 'average waiting time: ', sum(waiting)/len(waiting)
hmm, margins are not saved