Author Topic: Extension column in Agent Table  (Read 8096 times)

tonils

  • Jr. Member
  • **
  • Posts: 54
  • Karma: 0
    • View Profile
    • Email
Extension column in Agent Table
« on: June 10, 2008, 10:53:13 »
How can I get QueueMetrics to populate the Extension column in the Agent Table of the Realtime page with the current extension of dynamic agents? I am useing AddQueueMember to add the agent to the queue.

I guess it will be information that needs to be logged in queue_log......

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Extension column in Agent Table
« Reply #1 on: June 11, 2008, 16:40:39 »
I think that the ADDMEMBER record does not provide that piece of information because you usually add something like SIP/123 or Local/456@agents, where the extension is implicit in the agent's name.

Why is this not OK to you? how is your setup?

tonils

  • Jr. Member
  • **
  • Posts: 54
  • Karma: 0
    • View Profile
    • Email
Re: Extension column in Agent Table
« Reply #2 on: June 12, 2008, 09:41:25 »
Correct, the ADDMEMBER (in standard asterisk) does not provide that, but I can make it.

Our call centres use the QueueMetrics "Log on" and "Log off" buttons to login to the queues. This provides a field for the extention number - which we use to support hot-desking. From time to time agents put the wrong thing in there. I would like what they put in there to show up on the RealTime screen.

I have put information into queue_log in an attempt to make QueueMetrics display the extension (e.g. update queue_log set data1="1234" where verb="ADDMEMBER"). After executing this, the Extension column is still blank.

I see this as an added piece of management information and would like to try and get it working.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Extension column in Agent Table
« Reply #3 on: June 13, 2008, 09:42:12 »
The problem with this is that the format of the ADDMEMBER verb is given by Asterisk, and we cannot change that (maybe they will use that field for
something else in the future).
One possible solution would be adding a new custom verb that is made to associate the logon/logoffs with the actual extension. If a few users are interested in that change, we can do it.

tonils

  • Jr. Member
  • **
  • Posts: 54
  • Karma: 0
    • View Profile
    • Email
Re: Extension column in Agent Table
« Reply #4 on: June 13, 2008, 10:04:12 »
That is not a problem for me. I have the skills to alter the asterisk code to add this information into queue_log.

What I am trying to find out is what do I need to add to get the information displayed. If I simulate (as per my previous post) adding the information to ADDMEMBER, it makes no difference to QueueMetrics.

Please can you tell me how to get the extention to display on the Realtime page.

QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Extension column in Agent Table
« Reply #5 on: June 14, 2008, 14:00:54 »
You cannot use ADDMEMBER verbs at all, but you must use AgentCallBackLogin (and make REMOVEMEBER as AgentCallBackLogoff)


tonils

  • Jr. Member
  • **
  • Posts: 54
  • Karma: 0
    • View Profile
    • Email
Re: Extension column in Agent Table
« Reply #6 on: June 17, 2008, 11:41:29 »
Excellect!!

So I have combined suggestions from page 127 and page 140 of your manual and rewritten queumetrics,20 and queuemetrics,21 along the following lines

Quote
; EXTEN 20
;  QueueMetrics Agent Login
;  This extension logs in a call-back agent. The variables AGENTCODE and
;  AGENT_EXT are defined. Please note that for this to work properly, there
;  must be no password set on the Asterisk agent.
exten => 20,1,NoOp(QM: Logging on Agent/${AGENTCODE} to extension ${AGENT_EXT})
exten => 20,n,Answer()

exten => 20,n,GotoIf($[x${AGENT_EXT} = x]?hangup)

exten => 20,n,Set(DB(QM/Agent/${AGENTCODE})=${AGENT_EXT})
exten => 20,n,Set(DB(QM/Exten/${AGENT_EXT})=${AGENTCODE})
exten => 20,n,Set(DB(QM/AgentLogin/${AGENTCODE})=${EPOCH})
exten => 20,n,QueueLog(NONE,${UNIQUEID},Agent/${AGENTCODE},AGENTCALLBACKLOGIN,SIP/${AGENT_EXT})

...

exten => 20,n(hangup),Hangup()

Quote
; EXTEN 21
;  QueueMetrics Agent logoff
;  This extension logs off an agent. The variable AGENTCODE is defined.
exten => 21,1,NoOp(QM: Logging off Agent/${AGENTCODE})
exten => 21,n,Answer()

...

exten => 21,n,Set(AGENTLOGIN=${DB(QM/AgentLogin/${AGENTCODE})})
exten => 21,n,GotoIf($[0${AGENTLOGIN}=0]?startnow)
exten => 21,n,Set(LOGONTIME=$[${EPOCH} - ${AGENTLOGIN}])
exten => 21,n,Goto(logagentoff)
exten => 21,n(startnow),Set(LOGONTIME=0)
exten => 21,n(logagentoff),QueueLog(${QUEUENUMBER},${UNIQUEID},Agent/${AGENTCODE},AGENTCALLBACKLOGOFF,SIP/${DB(QM/Agent/${AGENTCODE})},${LOGONTIME},0)

exten => 21,n,DBDel(QM/Exten/${DB(QM/Agent/${AGENTCODE})})
exten => 21,n,DBDel(QM/Agent/${AGENTCODE})

exten => 21,n,MYSQL(Disconnect ${connid})
exten => 21,n,Hangup()


QueueMetrics

  • Loway
  • Hero Member
  • *
  • Posts: 2999
  • Karma: 39
    • View Profile
    • QueueMetrics
Re: Extension column in Agent Table
« Reply #7 on: June 17, 2008, 16:26:03 »
Way cool!  :D