Re: [asterisk-users] Agent-Login/out in 1.6
Lenz Emilitri schrieb: > The main problem i see with thgis is that with "old-school" agents, you > could easily have association with multiple queues. And that was quite > useful. > 2009/5/16 David Anthony O Reilly >> 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. Logging into multiple queues seems perfectly doable to me, and we do that in Gemeinschaft (http://www.amooma.de/gemeinschaft/ , german). I'll try to quote the relevant parts from extensions.ael (https://svn.amooma.com/gemeinschaft/trunk/opt/gemeinschaft/etc/asterisk/e.ael): //- // Queue Login/Logout //- macro queue-login( queue ) { Set(CDR(amaflags)=OMIT); Answer(); Verbose(1,### User ${user_name} wants to log in to queue ${queue}); AGI(/opt/gemeinschaft/dialplan-scripts/queue-login-logout.agi,${user_name},${queue},login); if ("${agent_login_status}" = "loggedin") { // fake login for the statistics: QueueLog(NONE,${UNIQUEID},${CHANNEL(channeltype)}/${user_name},AGENTLOGIN,fake); } Verbose(1,### agent_login_status: ${agent_login_status}); Wait(0.5); if ("${agent_login_status}" = "loggedin" || "${agent_login_status}" = "alreadyon") { Playback(agent-loginok); } else { Playback(beeperr); } Hangup(); } macro queue-logout( queue ) { Set(CDR(amaflags)=OMIT); Answer(); Verbose(1,### User ${user_name} wants to log out from queue ${queue}); AGI(/opt/gemeinschaft/dialplan-scripts/queue-login-logout.agi,${user_name},${queue},logout); Wait(0.5); if ("${agent_login_status}" = "loggedout") { Playback(agent-loggedoff); } else { Playback(beeperr); } Hangup(); } macro queue-logout-all() { Set(CDR(amaflags)=OMIT); Answer(); Verbose(1,### User ${user_name} wants to log out from all queues); AGI(/opt/gemeinschaft/dialplan-scripts/queue-login-logout.agi,${user_name},0,logoutall); Wait(0.5); if ("${agent_login_status}" = "loggedout") { Playback(agent-loggedoff); } else { Playback(beeperr); } Hangup(); } macro queue-logout-all-silent() { // like &queue-logout-all() but silent Set(CDR(amaflags)=OMIT); Verbose(1,### User ${user_name} wants to log out from all queues); AGI(/opt/gemeinschaft/dialplan-scripts/queue-login-logout.agi,${user_name},0,logoutall); } context queues-login-logout { *5* => &queue-logout-all(); _*5. => &queue-login(${EXTEN:2}); //_*5.* => &queue-logout(${EXTEN:2}); // does not work _*5X* => &queue-logout(${EXTEN:2:-1}); _*5XX* => &queue-logout(${EXTEN:2:-1}); _*5XXX* => &queue-logout(${EXTEN:2:-1}); _*5* => &queue-logout(${EXTEN:2:-1}); _*5X* => &queue-logout(${EXTEN:2:-1}); _*5XX* => &queue-logout(${EXTEN:2:-1}); } Instead of ${user_name} you might want to use something like ${CALLERID(num)} if you don't use Gemeinschaft. The queue-login-logout.agi AGI script (https://svn.amooma.com/gemeinschaft/trunk/opt/gemeinschaft/dialplan-scripts/queue-login-logout.agi) inserts/removes the interface ("SIP/...") into/from the queue_members Realtime family which is stored in a MySQL database. Log in to a queue by dialing *5 e.g. *5300. You're not limited to only one queue at a time. Log out of a specific queue by dialing *5*. Log out of all queues by dialing *5*. Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de -- ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Agent-Login/out in 1.6
The main problem i see with thgis is that with "old-school" agents, you could easily have association with multiple queues. And that was quite useful. l. 2009/5/16 David Anthony O Reilly > 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(${agentnumb...@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${agentnumb...@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${agentnumb...@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: oreil...@tcd.ie/d...@student.cs.ucc.ie > Tel: +353 (0) 86 030 60 32 > _ > > ___ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > -- Loway - home of QueueMetrics - http://queuemetrics.com ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Agent-Login/out in 1.6
Where do you want to get the value that agent uses to validate? You can do your own code to do the validation. Get the value from where ever and then do a read and compare the value read with the value you retrieved from where ever. If there is match you are done if no match say error, maybe setup some counter and ask for value again. Or else use Authenticate(password[,options[,maxdigits]]): This application asks the caller to enter a given password in order to continue dialplan execution. If the password begins with the '/' character, it is interpreted as a file which contains a list of valid passwords, listed 1 password per line in the file. When using a database key, the value associated with the key can be anything. Users have three attempts to authenticate before the channel is hung up. Options: a - Set the channels' account code to the password that is entered d - Interpret the given path as database key, not a literal file m - Interpret the given path as a file which contains a list of account codes and password hashes delimited with ':', listed one per line in the file. When one of the passwords is matched, the channel will have its account code set to the corresponding account code in the file. r - Remove the database key upon successful entry (valid with 'd' only) maxdigits - maximum acceptable number of digits. Stops reading after maxdigits have been entered (without requiring the user to press the '#' key). Defaults to 0 - no limit - wait for the user press the '#' key. -- Jim Dickenson mailto:dicken...@cfmc.com CfMC http://www.cfmc.com/ From: David Anthony O Reilly Date: Sat, 16 May 2009 14:54:00 +0100 To: Cc: Subject: Agent-Login/out in 1.6 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(${agentnumb...@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${agentnumb...@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${agentnumb...@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: oreil...@tcd.ie / d...@student.cs.ucc.ie Tel: +353 (0) 86 030 60 32 _ ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Agent-Login/out in 1.6
David Anthony O Reilly wrote: > 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. I think the best solution is to either use an AGI script if agents should be able to login/logout through the phone, this allows you to store the agents in a database or any other external system. On the other hand many call centers use special applications for their agents and allow them to manage their availability through a GUI. Such applications can make use of the Manager API. They probably more convenient as they also allow to display additional information about the calls they handle and the queues they are subscribed to. =Stefan signature.asc Description: OpenPGP digital signature ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users