<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Uh, I'm just a bystander looking at this, and it seems that the code and <br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">explanation would be a lot simpler if the weights are just proportional.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Given n weights (w), <br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">                              for i=1 to n: SUM w[i] = total weight<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">proportional: Pw[i]  =   w[i] / total weight<br><br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">so, if you have two weights, 10 and 10, then Pw[1] = .5 and Pw[2] = .5<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">if they are 180 and 180, Pw[1] = .5  and Pw[2] = .5<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Pw values vary from 0 to 1. They should always add up to 1. Multiply by<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">100 if you want.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">No conditionals, no special cases (as long as no w[i] == 0, everything<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">should be OK). (or, as long as at least 1 w[i] != 0).<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Right?<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">                          <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 13, 2014 at 12:02 AM, Olle E. Johansson <span dir="ltr"><<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On 12 Dec 2014, at 10:49, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br>
<br>
><br>
> On 11/12/14 16:29, Ovidiu Sas wrote:<br>
>> Also 'weight' attribute is not fully documented.  There are missing<br>
>> examples and details about how it works.<br>
>> IIRC, the sum of all weights must be 100, otherwise strange things happens.<br>
><br>
> Can you give some examples of such strange things, because otherwise it<br>
> is impossible to guess where to look for.<br>
</span>THe weight option is really not documented well. Maybe we should start<br>
with documenting how it works. The source code has no comments and no<br>
explanations. It does some randomizing and other cool stuff to perform its<br>
magic - but can we please get an explanation?<br>
<span class="HOEnZb"><font color="#888888"><br>
/O<br>
</font></span><div class="HOEnZb"><div class="h5">><br>
> Daniel<br>
><br>
>><br>
>> On Thu, Dec 11, 2014 at 10:18 AM, Olle E. Johansson <<a href="mailto:oej@edvina.net">oej@edvina.net</a>> wrote:<br>
>>> On 11 Dec 2014, at 16:15, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br>
>>><br>
>>>> Hello,<br>
>>>><br>
>>>> it is supposed to be the upper limit for call load distribution -- if<br>
>>>> number of active calls gets to it, no new call should be sent there. If<br>
>>>> not implemented, then I forgot about it.<br>
>>> I think there's a risc that your latest statement is true. If so, this is a gentle<br>
>>> reminder ;-)<br>
>>><br>
>>> /O<br>
>>>> Cheers,<br>
>>>> Daniel<br>
>>>><br>
>>>> On 11/12/14 15:41, Olle E. Johansson wrote:<br>
>>>>> Hi!<br>
>>>>><br>
>>>>> In the source code for dispatcher there is parsing of a predefined attribute called "maxload".<br>
>>>>><br>
>>>>> It's not documented and I don't see it used anywhere in the source code. Only in output of<br>
>>>>> attributes and debug code.<br>
>>>>><br>
>>>>> Anyone that knows more? Can we remove this unused attribute or is it planned for future glory?<br>
>>>>><br>
>>>>> /O<br>
>>>>> _______________________________________________<br>
>>>>> sr-dev mailing list<br>
>>>>> <a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
>>>>> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
>>>> --<br>
>>>> Daniel-Constantin Mierla<br>
>>>> <a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> sr-dev mailing list<br>
>>>> <a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
>>>> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
>>><br>
>>> _______________________________________________<br>
>>> sr-dev mailing list<br>
>>> <a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
>>> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
>><br>
>><br>
><br>
> --<br>
> Daniel-Constantin Mierla<br>
> <a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><br>
><br>
><br>
> _______________________________________________<br>
> sr-dev mailing list<br>
> <a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
> <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
<br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</div></div></blockquote></div><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><br>Steve Murphy<br>ParseTree Corporation<br>57 Lane 17<br>Cody, WY 82414<br>✉  murf at parsetree dot com<br>☎ 307-899-5535<br><br><br></div></div>
</div>