Browse code

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

Kamailio Dev authored on 14/09/2021 06:46:23
Showing 1 changed files
... ...
@@ -113,9 +113,10 @@ Federico Cabiddu
113 113
               4.9. ds_mark_dst([state])
114 114
               4.10. ds_list_exists(groupid)
115 115
               4.11. ds_is_from_list([groupid [, mode [, uri] ] ])
116
-              4.12. ds_load_update()
117
-              4.13. ds_load_unset()
118
-              4.14. ds_reload()
116
+              4.12. ds_is_active(groupid [, uri])
117
+              4.13. ds_load_update()
118
+              4.14. ds_load_unset()
119
+              4.15. ds_reload()
119 120
 
120 121
         5. RPC Commands
121 122
 
... ...
@@ -197,9 +198,10 @@ Federico Cabiddu
197 198
    1.49. ds_mark_dst usage
198 199
    1.50. ds_list_exists usage
199 200
    1.51. ds_is_from_list usage
200
-   1.52. ds_load_unset usage
201
-   1.53. dispatcher list file
202
-   1.54. Kamailio config script - sample dispatcher usage
201
+   1.52. ds_is_active usage
202
+   1.53. ds_load_unset usage
203
+   1.54. dispatcher list file
204
+   1.55. Kamailio config script - sample dispatcher usage
203 205
 
204 206
 Chapter 1. Admin Guide
205 207
 
... ...
@@ -267,9 +269,10 @@ Chapter 1. Admin Guide
267 269
         4.9. ds_mark_dst([state])
268 270
         4.10. ds_list_exists(groupid)
269 271
         4.11. ds_is_from_list([groupid [, mode [, uri] ] ])
270
-        4.12. ds_load_update()
271
-        4.13. ds_load_unset()
272
-        4.14. ds_reload()
272
+        4.12. ds_is_active(groupid [, uri])
273
+        4.13. ds_load_update()
274
+        4.14. ds_load_unset()
275
+        4.15. ds_reload()
273 276
 
274 277
    5. RPC Commands
275 278
 
... ...
@@ -1025,9 +1028,10 @@ modparam("dispatcher", "reload_delta", 1)
1025 1028
    4.9. ds_mark_dst([state])
1026 1029
    4.10. ds_list_exists(groupid)
1027 1030
    4.11. ds_is_from_list([groupid [, mode [, uri] ] ])
1028
-   4.12. ds_load_update()
1029
-   4.13. ds_load_unset()
1030
-   4.14. ds_reload()
1031
+   4.12. ds_is_active(groupid [, uri])
1032
+   4.13. ds_load_update()
1033
+   4.14. ds_load_unset()
1034
+   4.15. ds_reload()
1031 1035
 
1032 1036
 4.1.  ds_select_dst(set, alg[, limit])
1033 1037
 
... ...
@@ -1436,7 +1440,31 @@ if(ds_is_from_list("10", "3", "sip:127.0.0.1:5080")) {
1436 1440
 }
1437 1441
 ...
1438 1442
 
1439
-4.12.  ds_load_update()
1443
+4.12.  ds_is_active(groupid [, uri])
1444
+
1445
+   This function returns true, if there is an active URI in the
1446
+   destination group; otherwise false. If the uri parameter is provided,
1447
+   then the corresponding destination has to be active.
1448
+
1449
+   Description of parameters:
1450
+     * groupid - the group id. The parameter can be an integer or a
1451
+       variable holding an integer value.
1452
+     * uri (optional) - the URI of the destination. if parameter is empty
1453
+       or missing, the any destination is matched.
1454
+
1455
+   This function can be used from ANY_ROUTE.
1456
+
1457
+   Example 1.52. ds_is_active usage
1458
+...
1459
+if(ds_is_active("10")) {
1460
+    ...
1461
+}
1462
+if(ds_is_active("10", "sip:127.0.0.1:5080")) {
1463
+    ...
1464
+}
1465
+...
1466
+
1467
+4.13.  ds_load_update()
1440 1468
 
1441 1469
    Updates the load state:
1442 1470
      * if it is a BYE or CANCEL - remove the load from destination address
... ...
@@ -1447,14 +1475,14 @@ if(ds_is_from_list("10", "3", "sip:127.0.0.1:5080")) {
1447 1475
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
1448 1476
    BRANCH_ROUTE and ONREPLY_ROUTE.
1449 1477
 
1450
-4.13.  ds_load_unset()
1478
+4.14.  ds_load_unset()
1451 1479
 
1452 1480
    Remove the call load for the destination that routed the call.
1453 1481
 
1454 1482
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
1455 1483
    BRANCH_ROUTE and ONREPLY_ROUTE.
1456 1484
 
1457
-   Example 1.52. ds_load_unset usage
1485
+   Example 1.53. ds_load_unset usage
1458 1486
 ...
1459 1487
 route {
1460 1488
     ...
... ...
@@ -1478,7 +1506,7 @@ onreply_route {
1478 1506
 }
1479 1507
 ...
1480 1508
 
1481
-4.14.  ds_reload()
1509
+4.15.  ds_reload()
1482 1510
 
1483 1511
    Reloads the groups and included destinations.
1484 1512
 
... ...
@@ -1760,7 +1788,7 @@ setid(int) destination(sip uri) flags(int,opt) priority(int,opt) attrs(str,opt)
1760 1788
    For database, each element of a line resides in a different column.
1761 1789
    Next is a dispatcher.list file example:
1762 1790
 
1763
-   Example 1.53. dispatcher list file
1791
+   Example 1.54. dispatcher list file
1764 1792
 ...
1765 1793
 #
1766 1794
 # dispatcher destination sets (groups)
... ...
@@ -1785,7 +1813,7 @@ r,opt)
1785 1813
 
1786 1814
    Next listing shows a sample config for using the dispatcher module.
1787 1815
 
1788
-   Example 1.54. Kamailio config script - sample dispatcher usage
1816
+   Example 1.55. Kamailio config script - sample dispatcher usage
1789 1817
 ...
1790 1818
 #!KAMAILIO
1791 1819
 #