diff --git a/src/modules/dispatcher/doc/dispatcher_admin.xml b/src/modules/dispatcher/doc/dispatcher_admin.xml index 30cd6a5ec1a..a255b2645d6 100644 --- a/src/modules/dispatcher/doc/dispatcher_admin.xml +++ b/src/modules/dispatcher/doc/dispatcher_admin.xml @@ -1960,6 +1960,46 @@ DEST: { &sercmd; dispatcher.remove 2 sip:127.0.0.1:5080 &sercmd; dispatcher.remove 3 sip:127.0.0.1:5075;transport=udp ... + + +
+ + <function moreinfo="none">dispatcher.hash</function> + + + Compute the hash id corresponding to the string parameter values. + + + Return the hash id and the corresponding slot, if 'nslots' parameter + is not 0. + + + Name: dispatcher.hash + + Parameters: + + _nslots_: number of slots + _val1_: string value + _val2_: (optional) string value + + + It can be useful to find what address in a destination group (setid) is + going to be used when hashing a value or a URI. For a URI, the + corresponding username and domain have to be provided as _val1_ and + _val2_. If the URI has a port different than 5060 (or 5061 for TLS), + then the _val2_ has to be 'domain:port'. The _nslots_ has to be the + number of addresses in the group (setid). The returned 'slot' value + represents the index of the address to be used for routing. + + + Example: + + +... +# prototype: &kamctl; rpc dispatcher.hash _nslots_ _val1_ [_val2_] +&kamctl; rpc dispatcher.hash 0 alice server.com +&kamctl; rpc dispatcher.hash 4 bob server.com +...