To Gurus/Developers - How does the queue member Penalty work? I am a bit confused. Clarification needed on Changeset 8786

Hi Everyone,

I have a bit trouble understand the penalties in Dynamic Members part of the Queue and they don’t seem to work for me. There is a patch for this but that patch is from 9 months ago and I am running Queue version 2.7.0.6 which is the latest model based on my Module Update for Queues.

Patch Talked here:
http://www.freepbx.org/v2/ticket/2085

Patch Fixed Here:
http://www.freepbx.org/v2/changeset/8786

I don’t want to get down into the code and make those changes as I am assuming that the change has already been implemented.

I have included extensions 360-364 in the Dynamic Members section in this order:

360,0
361,5
362,5
363,5
364,5

I have my ring strategy set to “Leastrecent” (which in itself is so confusing to me) and when I receive calls if the turn is to ring Ext. 360 based on the Leastrecent strategy it still calls Extension 360 but it should not because 360 has the lowest priority.

What I want for Leastrecent strategy to do is to only hit agent 360 when all of the agent 361, 362, 363, and 364 are busy on a call or not available.

Am I wrong with my assumptions of how Leastrecent and Penalty should work?

My agents login to queues using the button on the phone with this order:

exten => s,n,AddQueueMember(500|Local/${CALLERID(num)}@from-internal/n)

^^^ Where 500 is the English Queue.

I am also thinking if the way I login is the problem because when agents do login and I do a Queue Show I do not see any priorities attached to the extension number.

Thanks

I just tested on 2.8 which is what I am running and it works fine.

Can someone else running 2.7 confirm whether they see this working or not?

Thanks for the input again. Yes, I am not seeing the agent pick up the penalty automatically form the Dynamic Member section of the GUI. I guess this can make for a bug.

preloading those two modules is to make sure that when you first start Asterisk, agent states work. Otherwise, they don’t work until the first reload and not working would make penalties not work properly either since it does not know if the agents are in use or not.

As far as the lack of the penalty at the end, if it is not present then it defaults to 1. Earlier versions of FreePBX did not allow penalties to be set for dynamic agents so it was always 1. The ability to add penalties to agents was added only recently and only if you define those agents as dynamic agents in the GUI and then at the time they login they should have the penalty assigned to them that is specified in the GUI. (So if you aren’t seeing that happen then something is not right somewhere because it does work, at least usually :slight_smile:

So, I don’t see this in the modules.conf:

preload => pbx_config.so
preload => chan_local.so

However, if I change my dial-plan from:
exten => 123,n,AddQueueMember(500|Local/${CALLERID(num)}@from-internal/n)

To:
exten => 123,n,AddQueueMember(500|Local/${CALLERID(num)}@from-internal/n|1)

Then it the priority works.

Can you please specify what the pbx_config.so and chan_local.so does? Our agents just press a key on the phone and that key is assigned Speed-Dial 123.

Agent are not used to using ** or any other method that Queues allow logging in. This is done to avoid confusion and to have easy login and logout from the phone set buttons.

So, again I doubt that Queue penalty would be added unless I add that |1 at the end of the dial-plan. Unless the two .so files that you noted would make a difference.

P.S. Adding the two .so lines like you suggested broke the Queues totally as on the CLI doing a “queue show” returned “No such command”

Thanks

just check the CLI when you login to your queue, and see if it is executing the instruction properly with the proper penalty as configured in the GUI.

If not, then maybe there is a bug and you will have some good data to file a ticket. If it is correct (which I am pretty sure it is but…) then you need to further determine if either you understand what they should do or are otherwise testing properly.

One thing I would suggest, do your testing with static agents first to make sure you get to a point that you understand how the ring strategies and penalties should work. Then move on to dynamic.

Also, at the CLI type “show queue nnn” (nnn is your queue). Check to make sure the status of the Queue Members are even available as there are some configuration settings that, if set wrong, can end up with bogus information that would probably affect this.

I believe one of these relates to making sure you have the following in your modules.conf file:

;
; As FreePBX is using Local as the channel for queue members we need to make sure
; that pbx_config.so and chan_local.so are preloaded. If not, queue members
; will be marked as invalid until app_queue is reloaded. 
preload => pbx_config.so
preload => chan_local.so

It seems that my dial-plan should include the priority and apparently any Agent added in the Dynamic section really doesn’t make any different unless the ** is used to login or maybe some other method of logging in.

I doubt the priorites are dependent of the Asterisk version. They are core features that work and worked from version 1.2 onwards. I see this as a FreePBX GUI shortfall at this point. The process I explained is what I did unless you see a wrong step there I don’t think it’s not done right.

Thanks

It works as I have described. I don’t know what 1.4 version of Asterisk you are running, it’s always possible that it could be broken in a version of Asterisk though I suspect more likely it is working but you may not be testing it right.

p_lindheimer, thanks for the input.

Can you confirm what you said works for penalties? Because I tried and penalties doesn’t work period with any ring strategy. I am trying that on the latest FreePBX module for Queues that I mentioned in my post and using Asterisk 1.4x (it’s a PBXinaFLASH flavor) - I really need someone to confirm it works. I have read the documentation and my take is just like your take but it seems to not work.

Please see my post as I have detailed how do the login and agents are setup so the penalties should work somehow right?!

Thanks again

Penalties in Asterisk are very confusing and unfortunately, they don’t work the way most of us would like them to work.

The basic idea in Asterisk for penalties is as follows. If ALL the agents at the lowest penalty are busy, only then will the queue escalate to the next penalty. That mean if there is even one agent who is logged in but away from their desk, and thus their phone shows as available, it will never try agents at a higher penalty level.

As far as how the ring strategies work, they can be a bit confusing. You can read the tool tips for a general overview, or check the Asterisk documentation to see if it can better clarify things.