Anthony
My understanding of hashing is that it provides pseudo-random
load-balancing. It's also possibly to do random load-balancing (using
rand()), but the benefit of using a hash is that the same input (RURI
user, Call-ID, From URI, etc) has predictable and repeatable results.
This, I imagine, would be useful in a non-transaction-stateful setup,
so that re-transmissions would necessarily be routed to the same
gateway to which the first request was routed.
Suppose you have two RURI users - Alice and Bob - and you have two
destinations. Suppose that md5 hashing is used (I don't know what's
actually used in kamailio, though). Then the hash of "Alice" is an
even number and the hash of "Bob" is an odd number. Suppose that the
algorithm for hashing is a simple modulo-two arithmetic (because there
are two destinations in the set). Then always calls to Alice will use
one destination and always calls to Bob will use the other. This can
be useful in some setups.
I suppose that if you want to route based on another parameter of the
RURI, then you might want multiple destination sets, and then you
might set up your own algorithm for choosing the destination set and
gateway for each request.
Does this make sense?
James
On Mon, 24 Oct 2022 at 15:23, Anthony Blandin
<anthony.blandin(a)airnity.com> wrote:
Hello,
I need to route SIP INVITE towards a specific node based on the MSISDN of the Request
URI.
I saw that the dispatcher module should be able to make this with the function
ds_select_dst and the algorithm “hash over request-URI user” but I don’t understand how
the routing is done if we can’t associate the request-URI user with the destination
address in the dispatcher DB.
Maybe my understanding of this module is wrong. Could you help me to achieve this?
Thanks
Anthony
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
sr-users(a)lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users