Module: kamailio
Branch: master
Commit: 4f51e4a960fe3df2c83b8c328c78a88818328223
URL:
https://github.com/kamailio/kamailio/commit/4f51e4a960fe3df2c83b8c328c78a88…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-05-20T22:01:12+02:00
modules: readme files regenerated - dispatcher ... [skip ci]
---
Modified: src/modules/dispatcher/README
---
Diff:
https://github.com/kamailio/kamailio/commit/4f51e4a960fe3df2c83b8c328c78a88…
Patch:
https://github.com/kamailio/kamailio/commit/4f51e4a960fe3df2c83b8c328c78a88…
---
diff --git a/src/modules/dispatcher/README b/src/modules/dispatcher/README
index 8621ba903c..3b9701aead 100644
--- a/src/modules/dispatcher/README
+++ b/src/modules/dispatcher/README
@@ -125,6 +125,7 @@ Federico Cabiddu
5.4. dispatcher.ping_active
5.5. dispatcher.add
5.6. dispatcher.remove
+ 5.7. dispatcher.hash
6. Installation and Running
@@ -276,6 +277,7 @@ Chapter 1. Admin Guide
5.4. dispatcher.ping_active
5.5. dispatcher.add
5.6. dispatcher.remove
+ 5.7. dispatcher.hash
6. Installation and Running
@@ -1453,6 +1455,7 @@ onreply_route {
5.4. dispatcher.ping_active
5.5. dispatcher.add
5.6. dispatcher.remove
+ 5.7. dispatcher.hash
5.1. dispatcher.set_state
@@ -1581,6 +1584,35 @@ kamcmd dispatcher.remove 2 sip:127.0.0.1:5080
kamcmd dispatcher.remove 3 sip:127.0.0.1:5075;transport=udp
...
+5.7. dispatcher.hash
+
+ 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: rpc dispatcher.hash _nslots_ _val1_ [_val2_]
+ rpc dispatcher.hash 0 alice
server.com
+ rpc dispatcher.hash 4 bob
server.com
+...
+
6. Installation and Running
6.1. Destination List File