Queue weights vs. Queue priorities



FreePBX version 2.5 seems to be coming along real nicely and hopefully will be out of beta any day minute now, with way over 500(!) bug fixes and closed tickets, and an elephant load of cool new features. A big tip of the hat to Philippe Lindheimer, the FreePBX projects leader, under who’s leadership (and hard work) this great milestone has been achieved. The Chinese are fond of saying "An army of a thousand is easy to find, but, ah, how difficult to find a general." How true! Without Philippe’s guidance and unique vision of the project, it would probably long be covered in moldy green with every release bumping the bug to feature ratio by 3:.001. Thank you Philippe for making FreePBX what it is!

Lets have a look at two new cool features in FreePBX 2.5: Queue weights and Queue priorities. We’ll start with the Queue priorities module. Queue priorities essentially allows you to give a call a greater priority in a queue. Think of it as the First Class check-in counter – only your standing in the same line as the ‘commoners’. Once you mark a caller with higher priority, their position in the queue is automatically promoted – so that their call gets answered quicker than the others. To illustrate: if Jack is waiting in a queue with priority 1 and Jill comes along at priority 10 – who do you think is going to be answered first? Being that Jill is the holder of a First Class ticket – she will be answered first even if Jack is holding for a longer time! Neat, eh? Now add Jake, holding ‘only’ a business class ticket – say with priority 5, where will he go? Being that he is the second highest priority he will be second in our example – after Jill (10) but before Jack (0).

Queue weights does something similar only in reverse. It gives the queue a priority (called a weight) versus the other queues. If that sounds confusing, then try this: imagine, back to our airport, that instead of all the people standing at one check-in counter there are three counters – one for first class, one for business class, and one for the rest of us. Unfortunately, all the people that usually man the counters ran off to the OTTS, and only Sally stayed on to check in the passengers. So now we have people waiting in three different lines and Sally needs to decide whom to check in first. As I’m sure you guessed, Sally will first check-in those waiting at the first class counter as they have the highest weight, or importance to Sally and her self centered, money hungry, step-on-the-little-guys enterprise).

Another application of call weights (and I bet this one will hit a bit closer to home): the small business. I’m talking about the (more or less) one man business where the sales guy is also the janitor, the CEO is also the secretary, and the technician is also the delivery man. And all three are one and the same guy. But in order to give the big company appearance, you set up a PBX with fancyshmancy stuff like ivr’s and queues and music on hold. (Yes you! C’mon, don’t look at me like that – you know that’s what got the geek in you attracted to asterisk in the first place…). Anyway so your sales/management/technical/maintenance/logistic team (aka you) have all your phone(s) logged in to the different queues. Obviously its business (sales) before pleasure (nothing like pulling an allnighter trying to fiddle with that new linux app that you got off some guy on IRC, trying to impress an old client), and you want to receive the calls in the sales queue before those in the technical assistance queue. This is where call weights comes in to the picture: you can set the weight of the sales queue to be higher than that of the technical support queue, and, like the magic that asterisk is, callers in the sales queue will always come out ahead of the callers in the technical queue (you should of never logged in to that one to begin with anyway – its usually full of annoying clients who need help after trying to "fix" their system).

Truth is, in that last example, you could do exactly the same thing with queue priorities – give the people calling for sales a higher priority (vs. giving the queue a higher weight). But being the geek that you are, you want to impress your family and friends’ clients by announcing their estimated hold time – and position in the queue. Now what happens if you have a caller that was already told that they are next in line and someone with a higher priority call comes in? You guessed it – grandma gets pushed to the back of line in favor of your basket-ball buddy! Granny will be kinda pissed when she hears that she is now number two in the queue. So you need to know you environment before deciding which strategies to take.

That’s not to say that Queue Priorities doesn’t have merits of its own. When that little mom and pop, garage based business grows up and becomes Google or HP (hey – you can do it!) and you have a large call center with different departments, there will often be a situation where after talking to someone in department X the caller will be transferred over to someone in department Y. But being that they already waited in the queue for dept. X its only fair that they shouldn’t have to wait again. This is a very practical application of Queue Priorities: the guy in dept. X transfers the caller to a destination that sets their priority higher in the Y queue, so that they get answered right away, and don’t have to wait again.

Two more points: you might be wondering what happens when two or more callers enter a queue at a higher priority? All the people at a given priority get treated just like people usually get treated in a queue, first come first server (fifo), so that all the people at, say, priority 10 will have their calls answered (again fifo), and then people at priority 5, and so on. Last but not least, we previously mentioned the lines at the airport. In the UK people call those a queue (as in "I’m standing in the queue"). But you already knew that.

Moshe Brevda, FreePBX Development Team
lazytt – FreePBX forums
hi365 – IRC

Share this Blogpost

Start the Discussion

Sign up for our Newsletter

Scroll to Top