Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - perlmaster

Pages: [1]
1
Running QueueMetrics / AgentCallBackLogin-replacement
« on: February 17, 2010, 16:03:49 »
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_AddQueueMember

This 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.
Code: [Select]
[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


2
When the agent first logs in, the agent field shows the extension number.  When they receive their 1st call, a second entry is added displaying their full name.  When the agent logs out, the entry displaying the exten is removed, but the entry with their name remains until I restart asterisk

Why am I getting a second entry?

My goal is to have only 1 entry that displays their name and is removed at logoff.

I'm sure there's a simple fix, but I haven't found it.


This is the relevant section for their login:
Code: [Select]
exten => login,n,Set(SIP_EXTEN=${CUT(CUT(CHANNEL,-,1),/,2)})
exten => login,n,Set(DB(Agent/${SIP_EXTEN})=${AGENT(${AID}:name))  ; used later for constructing the MixMonitor filename
exten => login,n,AddQueueMember(${CURRENT_QUEUE},Local/${SIP_EXTEN}@${AGENT_CONTEXT}/n,${PENALTY},,${AGENT(${AID}:name)})

queue_log
Quote
1260288305|1260288299.13688|test1|Local/15031@iso/n|ADDMEMBER|
1260288924|1260288924.13703|test1|NONE|ENTERQUEUE||40842xxxxx
1260288926|1260288924.13703|test1|Ron Bergin|CONNECT|2|1260288924.13704
1260288982|1260288924.13703|test1|Ron Bergin|COMPLETECALLER|2|56|1
1260289229|1260289229.13707|test1|Local/15031@iso/n|REMOVEMEMBER|

.../WEB-INF/configuration.properties
Code: [Select]
default.rewriteLocalChannels=true
default.useEndingChannelName=true

If needed, I have print screens showing the problem, but I don't see an attachment button to include them in the post.

3
What is the best practice/approach to dynamically login agents (to multiple queues) AND have their real name show up in the 'Agent' field of Realtime Monitoring as is done when using AgentCallbackLogin?

I've done a little searching through the archives, and have seen a few similar questions, but haven't found a solution that fully meets my needs.

I'm running 2 call centers where agents can roam and login from any extension.

Asterisk 1.4.24  (preparing to upgrad to 1.6)
Queumetrics (2 installations) 1.5.1 and 1.5.4
mysql 4.1.20 (I know, it's a little old)

4
Currently I have an nfs mount on the QM box for our call center asterisk box, but we have 2 other asterisk boxes in the same office for our users and several others in remote locations.

What is the best/preferred method to have QM load the queue_log data file from each of the asterisk servers?

Pages: [1]