Browse code

modules: readme files regenerated - dispatcher ... [skip ci]

Kamailio Dev authored on 20/05/2020 20:01:12
Showing 1 changed files
... ...
@@ -125,6 +125,7 @@ Federico Cabiddu
125 125
               5.4. dispatcher.ping_active
126 126
               5.5. dispatcher.add
127 127
               5.6. dispatcher.remove
128
+              5.7. dispatcher.hash
128 129
 
129 130
         6. Installation and Running
130 131
 
... ...
@@ -276,6 +277,7 @@ Chapter 1. Admin Guide
276 276
         5.4. dispatcher.ping_active
277 277
         5.5. dispatcher.add
278 278
         5.6. dispatcher.remove
279
+        5.7. dispatcher.hash
279 280
 
280 281
    6. Installation and Running
281 282
 
... ...
@@ -1453,6 +1455,7 @@ onreply_route {
1453 1453
    5.4. dispatcher.ping_active
1454 1454
    5.5. dispatcher.add
1455 1455
    5.6. dispatcher.remove
1456
+   5.7. dispatcher.hash
1456 1457
 
1457 1458
 5.1.  dispatcher.set_state
1458 1459
 
... ...
@@ -1581,6 +1584,35 @@ kamcmd dispatcher.remove 2 sip:127.0.0.1:5080
1581 1581
 kamcmd dispatcher.remove 3 sip:127.0.0.1:5075;transport=udp
1582 1582
 ...
1583 1583
 
1584
+5.7.  dispatcher.hash
1585
+
1586
+   Compute the hash id corresponding to the string parameter values.
1587
+
1588
+   Return the hash id and the corresponding slot, if 'nslots' parameter is
1589
+   not 0.
1590
+
1591
+   Name: dispatcher.hash
1592
+
1593
+   Parameters:
1594
+     * _nslots_: number of slots
1595
+     * _val1_: string value
1596
+     * _val2_: (optional) string value
1597
+
1598
+   It can be useful to find what address in a destination group (setid) is
1599
+   going to be used when hashing a value or a URI. For a URI, the
1600
+   corresponding username and domain have to be provided as _val1_ and
1601
+   _val2_. If the URI has a port different than 5060 (or 5061 for TLS),
1602
+   then the _val2_ has to be 'domain:port'. The _nslots_ has to be the
1603
+   number of addresses in the group (setid). The returned 'slot' value
1604
+   represents the index of the address to be used for routing.
1605
+
1606
+   Example:
1607
+...
1608
+# prototype:  rpc dispatcher.hash _nslots_ _val1_ [_val2_]
1609
+ rpc dispatcher.hash 0 alice server.com
1610
+ rpc dispatcher.hash 4 bob server.com
1611
+...
1612
+
1584 1613
 6. Installation and Running
1585 1614
 
1586 1615
    6.1. Destination List File