[asterisk-bugs] [Asterisk 0010942]: [PATCH] Add a new queue strategy: weighted random (wrandom)
noreply at bugs.digium.com
noreply at bugs.digium.com
Thu Oct 11 18:00:44 CDT 2007
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=10942
======================================================================
Reported By: julianjm
Assigned To: putnopvut
======================================================================
Project: Asterisk
Issue ID: 10942
Category: Applications/app_queue
Reproducibility: N/A
Severity: feature
Priority: normal
Status: ready for testing
Asterisk Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): 1.4
SVN Revision (number only!): 85355
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 10-10-2007 17:43 CDT
Last Modified: 10-11-2007 18:00 CDT
======================================================================
Summary: [PATCH] Add a new queue strategy: weighted random
(wrandom)
Description:
Random strategy, but using penaly as a weight. Basically, the higher the
penalty, the less probability to receive calls from the queue.
[600]
strategy=wrandom
member=SIP/100,0
member=SIP/101,1
member=SIP/102,2
When calculating the metric for each round, we use this formula:
metric=ast_random() % ((penalty+1)*1000)
penalty 0 => metric between 0 and 999
penalty 1 => metric between 0 and 1999
penalty 2 => metric between 0 and 2999
The member with lower metric gets the next call.
======================================================================
----------------------------------------------------------------------
putnopvut - 10-11-07 18:00
----------------------------------------------------------------------
Awesome! Thank you very much!
Issue History
Date Modified Username Field Change
======================================================================
10-11-07 18:00 putnopvut Note Added: 0071849
======================================================================
More information about the asterisk-bugs
mailing list