Author Topic: Problem with agent sessions being doubled up in reports  (Read 3195 times)

jf647

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
Problem with agent sessions being doubled up in reports
« on: August 14, 2007, 17:21:57 »
I am having a problem where my agent sessions are being doubled up in reports.

I am using QM 1.4.0

This is from my agent session detail for yesterday for agent #1405:

1405 -    08/13 - 8:33:21   08/13 - 9:51:54   1:18:33             12   13:13     
1405 -  08/13 - 8:33:21   08/13 - 9:51:54   1:18:33             0   0:00     
1405 -  08/13 - 9:55:37   08/13 - 14:50:41   4:55:04             28   1:07:54     
1405 -  08/13 - 9:55:37   08/13 - 14:50:41   4:55:04             0   0:00     
1405 -    08/13 - 14:50:41   08/13 - 16:24:34   1:33:53             7   35:39     
1405 -  08/13 - 14:50:41   08/13 - 16:24:34   1:33:53             0   0:00     

In my queue log, there are only three sessions for this agent (I've translated the epoch times for convenience):

Mon Aug 13 08:33:21 2007|NONE|NONE|SIP/1405|AGENTLOGIN|-
Mon Aug 13 09:51:54 2007|NONE|NONE|SIP/1405|AGENTLOGOFF|-|4713
Mon Aug 13 09:55:37 2007|NONE|NONE|SIP/1405|AGENTLOGIN|-
Mon Aug 13 14:50:41 2007|NONE|NONE|SIP/1405|AGENTLOGOFF|-|17704
Mon Aug 13 14:50:41 2007|NONE|NONE|SIP/1405|AGENTLOGIN|-
Mon Aug 13 16:24:34 2007|NONE|NONE|SIP/1405|AGENTLOGOFF|-|5633

I am using agent log on and log off from the QM agent control page.  I am not using AgentCallbackLogin - we use dynamic members here.  When an agent logs on/off or pauses/unpauses, an AGI script is run.

On agent login, I:

$agi->exec("QueueLog", "NONE|NONE|SIP/$agent_id|AGENTLOGIN|-");

Then for each queue they are supposed to be answering, I:

$agi->exec("AddQueueMember", "$queue|SIP/$agent_id|$penalty||SIP/$agent_id");

On logoff, I:

$agi->exec("RemoveQueueMember", $queue->queue_name."|SIP/$agent_id");

for each queue they are a member of, then:

$agi->exec("QueueLog", "NONE|NONE|SIP/$agent_id|AGENTLOGOFF|-|$duration");

For pause, I:

$agi->exec("PauseQueueMember", "|SIP/".$agent->id);

then

$agi->exec("QueueLog", "NONE|NONE|SIP/".$agent->id."|PAUSEREASON|$opts{pausereason}");

and for unpause, I:

$agi->exec("UnpauseQueueMember", "|SIP/".$agent->id);

A snippet of a pause/unpause cycle for this agent is:

Mon Aug 13 09:55:37 2007|NONE|NONE|SIP/1405|AGENTLOGIN|-
Mon Aug 13 09:55:37 2007|1187013337.32126|cs_billing|SIP/1405|ADDMEMBER|
Mon Aug 13 09:55:37 2007|1187013337.32126|cs_ld|SIP/1405|ADDMEMBER|
Mon Aug 13 09:55:37 2007|1187013337.32126|cs_inquiries|SIP/1405|ADDMEMBER|
Mon Aug 13 09:55:49 2007|1187013295.32116|cs_inquiries|SIP/1405|CONNECT|30|1187013343.32133
Mon Aug 13 09:56:41 2007|1187013295.32116|cs_inquiries|SIP/1405|TRANSFER|7205|from-internal-nccc|30|52
Mon Aug 13 09:56:42 2007|NONE|NONE|SIP/1405|PAUSEALL|
Mon Aug 13 09:56:42 2007|NONE|cs_ld|SIP/1405|PAUSE|
Mon Aug 13 09:56:42 2007|NONE|cs_billing|SIP/1405|PAUSE|
Mon Aug 13 09:56:42 2007|NONE|cs_inquiries|SIP/1405|PAUSE|
Mon Aug 13 09:56:42 2007|NONE|NONE|SIP/1405|PAUSEREASON|30
Mon Aug 13 09:57:27 2007|NONE|NONE|SIP/1405|UNPAUSEALL|
Mon Aug 13 09:57:27 2007|NONE|cs_ld|SIP/1405|UNPAUSE|
Mon Aug 13 09:57:27 2007|NONE|cs_billing|SIP/1405|UNPAUSE|
Mon Aug 13 09:57:27 2007|NONE|cs_inquiries|SIP/1405|UNPAUSE|
[...]
Mon Aug 13 14:50:41 2007|1187031040.37406|cs_inquiries|SIP/1405|REMOVEMEMBER|
Mon Aug 13 14:50:41 2007|1187031040.37406|cs_ld|SIP/1405|REMOVEMEMBER|
Mon Aug 13 14:50:41 2007|1187031040.37406|cs_billing|SIP/1405|REMOVEMEMBER|
Mon Aug 13 14:50:41 2007|NONE|NONE|SIP/1405|AGENTLOGOFF|-|17704
Mon Aug 13 09:57:27 2007|NONE|cs_ld|SIP/1405|UNPAUSE|
Mon Aug 13 09:57:27 2007|NONE|cs_billing|SIP/1405|UNPAUSE|
Mon Aug 13 09:57:27 2007|NONE|cs_inquiries|SIP/1405|UNPAUSE|

(the section with the ellipsis consists of calls, then pauseall, pausereason, unpauseall)

I've scrutinized the extension examples that come with QM 1.4.0, and the only thing I seem to be doing differently is that my PAUSEREASON lines do not have a uniqueid in them.  But I can't see how this would cause sessions to be completely duplicated.

I do notice that when each session gets duplicated, one shows the correct number of pauses, whereas the other one shows zero pauses.

Can you suggest how to diagnose this?  It's making my reports useless, as the agent availability time and total agent time (which are important metrics for my users) is nearly double what it should be.

Thanks

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Problem with agent sessions being doubled up in reports
« Reply #1 on: August 16, 2007, 19:45:54 »
It does look like a bug. The queu_log looks correct.
Please contact Loway by email and send over a copy of your queue_log for debugging. Thank you!