Hi Stanisław,
That is the point in what you are saying..Please open a bug report on
the tracker and assign it to me - I will take a look on the issue.
Best regards,
Bogdan
Stanisław Pitucha wrote:
----- "Bogdan-Andrei Iancu"
<bogdan(a)voice-system.ro> wrote:
OpenSER it is not ignoring the weights - the
received records are
ordered by weight. The tricky question is about records with the same
weight - which to be used? openser is right now using the first
returned
by the DNS server.
Ok - maybe I should expand that a bit:
It's not disallowed behaviour, but rfc2782 specifies standard way for handling
weights and sip protocol doesn't really need other handling afaik:
--->8--- from
http://www.faqs.org/rfcs/rfc2782.html ---
The following algorithm SHOULD be used to order the SRV RRs of the same priority:
To select a target to be contacted next, arrange all SRV RRs (that have not been ordered
yet) in any order, except that all those with weight 0 are placed at the beginning of the
list.
Compute the sum of the weights of those RRs, and with each RR associate the running sum
in the selected order. Then choose a uniform random number between 0 and the sum computed
(inclusive), and select the RR whose running sum value is the first in the selected order
which is greater than or equal to the random number selected.
--->8---
So even if they have same weight: server1=50 and server2=50, openser should get random
number X between 0 and 100 and select server1 for X<=50, or server2 for X>50.
Currently openser is not using SRV records correctly imho - it's client
responsibility to get all those RRs and select one of them randomly from all servers with
selected priority (whether they have same weight or not).
Please correct me if I'm wrong.
Cheers,
Stan
_______________________________________________
Users mailing list
Users(a)lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users