Individual member status across multiple queues

Talk with others about developing applications for Switchvox

Moderators: bmdhacks, dpodolsky, tristand, jwitt, joshuas

Individual member status across multiple queues

Postby sterlingmarking » Fri Mar 02, 2012 5:15 pm

We have implemented a custom idle screen for our phones that displays how many queues a user is logged into out of how many they are a member of.

i.e. 1/3 Q

This is not something easily supported by the API and we've had to use caching to get acceptable performance, but even then it's not great. Here's our pseudo code solution:

Code: Select all
Iterate extensions
   make list of account_id's for queues
get member list for each queue
   cache relation for each user to the queues they belong to
refresh cache daily

on call to idle page
   get cached list of queue id's for the user
   iterate list and call switchvox.callQueues.getCurrentStatus() per queue
      iterate result and find the queue member making the request
         record their login status
   build response string


Iterating the extensions, and building the cache is slow but allows for better performance on the idle page, but even with that the calls to getCurrentStatus take a while (5-10 seconds each). Does anyone have a way to do this faster? Can i suggest a couple of optimized API methods to create this functionality:

switchvox.users.queues.getList - takes an extension account_id, and returns a list of account_id's of the queues this extension is a member of, including extension groups the user belongs to that are members.

switchvox.extensions.callQueues.memberStatus - takes an account_id for the queue, and account_id for the member, returns login status, login type (login vs. permanent), maybe member type (ext., ivr, ext. group, etc.) as well.

Thank you
Jesse Carlton
Systems Administrator
Sterling Marking Products Inc.
sterlingmarking
Oldsterisk
 
Posts: 99
Joined: Mon Mar 22, 2010 9:42 am
Location: London, Ontario

Re: Individual member status across multiple queues

Postby dpodolsky » Wed Mar 07, 2012 12:13 pm

Looks like you posted this right when we were rolling out 5.5 and our new APIs. Take a look at our new APIs we introduced in 5.5 for users and getting information about call queues. We implemented exactly the one you were asking for:

http://developers.digium.com/switchvox/wiki/index.php/Switchvox.users.callQueues.getList

Next you should check out our new Digium phones that have a new Queue App built into the phone. When you launch the queue app it gives you a list of all queues the user is a member of or has permissions for and shows the Login / Logout / Pause status for each queue, how many callers are waiting in the queue, and how many other members are logged in. On this screen you can also quickly login / logout / and pause any or all of these queues.

Wait there is more. You can then drill down into each queue, see statistics, see who is logged in, see how long members have been on a call, how long they have been on a call, what customers are waiting in the queue, and even more. You can pick which screen works for you and leave it as your idle screen and it will refresh every 30 seconds. All available with Switchvox 5.5 and the new Digium phones. I you want to try one out, just contact our sales department they will give you pricing and models.

I will work on posting some screenshots so you can see the queue app in action.
dpodolsky
Oldsterisk
 
Posts: 325
Joined: Thu Apr 23, 2009 2:35 pm

Re: Individual member status across multiple queues

Postby dpodolsky » Wed Mar 07, 2012 12:42 pm

dpodolsky
Oldsterisk
 
Posts: 325
Joined: Thu Apr 23, 2009 2:35 pm

Re: Individual member status across multiple queues

Postby sterlingmarking » Wed Mar 07, 2012 12:45 pm

This is interesting, but I have one problem with this API method. It specifically reports on permissions. So if a user is a member of a queue but does not have permission to act on it then the method does not this that queue in the response. Can this be corrected or another method added in the next hotfix?
Last edited by sterlingmarking on Wed Mar 07, 2012 1:19 pm, edited 1 time in total.
Jesse Carlton
Systems Administrator
Sterling Marking Products Inc.
sterlingmarking
Oldsterisk
 
Posts: 99
Joined: Mon Mar 22, 2010 9:42 am
Location: London, Ontario

Re: Individual member status across multiple queues

Postby dpodolsky » Wed Mar 07, 2012 12:56 pm

Yes, the listing is controlled by permission and this is how the feature was designed. This way the admin has the flexibility to display or hide queues for their users. For your queue members, if you want them to see all their queues then I would give them the lowest level of permission. This allows them to see the queue and login, logout and pause, but higher level features will not be available (callers waiting, overview) etc.
dpodolsky
Oldsterisk
 
Posts: 325
Joined: Thu Apr 23, 2009 2:35 pm

Re: Individual member status across multiple queues

Postby sterlingmarking » Wed Mar 07, 2012 1:30 pm

I can appreciate that however in this instance implementing the above feature with this method can lead to a loss of information and relies on proper management of permissions to be accurate.

Although I still feel a method to list a user's queue membership is helpful I did find a positive advance in the new API. The method switchvox.users.callQueues.getTodaysStatus returns a my_status object that reports the users' login status for the queue. It has a much better performance time than the previous switchvox.callQueues.getCurrentStatus method. The new pseudo code is:

Code: Select all
Iterate extensions
   make list of account_id's for queues
get member list for each queue
   cache relation for each user to the queues they belong to
refresh cache daily

on call to idle page
   get cached list of queue id's for the user
   iterate list and call switchvox.users.callQueues.getTodaysStatus() per queue with the id of the member making the request
      select my_status object from the response
         record their login status
   build response string
Jesse Carlton
Systems Administrator
Sterling Marking Products Inc.
sterlingmarking
Oldsterisk
 
Posts: 99
Joined: Mon Mar 22, 2010 9:42 am
Location: London, Ontario


Return to Switchvox Developers

Who is online

Users browsing this forum: No registered users and 3 guests