[Home]

Summary:ASTERISK-24445: [patch] queuerules option penaltychange ignored with ringall strategy
Reporter:Toomas Vahtra (zpotoloom)Labels:patch
Date Opened:2014-10-22 15:21:13Date Closed:
Priority:MinorRegression?
Status:Open/NewComponents:Applications/app_queue
Versions:1.8.30.0 13.18.4 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:( 0) app_queue_debug_after_patching.txt
( 1) app_queue_debug_problem.txt
( 2) ringall_queuerules_fix-1.8.30.0-v2.patch
Description:With ringall strategy queuerules are not working properly

queues.config
{noformat}
[test_queue]
wrapuptime=1
timeout=10
joinempty=no
leavewhenempty=yes
strategy = ringall
ringinuse=no

member => SIP/1000,0
member => SIP/1001,1
{noformat}

queuerules.conf
{noformat}
[test_queue_rule]
penaltychange => 10,+1
{noformat}

extensions.conf
{noformat}
exten => 123,1,Answer()
same => n,Set(QUEUE_MIN_PENALTY=0)
same => n,Set(QUEUE_MAX_PENALTY=0)  
same => n,Queue(test_queue,,,,300,,,,test_queue_rule)
same => n,HangUp()
{noformat}

Only the first member is ringing, even after the penalty has changed.
And if first member is in call then the second member will start
ringing only when 10 seconds is passed and penalty increased.

Included the debug log for app_queue
Comments:By: Toomas Vahtra (zpotoloom) 2014-10-22 15:24:18.075-0500

possible patch added

By: Toomas Vahtra (zpotoloom) 2014-10-22 15:25:53.027-0500

After patching queue rules work with ringall strategy.

By: Toomas Vahtra (zpotoloom) 2014-10-27 09:24:19.628-0500

Changed the patch to re-use existing code instead of duplicating.

Still there's a issue that it needs to loop through every queue rule until it finds a free member in penalty range.

Should also cause a immediate refresh of the waiting loop also after increasing the penalty.

By: Rusty Newton (rnewton) 2014-11-04 16:13:26.765-0600

Thanks for the contribution [~zpotoloom] ! The next step in the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process] is probably to get your patch on Reviewboard for others to review and test. Once you have it up there, please edit this issue and add your Reviewboard URL in the Reviewboard field. Thanks!

By: Vadim Sherbakov (vinsik) 2015-01-14 01:53:52.827-0600

Patch seems to work fine. But one notice. If you do not set QUEUE_MAX_PENALTY and QUEUE_MIN_PENALTY values.
Asterisk channel will be locked and hanged some time. At least for my setup.

Anyway thanks to Toomas. Great work.

By: Vadim Sherbakov (vinsik) 2015-10-21 00:08:35.542-0500

I have noticed that this patch locks up asterisk after 2-3 queues with few queuers.
Is this the loop issue you are talking about?

Not ready for production servers.