Asterisk Man
2011-Apr-26 08:14 UTC
[asterisk-users] How does wrandom strategy works with Queue?
Hi, wrandom strategy for Queue says...rings random interface, but uses the member's penalty as a weight when calculating their metric. So a member with penalty 0 will have a metric somewhere between 0 and 1000, and a member with penalty 1 will have a metric between 0 and 2000, and a member with penalty 2 will have a metric between 0 and 3000. Please note, if using this strategy, the member penalty is not the same as when using other queue strategies. It is ONLY used as a weight for calculating metric. Does it mean if a member with lower penalty is available, Queue will always send the call to that member? what if that member ignores the call(I am using X-lite as a member phone)? Should Queue ringback the same member or ring somebody else who has higher penalty and available? I tried this on Asterisk 1.8.0 and found different behaviors each time. First case it tried ringing the same lower penalty member no matter call was ignored or not. In another case it rang second member when lower penalty member ignored the call. Moreover,How does that matric get calculated and affect the behavior of ringing the member? Thanking you in advance... --AM -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110426/011ba1cf/attachment.htm>
Jeroen Eeuwes
2011-Apr-26 08:43 UTC
[asterisk-users] How does wrandom strategy works with Queue?
Hi AM,> I tried this on Asterisk 1.8.0 and found different behaviors each time.Isn't that part of the definition of "random"? If Asterisk would behave the same each time it wouldn't be random but predictable, I would say. AFAIK the metric just means that you get a higher or lower chance of being selected instead of being completely random. So instead of picking between person A or B choices it will choose between -let's say- 10 marbles. 3 of them are white and 7 of them are black. So black gets a higher chance of being selected. But it does not mean a white marble won't be selected. Best regards, Jeroen Eeuwes