3
« on: August 25, 2009, 19:06:19 »
We use a custom extension to "mass-login" our dynamic agents to two dozen separate queues. We are using Elastix 1.5. Here is a snippit from the macro:
[macro-mass-agent-add]
;add lines as needed for additional queue numbers
exten => s,1,Wait(1)
exten => s,n,Macro(user-callerid,SKIPTTL)
exten => s,n(a3),Read(CALLBACKNUM,agent-login,,,,)
exten => s,n,GotoIf($["${CALLBACKNUM}" != ""]?a7)
exten => s,n(a5),Set(CALLBACKNUM=${AMPUSER})
exten => s,n,ExecIf($["${CALLBACKNUM}" = ""],Set,CALLBACKNUM=${CALLERID(number)})
exten => s,n,GotoIf($["${CALLBACKNUM}" = ""]?a3)
exten => s,n(a7),GotoIf($["${CALLBACKNUM}" = "${ARG1}"]?invalid)
exten => s,n,ExecIf($["${QREGEX}" != ""],GotoIf,$["${REGEX("${QREGEX}" ${CALLBACKNUM})}" = "0"]?invalid)
exten => s,n,ExecIf($["${ARG2}" != ""],Authenticate,${ARG2})
exten => s,n(a9),AddQueueMember(7101,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(7102,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(7103,Local/${CALLBACKNUM}@from-internal/n)
exten => s,n,AddQueueMember(7104,Local/${CALLBACKNUM}@from-internal/n)
{SNIP}
exten => s,n,AddQueueMember(7031,Local/${CALLBACKNUM}@from-internal/n,10)
exten => s,n,AddQueueMember(7032,Local/${CALLBACKNUM}@from-internal/n,10)
exten => s,n,AddQueueMember(7033,Local/${CALLBACKNUM}@from-internal/n,10)
exten => s,n,AddQueueMember(7034,Local/${CALLBACKNUM}@from-internal/n,10)
exten => s,n,AddQueueMember(7035,Local/${CALLBACKNUM}@from-internal/n,10)
exten => s,n,UserEvent(Agentlogin,Agent: ${CALLBACKNUM})
exten => s,n,Wait(1)
exten => s,n,Playback(agent-loginok&with&extension)
exten => s,n,SayDigits(${CALLBACKNUM})
exten => s,n,Hangup
exten => s,n,MacroExit()
exten => s,n(invalid),Playback(pbx-invalid)
exten => s,n,Goto(a3)
; end of [macro-mass-agent-add]
There are a lot more lines than that, but I am hoping this much will be sufficient.
The first question is, "Do I need a log entry to queue_log for each queue login, or just one as a log of the mass-login?
The other question is, "How do I get this to log properly for QueueMetrics?"