Thanks for your response...
How easy would be that QM tracks PAUSE state also ? (is there any code I can patch for that?)
Unfortunately Asterisk only uses PAUSE in the specific queue, when the "autopause=yes" feature is used in queues.conf.
I think it would be easier to hack Queuemetrics than to hack Asterisk to write PAUSEALL in the log and mark as paused the agent in all queues (as in the command "PauseQueueMember").
I've been able to login/logoff an agent via the web interface with the following extensions in the quemetrics context:
[queuemetrics]
; 10: Dummy extension
exten => 10,1,Answer
exten => 10,n,Wait(10)
exten => 10,n,Hangup
; Agent logon
exten => 20,1,Answer
exten => 20,n,Set(COLA=${DB(COLA_AGENTE/${AGENTCODE})})
exten => 20,n,NoOp(** AƱadiendo ${AGENTCODE} a la cola ${COLA} via QM **)
exten => 20,n,AddQueueMember(${COLA},SIP/${AGENTCODE})
exten => 20,n,Hangup
; Agent logoff
exten => 21,1,Answer
exten => 21,n,Set(COLA=${DB(COLA_AGENTE/${AGENTCODE})})
exten => 21,n,NoOp(** Eliminando ${AGENTCODE} de la cola ${COLA} via QM **)
exten => 21,n,RemoveQueueMember(${COLA},SIP/${AGENTCODE})
exten => 21,n,Hangup
; Agent pause
exten => 22,1,Answer
exten => 22,n,NoOp(** Pausando ${AGENTCODE} en todas las colas via QM **)
exten => 22,n,PauseQueueMember(|SIP/${AGENTCODE})
exten => 22,n,Wait(2)
exten => 22,n,System( echo "${EPOCH}|${UNIQUEID}|NONE|SIP/${AGENTCODE}|PAUSEREASON|${PAUSEREASON}" >> /var/log/asterisk/queue_log )
exten => 22,n,Hangup
; Agent unpause
exten => 23,1,Answer
exten => 23,n,NoOp(** Despausando ${AGENTCODE} en todas las colas via QM **)
exten => 23,n,UnpauseQueueMember(|SIP/${AGENTCODE})
exten => 23,n,Wait(2)
exten => 23,n,Hangup
I use an AstDB for tracking the queue each agent belongs (I could use the extension field in the web interface for that, but as this never changes in my setup, I prefer to leave that empty and save some keystrokes to our agents).
And for the spanish translation, there are few words that sounds "funny" here from the L.A. version, so I'll update it and send it to you in case you want to include it in the distribution)...
Thanks for all,
David.