Browse code

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

Kamailio Dev authored on 10/02/2019 14:46:42
Showing 2 changed files
... ...
@@ -158,7 +158,14 @@ modparam("app_lua", "load", "/usr/local/etc/kamailio/lua/myscript.lua")
158 158
 
159 159
 3.2. register (string)
160 160
 
161
-   Use this function to register optional SIP Router submodules to Lua.
161
+   NOTE: Since Kamailio v5.0, KEMI exports are available in Lua script
162
+   under KSR module. These exports cover most of the modules, a lot more
163
+   that those listed next. The KEMI exports are the recommended to be
164
+   used, the old 'sr' module might be obsoleted soon. To read more about
165
+   KEMI exports and available KSR submodules, see:
166
+     * http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/
167
+
168
+   Use this parameter to register optional Kamailio submodules to Lua.
162 169
    Available submodules are:
163 170
      * alias_db - register functions from alias_db module under
164 171
        'sr.alias_db'.
... ...
@@ -99,6 +99,7 @@ Julien Chavanton
99 99
               3.34. event_callback (str)
100 100
               3.35. ds_attrs_none (int)
101 101
               3.36. ds_db_extra_attrs (str)
102
+              3.37. ds_load_mode (int)
102 103
 
103 104
         4. Functions
104 105
 
... ...
@@ -181,17 +182,18 @@ Julien Chavanton
181 181
    1.36. Set event_callback parameter
182 182
    1.37. Set the “ds_attrs_none” parameter
183 183
    1.38. Set the “ds_db_extra_attrs” parameter
184
-   1.39. ds_select_dst usage
185
-   1.40. configuring load balancing with congestion detection
186
-   1.41. ds_select_domain usage
187
-   1.42. ds_select usage
188
-   1.43. ds_select_routes usage
189
-   1.44. ds_mark_dst usage
190
-   1.45. ds_list_exists usage
191
-   1.46. ds_is_from_list usage
192
-   1.47. ds_load_unset usage
193
-   1.48. dispatcher list file
194
-   1.49. Kamailio config script - sample dispatcher usage
184
+   1.39. Set the “ds_load_mode” parameter
185
+   1.40. ds_select_dst usage
186
+   1.41. configuring load balancing with congestion detection
187
+   1.42. ds_select_domain usage
188
+   1.43. ds_select usage
189
+   1.44. ds_select_routes usage
190
+   1.45. ds_mark_dst usage
191
+   1.46. ds_list_exists usage
192
+   1.47. ds_is_from_list usage
193
+   1.48. ds_load_unset usage
194
+   1.49. dispatcher list file
195
+   1.50. Kamailio config script - sample dispatcher usage
195 196
 
196 197
 Chapter 1. Admin Guide
197 198
 
... ...
@@ -241,6 +243,7 @@ Chapter 1. Admin Guide
241 241
         3.34. event_callback (str)
242 242
         3.35. ds_attrs_none (int)
243 243
         3.36. ds_db_extra_attrs (str)
244
+        3.37. ds_load_mode (int)
244 245
 
245 246
    4. Functions
246 247
 
... ...
@@ -354,6 +357,7 @@ Chapter 1. Admin Guide
354 354
    3.34. event_callback (str)
355 355
    3.35. ds_attrs_none (int)
356 356
    3.36. ds_db_extra_attrs (str)
357
+   3.37. ds_load_mode (int)
357 358
 
358 359
 3.1. list_file (string)
359 360
 
... ...
@@ -918,6 +922,19 @@ end
918 918
 modparam("dispatcher", "ds_db_extra_attrs", "socket=socket;pref=prefix")
919 919
 ...
920 920
 
921
+3.37. ds_load_mode (int)
922
+
923
+   If set to 1, the module throws error when failing to add a destination
924
+   address (e.g., invalid URI). If set to 0, it skips the failing address
925
+   and continues with the next ones.
926
+
927
+   Default value is “0”.
928
+
929
+   Example 1.39. Set the “ds_load_mode” parameter
930
+ ...
931
+ modparam("dispatcher", "ds_load_mode", 1)
932
+ ...
933
+
921 934
 4. Functions
922 935
 
923 936
    4.1. ds_select_dst(set, alg[, limit])
... ...
@@ -1018,7 +1035,7 @@ modparam("dispatcher", "ds_db_extra_attrs", "socket=socket;pref=prefix")
1018 1018
 
1019 1019
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1020 1020
 
1021
-   Example 1.39. ds_select_dst usage
1021
+   Example 1.40. ds_select_dst usage
1022 1022
 ...
1023 1023
 ds_select_dst("1", "0");
1024 1024
 ...
... ...
@@ -1028,7 +1045,7 @@ ds_select_dst("1", "$var(a)");
1028 1028
 ds_select_dst("1", "4", "3");
1029 1029
 ...
1030 1030
 
1031
-   Example 1.40. configuring load balancing with congestion detection
1031
+   Example 1.41. configuring load balancing with congestion detection
1032 1032
 ...
1033 1033
 # sample of SQL provisionning statements
1034 1034
 INSERT INTO "dispatcher"
... ...
@@ -1080,7 +1097,7 @@ DEST: {
1080 1080
 
1081 1081
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1082 1082
 
1083
-   Example 1.41. ds_select_domain usage
1083
+   Example 1.42. ds_select_domain usage
1084 1084
 ...
1085 1085
 $var(a) = 4;
1086 1086
 if(ds_select_domain("1", "$var(a)")) {
... ...
@@ -1104,7 +1121,7 @@ if(ds_select_domain("1", "$var(a)")) {
1104 1104
 
1105 1105
    This function can be used from ANY_ROUTE.
1106 1106
 
1107
-   Example 1.42. ds_select usage
1107
+   Example 1.43. ds_select usage
1108 1108
 ...
1109 1109
 $var(a) = 4;
1110 1110
 if(ds_select("1", "$var(a)")) {
... ...
@@ -1147,7 +1164,7 @@ if(ds_select("1", "$var(a)")) {
1147 1147
 
1148 1148
    This function can be used from ANY_ROUTE.
1149 1149
 
1150
-   Example 1.43. ds_select_routes usage
1150
+   Example 1.44. ds_select_routes usage
1151 1151
 ...
1152 1152
 $var(alg) = 4;
1153 1153
 $var(limit) = 8;
... ...
@@ -1222,7 +1239,7 @@ failure_route[REROUTE] {
1222 1222
 
1223 1223
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1224 1224
 
1225
-   Example 1.44. ds_mark_dst usage
1225
+   Example 1.45. ds_mark_dst usage
1226 1226
 ...
1227 1227
 failure_route[tryagain] {
1228 1228
 ...
... ...
@@ -1241,7 +1258,7 @@ failure_route[tryagain] {
1241 1241
 
1242 1242
    This function can be used from ANY_ROUTE.
1243 1243
 
1244
-   Example 1.45. ds_list_exists usage
1244
+   Example 1.46. ds_list_exists usage
1245 1245
 ...
1246 1246
 if(ds_list_exists("10")) {
1247 1247
     ...
... ...
@@ -1284,7 +1301,7 @@ if(ds_list_exists("10")) {
1284 1284
 
1285 1285
    This function can be used from ANY_ROUTE.
1286 1286
 
1287
-   Example 1.46. ds_is_from_list usage
1287
+   Example 1.47. ds_is_from_list usage
1288 1288
 ...
1289 1289
 if(ds_is_from_list()) {
1290 1290
     ...
... ...
@@ -1318,7 +1335,7 @@ if(ds_is_from_list("10", "3", "sip:127.0.0.1:5080")) {
1318 1318
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
1319 1319
    BRANCH_ROUTE and ONREPLY_ROUTE.
1320 1320
 
1321
-   Example 1.47. ds_load_unset usage
1321
+   Example 1.48. ds_load_unset usage
1322 1322
 ...
1323 1323
 route {
1324 1324
     ...
... ...
@@ -1540,7 +1557,7 @@ setid(int) destination(sip uri) flags(int,opt) priority(int,opt) attrs(str,opt)
1540 1540
    For database, each element of a line resides in a different column.
1541 1541
    Next is a dispatcher.list file example:
1542 1542
 
1543
-   Example 1.48. dispatcher list file
1543
+   Example 1.49. dispatcher list file
1544 1544
 ...
1545 1545
 #
1546 1546
 # dispatcher destination sets (groups)
... ...
@@ -1565,7 +1582,7 @@ r,opt)
1565 1565
 
1566 1566
    Next listing shows a sample config for using the dispatcher module.
1567 1567
 
1568
-   Example 1.49. Kamailio config script - sample dispatcher usage
1568
+   Example 1.50. Kamailio config script - sample dispatcher usage
1569 1569
 ...
1570 1570
 #!KAMAILIO
1571 1571
 #