[asterisk-users] Agent-Login/out in 1.6
David Anthony O Reilly
oreillda at tcd.ie
Sat May 16 08:54:00 CDT 2009
Hi Jim
Thanks for your code!! I see you use the Voicemail system to authenticate,
have you ever managed to avoid that as I don't use voicemail at all and I am
thinking if I use that solution I will need to set up a voicemail for all
the queue members just to get them to log in.
hehe What were the developers thinking by removing the old system! It worked
perfect!! and by the looks of it nobody has ever recovered from the command
removal unless they hack around with the voicemail system.
Hopefully somebody out there has managed to create an agent login/logout
without bringing voicemail into it???? If I find a way I will let you and
post a wiki on it as I am sure loads of people have this problem.
Thanks
Dave
; #### Agent login logout ####
exten => *20,1,Answer()
exten => *20,n,wait(.0.5)
exten => *20,n,Read(AgentNumber,agent-user)
exten => *20,n,Set(UserID=${DB(ExtenToUser/${AgentNumber})})
exten => *20,n,GotoIf($["${UserID}"=""]?NOUSER)
exten => *20,n,Set(AgentStatus=${DB(users/${UserID}/AgentStatus)})
exten => *20,n,GotoIf($["${AgentStatus}"="1"]?VERIFY)
exten => *20,n,GotoIf($["${AgentStatus}"="2"]?VERIFY)
exten => *20,n(NOUSER),Playback(cfmc/bad-agent)
exten => *20,n,Playback(vm-goodbye)
exten => *20,n,Hangup()
exten => *20,n(VERIFY),VMAuthenticate(${AgentNumber}@ourvm)
exten => *20,n,GotoIf($["${AgentStatus}"="2"]?AGENTOFF)
exten => *20,n,Set(DB(users/${UserID}/AgentStatus)=2)
exten => *20,n,Set(DB(users/${UserID}/AgentDevice)=${CUT(CHANNEL,-,1)})
exten =>
*20,n,AddQueueMember(support,Local/Queue${AgentNumber}@ansqueue,,,,${CUT(CHA
NNEL,-,1)})
; AQMSTATUS can be ADDED | MEMBERALREADY | NOSUCHQUEUE
exten => *20,n,Playback(agent-loginok)
exten => *20,n,Verbose(2,Agent ${AgentNumber} added
${DB(users/${UserID}/AgentDevice)})
exten => *20,n,HangUp()
exten => *20,n(AGENTOFF),Set(DB(users/${UserID}/AgentStatus)=1)
exten => *20,n,Set(OldVal=${DB_DELETE(users/${UserID}/AgentDevice)})
exten => *20,n,RemoveQueueMember(support,Local/Queue${AgentNumber}@ansqueue)
exten => *20,n,Playback(agent-loggedoff)
exten => *20,n,Verbose(2,Agent ${AgentNumber} removed)
exten => *20,n,Hangup()"
--
_________________________________________
Mr. David Anthony O'Reilly, B.Sc Comp (Hons)
M.Sc MOB Postgraduate @ University College Cork, Ireland - M.Sc (Mob) - 2009
Computer Science Graduate of The University of Dublin, Trinity College -
B.Sc (Comp) 2008
Email: oreillda at tcd.ie / dor3 at student.cs.ucc.ie
Tel: +353 (0) 86 030 60 32
_________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090516/5a28fe3d/attachment.htm
More information about the asterisk-users
mailing list