[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 10:10:26 CDT 2007


The following issue has been ASSIGNED. 
====================================================================== 
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:                     assigned
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 10:10 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.
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-11-07 10:10  file           Status                   new => assigned     
10-11-07 10:10  file           Assigned To               => putnopvut       
======================================================================




More information about the asterisk-bugs mailing list