I've been communicating with Lorenzo at Loway about this, but he appears to be tied up working on a new release, so I thought I'd see if anyone else is having the same issue and has come up with a solution.
We need to use dynamic logins where the agents hot desk and are able to choose which queues to login to.
I've posted previous questions regarding this and was directed to a solution that mimicked AgentCallBackLogin. I can't find this QM anoucment in this forum, but it can be found here:
http://groups.google.com/group/agentcallbacklogin-replacement/browse_thread/thread/f41defc702ab991b/e2446f0f679f85de#e2446f0f679f85de[edit] I found the forum post. http://forum.queuemetrics.com/index.php?topic=728.0[/edit]The following is the contents on an email I sent Lorenzo.
I've tested the proposed solution that you provided which
I found to have the following issues.
1) Instead of allowing the agent to choose which queue to
login to, it logs them into all queues that they are
statically assigned to, which defeats the main purpose of
dynamic logins.
2) It hard codes the agents in the extensions file which
duplicates what's already in agents.conf.
3) Hard coding the agent id's in the extensions file for
each queue is cumbersome because we have over 100 agents
and at least 4 queues.
4) The pause feature did not work in my tests.
5) The realtime monitor listed the call in “Calls being
processed:”, but never indicated that the call was
answered and did not remove the entry after the call
ended. It remained until the queue timeout period was
reached.
I also tested and am still using the solution provided here:
http://etel.wiki.oreilly.com/wiki/index.php/Asterisk_Queues_using_AddQueueMemberThis solution also had a few issues in the realtime monitor.
1) It paced 2 entries in “Agents currently logged in:”, one
showing the agent id and the other showing the agent name
in the “Agent” field (once they received their first
call).
2) The second entry, showing their name, was not removed
when they logged out.
3) It did not show the extension the user was logged into.
I am now testing a solution that merges these 2 approaches
so that our agents can authenticate against the
agents.conf file and choose which queue(s) to login to,
but this still has the #5 problem I listed for your
proposed solution.
Here is the relevant portion of the dialplan that I'm testing.
[utilities]
; Login
exten => 54,1,Set(QUEUEDST=test1\,test2)
exten => 54,n,Goto(agent-login,s,1)
; logout
exten => 55,1,Set(QUEUEDST=test1\,test2)
exten => 55,n,Goto(agent-logout,s,1)
[xagents]
exten => _X.,1,Set(realchan=${DB(agent/${EXTEN})})
exten => _X.,n,NoOP("Trying agent/${EXTEN} as ${realchan}")
exten => _X.,n,Dial(${realchan},60,tT)
exten => h,1,NoOp
[agent-login]
exten => s,1,Answer
; Give the user 2 tries to enter their agent ID
exten => s,n,Set(COUNTER=0)
exten => s,n(agent),Set(COUNTER=$[${COUNTER}+1])
exten => s,n,Read(agent,agent-user);
exten => s,n,GotoIf($["${AGENT(${agent}:password)}"!=""]?auth)
exten => s,n,ExecIf($[${COUNTER}<2],playback,agent-incorrect)
exten => s,n,ExecIf($[${COUNTER}<2],Goto,agent)
; Entered an invalid agentid 2 times, Playback an error beep and hangup.
exten => s,n,Playback(beeperr)
exten => s,n,Playback(sorry)
exten => s,n,Hangup
; Authenticate password against the agents.conf
exten => s,n(auth),Authenticate(${AGENT(${agent}:password)})
; Set vars to hold the agent2phone mapping
exten => s,n,Set(phone=${CUT(CUT(CHANNEL,-,1),/,2)})
exten => s,n,Set(DB(agent/${agent})=SIP/${phone})
exten => s,n,Set(DB(agent_byphone/${phone})=${agent})
; Add a queue_log entry simulating the AgentCallbackLogin application
exten => s,n,QueueLog(NONE,${UNIQUEID},Local/${agent}@xagents,AGENTCALLBACKLOGIN,${phone})
; Begin the loop for the queues, FIELDQTY will find how many queues we are passing in QUEUEDST delimited by a comma
exten => s,n,Set(i=1)
exten => s,n,While($[${i}<=${FIELDQTY(QUEUEDST,\,)}])
; For each Queue Record, split the name and penalty on a dash and set the variables.
exten => s,n,Set(ARRAY(CURRENT_QUEUE,PENALTY)=${CUT(CUT(QUEUEDST,\,,${i}),,1)},${CUT(CUT(QUEUEDST,\,,${i}),,2)})
exten => s,n,AddQueueMember(${CURRENT_QUEUE},Local/${agent}@xagents,${PENALTY},,${AGENT(${agent}:name)},SIP/${phone})
exten => s,n,Set(i=$[${i}+1])
exten => s,n,EndWhile
; We're only catching the last AddQueueMember status here.
exten => s,n,ExecIf($["${AQMSTATUS}"="NOSUCHQUEUE"],Playback,sorry&an-error-has-occured)
; If we are either ADDED or MEMBERALREADY playback the agent-loginok message..
exten => s,n,ExecIf($["${AQMSTATUS}"!="NOSUCHQUEUE"],Playback,agent-loginok)
exten => s,n,Hangup
[agent-logout]
exten => s,1,Answer
exten => s,n,Read(agent,agent-user)
exten => s,n,Set(chan=${DB(agent/${agent})})
exten => s,n,Set(DB(agent/${agent})=)
exten => s,n,Set(i=1)
exten => s,n,Set(SIP_EXTEN=${CUT(CUT(CHANNEL,-,1),/,2)})
exten => s,n,While($[${i}<=${FIELDQTY(QUEUEDST,\,)}])
exten => s,n,Set(CURRENT_QUEUE=${CUT(QUEUEDST,\,,${i})})
exten => s,n,RemoveQueueMember(${CURRENT_QUEUE},Local/${agent}@xagents)
exten => s,n,Set(i=$[${i}+1])
exten => s,n,EndWhile
exten => s,n,QueueLog(NONE,${UNIQUEID},Local/${agent}@xagents,AGENTCALLBACKLOGOFF)
exten => s,n,Playback(agent-loggedoff)
exten => s,n,Hangup
[agent-pause]
;-- pause: Pause the queue member from all queues. --;
exten => pause,1,Answer
exten => pause,n,PauseQueueMember(|Local/${CUT(CUT(CHANNEL,-,1),/,2)}@${AGENT_CONTEXT}/n)
exten => pause,n,NoOp(${PQMSTATUS})
; Play stutter tones. There is currently no stock voice file for this
exten => pause,n,PlayTones(!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440)
exten => pause,n,Wait(1.5)
exten => pause,n,Hangup
[agent-unpause]
;-- unpause: Unpase the queue member from all queues. --;
exten => unpause,1,Answer
exten => unpause,n,UnPauseQueueMember(|Local/${CUT(CUT(CHANNEL,-,1),/,2)}@${AGENT_CONTEXT}/n)
exten => unpause,n,NoOp(${UPQMSTATUS})
; Play short stutter tones, no stock voice file for this.
exten => unpause,n,PlayTones(!350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440)
exten => unpause,n,Wait(1.0)
exten => unpause,n,Hangup