Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Asterisk - log agents into multiple queues with one code (simultaneously)

Posted on 2011-02-15
1
Medium Priority
?
1,623 Views
Last Modified: 2012-05-11
I have multiple queues in our Asterisk PBX system.  Is there a way to log the agents into/out of more than one queue at once?  Currently, an agent dials 701* to log into the main queue (701 is the queue number).  But with one code (e.g. 600*, whatever*) I want the agent to be present in multiple queues instead of logging into one, hanging up, dialing the next and logging in, etc.  Is this possible?
0
Comment
Question by:RareSeeds
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
RareSeeds earned 0 total points
ID: 35037324
Since no one has answered, I spent the time to figure it out myself.

PHPMyAdmin was not installed by default, so I yum installed it.  This gave access to the MySQL database for ease of configuration.  I added a new column to the queues_config table called 'qgroup'.  I assigned the same number (800 in my case) to all the queues I wanted to log into with one login.

Then I created a custom dialplan in extensions_custom.conf:

exten => 801,1,Answer
exten => 801,n,Set(QEXT1=${CALLERID(number)})
exten => 801,n,MYSQL(Connect connid localhost [USERNAME] [PASSWORD] asterisk)
exten => 801,n,MYSQL(Query resultid ${connid} SELECT\ DISTINCT\ 'extension'\ FROM\ 'queues_config'\ WHERE\ 'qgroup'\ =\ '800')
exten => 801,n,MYSQL(Fetch foundRow ${resultid} id)
exten => 801,n,GotoIf($["${foundRow}" = "1"]?7:9)
exten => 801,n,AddQueueMember(${id}|Local/${QEXT1}@from-internal/n)
exten => 801,n,Goto(5)
exten => 801,n,MYSQL(Clear ${resultid})
exten => 801,n,MYSQL(Disconnect ${connid})
exten => 801,n,Playback(agent-loginok)
exten => 801,n,Hangup

exten => 802,1,Answer
exten => 802,n,Set(QEXT1=${CALLERID(number)})
exten => 802,n,MYSQL(Connect connid localhost freepbx fpbx asterisk)
exten => 802,n,MYSQL(Query resultid ${connid} SELECT\ DISTINCT\ 'extension'\ FROM\ 'queues_config'\ WHERE\ 'qgroup'\ =\ '800')
exten => 802,n,MYSQL(Fetch foundRow ${resultid} id)
exten => 802,n,GotoIf($["${foundRow}" = "1"]?7:9)
exten => 802,n,RemoveQueueMember(${id}|Local/${QEXT1}@from-internal/n)
exten => 802,n,Goto(5)
exten => 802,n,MYSQL(Clear ${resultid})
exten => 802,n,MYSQL(Disconnect ${connid})
exten => 802,n,Playback(agent-loggedoff)
exten => 802,n,Hangup

This dialplan obtains the caller's extension number, searches queues_config for all queues assigned to qgroup 800 (which I had set previously), and fires an Asterisk command, "AddQueueMember" for each queue.  Now when a user picks up the phone and dials '801', this dialplan automatically logs that extension into all queues assigned to qgroup 800.  The removal process is the same when the extension dials '802'.

I actually went a lot further and put an entry field in the FreePBX interface so that queue groups can be assigned without the need for PHPMyAdmin or other MySQL interaction.  You could actually take this a lot further, but this worked well for me.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Transferring data across the virtual world became simpler but protecting it is becoming a real security challenge.  How to approach cyber security  in today's business world!
If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question