[Asterisk-Dev] Call Queue Completed calls and service level %
Asterisk
asterisk at dotr.com
Wed Jun 22 06:53:15 MST 2005
I've been looking at our call queue stats, and think that there may be
some problems with the code - perhaps I am wrong (I am a "C" newbie) but
would ask someone to look over my comments.
The number of calls recorded in "Completed" is way too high - and the
service level % is way too low :)
I've looked at the code in app_queue.c and have the following questions:
The "callscompleted" field is updated by the "update_status" function,
as you can see below:
static int update_status(struct ast_call_queue *q, struct member
*member, int status)
{
struct member *cur;
/* Since a reload could have taken place, we have to traverse
the list to
be sure it's still valid */
ast_mutex_lock(&q->lock);
cur = q->members;
while(cur) {
if (member == cur) {
cur->status = status;
if (!q->maskmemberstatus) {
manager_event(EVENT_FLAG_AGENT,
"QueueMemberStatus",
"Queue: %s\r\n"
"Location: %s\r\n"
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
"LastCall: %ld\r\n"
"Status: %d\r\n"
"Paused: %d\r\n",
q->name, cur->interface, cur->dynamic ?
"dynamic" : "static",
cur->penalty, cur->calls, cur->lastcall,
cur->status, cur->paused);
}
break;
}
cur = cur->next;
}
q->callscompleted++;
ast_mutex_unlock(&q->lock);
return 0;
}
However, this function is called when there is a "busy" (and possibly no
answer) on the extension being dialled - surely a call cannot be marked
as completed until it has been put through to an agent ? I notice that
there is a "handled" field that is incremented only if there is a
connection made to an agent. So, should q->callscompleted++; be taken
out of update_status and put where handled++; is ?
As for the service level, I think that it is far too low because the
callscompleted is far to high. I notice that the callscompletedinsl is
being updated in recalc_holdtime, which is called when the call is
actually put through to the agent.
If callscompletedinsl is being updated here, shouldn't callscompleted be
as well, and not in the update_status ?
Go easy ... :)
Julian.
More information about the asterisk-dev
mailing list