Browse code

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

Kamailio Dev authored on 02/08/2020 15:16:16
Showing 1 changed files
... ...
@@ -21,18 +21,19 @@ Daniel-Constantin Mierla
21 21
 
22 22
               2.1. msg_apply_changes()
23 23
               2.2. change_reply_status(code, reason)
24
-              2.3. remove_body()
25
-              2.4. keep_hf([regexp])
26
-              2.5. fnmatch(value, expr [, flags])
27
-              2.6. append_hf_value(hf, hvalue)
28
-              2.7. insert_hf_value(hf, hvalue)
29
-              2.8. remove_hf_value(hf_par)
30
-              2.9. remove_hf_value2(hf_par)
31
-              2.10. assign_hf_value(hf, hvalue)
32
-              2.11. assign_hf_value2(hf, hvalue)
33
-              2.12. include_hf_value(hf, hvalue)
34
-              2.13. exclude_hf_value(hf, hvalue)
35
-              2.14. hf_value_exists(hf, hvalue)
24
+              2.3. change_reply_status_code(vcode)
25
+              2.4. remove_body()
26
+              2.5. keep_hf([regexp])
27
+              2.6. fnmatch(value, expr [, flags])
28
+              2.7. append_hf_value(hf, hvalue)
29
+              2.8. insert_hf_value(hf, hvalue)
30
+              2.9. remove_hf_value(hf_par)
31
+              2.10. remove_hf_value2(hf_par)
32
+              2.11. assign_hf_value(hf, hvalue)
33
+              2.12. assign_hf_value2(hf, hvalue)
34
+              2.13. include_hf_value(hf, hvalue)
35
+              2.14. exclude_hf_value(hf, hvalue)
36
+              2.15. hf_value_exists(hf, hvalue)
36 37
 
37 38
         3. Selects
38 39
 
... ...
@@ -44,19 +45,20 @@ Daniel-Constantin Mierla
44 45
 
45 46
    1.1. msg_apply_changes() usage
46 47
    1.2. change_reply_status usage
47
-   1.3. remove_body() usage
48
-   1.4. keep_hf() usage
49
-   1.5. fnmatch() usage
50
-   1.6. append_hf_value usage
51
-   1.7. insert_hf_value usage
52
-   1.8. remove_hf_value usage
53
-   1.9. remove_hf_value2 usage
54
-   1.10. assign_hf_value usage
55
-   1.11. assign_hf_value2 usage
56
-   1.12. include_hf_value usage
57
-   1.13. exclude_hf_value usage
58
-   1.14. hf_value_exists usage
59
-   1.15. @hf_value select usage
48
+   1.3. change_reply_status_code usage
49
+   1.4. remove_body() usage
50
+   1.5. keep_hf() usage
51
+   1.6. fnmatch() usage
52
+   1.7. append_hf_value usage
53
+   1.8. insert_hf_value usage
54
+   1.9. remove_hf_value usage
55
+   1.10. remove_hf_value2 usage
56
+   1.11. assign_hf_value usage
57
+   1.12. assign_hf_value2 usage
58
+   1.13. include_hf_value usage
59
+   1.14. exclude_hf_value usage
60
+   1.15. hf_value_exists usage
61
+   1.16. @hf_value select usage
60 62
 
61 63
 Chapter 1. Admin Guide
62 64
 
... ...
@@ -67,18 +69,19 @@ Chapter 1. Admin Guide
67 69
 
68 70
         2.1. msg_apply_changes()
69 71
         2.2. change_reply_status(code, reason)
70
-        2.3. remove_body()
71
-        2.4. keep_hf([regexp])
72
-        2.5. fnmatch(value, expr [, flags])
73
-        2.6. append_hf_value(hf, hvalue)
74
-        2.7. insert_hf_value(hf, hvalue)
75
-        2.8. remove_hf_value(hf_par)
76
-        2.9. remove_hf_value2(hf_par)
77
-        2.10. assign_hf_value(hf, hvalue)
78
-        2.11. assign_hf_value2(hf, hvalue)
79
-        2.12. include_hf_value(hf, hvalue)
80
-        2.13. exclude_hf_value(hf, hvalue)
81
-        2.14. hf_value_exists(hf, hvalue)
72
+        2.3. change_reply_status_code(vcode)
73
+        2.4. remove_body()
74
+        2.5. keep_hf([regexp])
75
+        2.6. fnmatch(value, expr [, flags])
76
+        2.7. append_hf_value(hf, hvalue)
77
+        2.8. insert_hf_value(hf, hvalue)
78
+        2.9. remove_hf_value(hf_par)
79
+        2.10. remove_hf_value2(hf_par)
80
+        2.11. assign_hf_value(hf, hvalue)
81
+        2.12. assign_hf_value2(hf, hvalue)
82
+        2.13. include_hf_value(hf, hvalue)
83
+        2.14. exclude_hf_value(hf, hvalue)
84
+        2.15. hf_value_exists(hf, hvalue)
82 85
 
83 86
    3. Selects
84 87
 
... ...
@@ -100,18 +103,19 @@ Chapter 1. Admin Guide
100 103
 
101 104
    2.1. msg_apply_changes()
102 105
    2.2. change_reply_status(code, reason)
103
-   2.3. remove_body()
104
-   2.4. keep_hf([regexp])
105
-   2.5. fnmatch(value, expr [, flags])
106
-   2.6. append_hf_value(hf, hvalue)
107
-   2.7. insert_hf_value(hf, hvalue)
108
-   2.8. remove_hf_value(hf_par)
109
-   2.9. remove_hf_value2(hf_par)
110
-   2.10. assign_hf_value(hf, hvalue)
111
-   2.11. assign_hf_value2(hf, hvalue)
112
-   2.12. include_hf_value(hf, hvalue)
113
-   2.13. exclude_hf_value(hf, hvalue)
114
-   2.14. hf_value_exists(hf, hvalue)
106
+   2.3. change_reply_status_code(vcode)
107
+   2.4. remove_body()
108
+   2.5. keep_hf([regexp])
109
+   2.6. fnmatch(value, expr [, flags])
110
+   2.7. append_hf_value(hf, hvalue)
111
+   2.8. insert_hf_value(hf, hvalue)
112
+   2.9. remove_hf_value(hf_par)
113
+   2.10. remove_hf_value2(hf_par)
114
+   2.11. assign_hf_value(hf, hvalue)
115
+   2.12. assign_hf_value2(hf, hvalue)
116
+   2.13. include_hf_value(hf, hvalue)
117
+   2.14. exclude_hf_value(hf, hvalue)
118
+   2.15. hf_value_exists(hf, hvalue)
115 119
 
116 120
 2.1.  msg_apply_changes()
117 121
 
... ...
@@ -168,18 +172,37 @@ reply_route {
168 172
 }
169 173
 ...
170 174
 
171
-2.3.  remove_body()
175
+2.3.  change_reply_status_code(vcode)
176
+
177
+   Change the status code for a SIP reply .
178
+
179
+   Meaning of the parameters is as follows:
180
+     * vcode - the new status code.
181
+
182
+   This function can be used from ONREPLY_ROUTE.
183
+
184
+   Example 1.3. change_reply_status_code usage
185
+...
186
+reply_route {
187
+    if (status == "604") {
188
+        change_reply_status_code("404");
189
+        exit;
190
+    }
191
+}
192
+...
193
+
194
+2.4.  remove_body()
172 195
 
173 196
    Use this function to remove the body of SIP requests or replies.
174 197
 
175 198
    This function can be used from ANY_ROUTE.
176 199
 
177
-   Example 1.3. remove_body() usage
200
+   Example 1.4. remove_body() usage
178 201
 ...
179 202
 remove_body();
180 203
 ...
181 204
 
182
-2.4.  keep_hf([regexp])
205
+2.5.  keep_hf([regexp])
183 206
 
184 207
    Remove headers that don't match the regular expression regexp. Several
185 208
    header are ignored always (thus not removed): Via, From, To, Call-ID,
... ...
@@ -190,12 +213,12 @@ remove_body();
190 213
 
191 214
    This function can be used from ANY_ROUTE.
192 215
 
193
-   Example 1.4. keep_hf() usage
216
+   Example 1.5. keep_hf() usage
194 217
 ...
195 218
 keep_hf("User-Agent");
196 219
 ...
197 220
 
198
-2.5.  fnmatch(value, expr [, flags])
221
+2.6.  fnmatch(value, expr [, flags])
199 222
 
200 223
    Match the value against the expr using shell-style pattern for file
201 224
    name matching (see man page for C function fnmatch()). It is known to
... ...
@@ -206,7 +229,7 @@ keep_hf("User-Agent");
206 229
 
207 230
    This function can be used from ANY_ROUTE.
208 231
 
209
-   Example 1.5. fnmatch() usage
232
+   Example 1.6. fnmatch() usage
210 233
 ...
211 234
 if(fnmatch("$rU", "123*"))
212 235
 {
... ...
@@ -214,7 +237,7 @@ if(fnmatch("$rU", "123*"))
214 237
 }
215 238
 ...
216 239
 
217
-2.6.  append_hf_value(hf, hvalue)
240
+2.7.  append_hf_value(hf, hvalue)
218 241
 
219 242
    Append new header value after an existing header, if no index acquired
220 243
    append at the end of list. Note that a header may consist of comma
... ...
@@ -226,7 +249,7 @@ if(fnmatch("$rU", "123*"))
226 249
        message.
227 250
      * hvalue - Value to be added, config var formatting supported.
228 251
 
229
-   Example 1.6. append_hf_value usage
252
+   Example 1.7. append_hf_value usage
230 253
 ...
231 254
 append_hf_value("foo", "gogo;stamp=$Ts")   # add new header
232 255
 append_hf_value("foo[1]", "gogo")  # add new value behind first value
... ...
@@ -234,7 +257,7 @@ append_hf_value("foo[-1]", "$var(Bar)") # try add value to the last header, if n
234 257
 ot exists add new header
235 258
 ...
236 259
 
237
-2.7.  insert_hf_value(hf, hvalue)
260
+2.8.  insert_hf_value(hf, hvalue)
238 261
 
239 262
    Insert new header value before an existing header, if no index acquired
240 263
    insert before first hf header. Note that a header may consist of comma
... ...
@@ -247,14 +270,14 @@ ot exists add new header
247 270
        message.
248 271
      * hvalue - Value to be added, config var formatting supported.
249 272
 
250
-   Example 1.7. insert_hf_value usage
273
+   Example 1.8. insert_hf_value usage
251 274
 ...
252 275
 insert_hf_value("foo[2]", "gogo")
253 276
 insert_hf_value("foo", "$avp(foo)")   # add new header at the top of list
254 277
 insert_hf_value("foo[1]", "gogo") # try add to the first header
255 278
 ...
256 279
 
257
-2.8.  remove_hf_value(hf_par)
280
+2.9.  remove_hf_value(hf_par)
258 281
 
259 282
    Remove the header value from existing header, Note that a header may
260 283
    consist of comma delimited list of values.
... ...
@@ -264,7 +287,7 @@ insert_hf_value("foo[1]", "gogo") # try add to the first header
264 287
        [. PARAM ] If asterisk is specified as index then all values are
265 288
        affected.
266 289
 
267
-   Example 1.8. remove_hf_value usage
290
+   Example 1.9. remove_hf_value usage
268 291
 ...
269 292
 remove_hf_value("foo")  # remove foo[1]
270 293
 remove_hf_value("foo[*]")  # remove all foo's headers
... ...
@@ -273,7 +296,7 @@ remove_hf_value("foo.bar")  # delete parameter
273 296
 remove_hf_value("foo[*].bar") # for each foo delete bar parameters
274 297
 ...
275 298
 
276
-2.9.  remove_hf_value2(hf_par)
299
+2.10.  remove_hf_value2(hf_par)
277 300
 
278 301
    Remove specified header or parameter. It is expected header in
279 302
    Authorization format (comma delimiters are not treated as multi-value
... ...
@@ -284,7 +307,7 @@ remove_hf_value("foo[*].bar") # for each foo delete bar parameters
284 307
        PARAM ] If asterisk is specified as index then all values are
285 308
        affected.
286 309
 
287
-   Example 1.9. remove_hf_value2 usage
310
+   Example 1.10. remove_hf_value2 usage
288 311
 ...
289 312
 remove_hf_value2("foo")  # remove foo[1]
290 313
 remove_hf_value2("foo[*]")  # remove all foo's headers, the same as remove_hf_he
... ...
@@ -294,7 +317,7 @@ remove_hf_value2("foo.bar")  # delete parameter
294 317
 remove_hf_value2("foo[*].bar") # for each foo delete bar parameters
295 318
 ...
296 319
 
297
-2.10.  assign_hf_value(hf, hvalue)
320
+2.11.  assign_hf_value(hf, hvalue)
298 321
 
299 322
    Assign value to specified header value / param.
300 323
 
... ...
@@ -305,7 +328,7 @@ remove_hf_value2("foo[*].bar") # for each foo delete bar parameters
305 328
      * hvalue - Value to be assigned, config var formatting supported. If
306 329
        value is empty then no equal sign appears in param.
307 330
 
308
-   Example 1.10. assign_hf_value usage
331
+   Example 1.11. assign_hf_value usage
309 332
 ...
310 333
 assign_hf_value("foo", "gogo")  # foo[1]
311 334
 assign_hf_value("foo[-1]", "gogo")  # foo[last_foo]
... ...
@@ -316,7 +339,7 @@ assign_hf_value("foo[*]", "")  # remove all foo's, empty value remains
316 339
 assign_hf_value("foo[*].bar", "")  # set empty value (ex. lr)
317 340
 ...
318 341
 
319
-2.11.  assign_hf_value2(hf, hvalue)
342
+2.12.  assign_hf_value2(hf, hvalue)
320 343
 
321 344
    Assign value to specified header. It is expected header in
322 345
    Authorization format (comma delimiters are not treated as multi-value
... ...
@@ -329,14 +352,14 @@ assign_hf_value("foo[*].bar", "")  # set empty value (ex. lr)
329 352
      * hvalue - Value to be assigned, config var formatting supported. If
330 353
        value is empty then no equal sign appears in param.
331 354
 
332
-   Example 1.11. assign_hf_value2 usage
355
+   Example 1.12. assign_hf_value2 usage
333 356
 ...
334 357
 assign_hf_value2("Authorization.integrity-protected", "\"yes\"")
335 358
 assign_hf_value2("foo[-1]", "gogo")  # foo[last_foo]
336 359
 assign_hf_value2("foo[*].bar", "")  # set empty value (ex. lr)
337 360
 ...
338 361
 
339
-2.12.  include_hf_value(hf, hvalue)
362
+2.13.  include_hf_value(hf, hvalue)
340 363
 
341 364
    Add value in set if not exists, eg. "Supported: path,100rel".
342 365
 
... ...
@@ -344,12 +367,12 @@ assign_hf_value2("foo[*].bar", "")  # set empty value (ex. lr)
344 367
      * hf - Header field name to be affected.
345 368
      * hvalue - config var formatting supported.
346 369
 
347
-   Example 1.12. include_hf_value usage
370
+   Example 1.13. include_hf_value usage
348 371
 ...
349 372
 include_hf_value("Supported", "path");
350 373
 ...
351 374
 
352
-2.13.  exclude_hf_value(hf, hvalue)
375
+2.14.  exclude_hf_value(hf, hvalue)
353 376
 
354 377
    Remove value from set if exists, eg. "Supported: path,100rel".
355 378
 
... ...
@@ -357,12 +380,12 @@ include_hf_value("Supported", "path");
357 380
      * hf - Header field name to be affected.
358 381
      * hvalue - config formatting supported.
359 382
 
360
-   Example 1.13. exclude_hf_value usage
383
+   Example 1.14. exclude_hf_value usage
361 384
 ...
362 385
 exclude_hf_value("Supported", "100rel");
363 386
 ...
364 387
 
365
-2.14.  hf_value_exists(hf, hvalue)
388
+2.15.  hf_value_exists(hf, hvalue)
366 389
 
367 390
    Check if value exists in set. Alternate select
368 391
    @hf_value_exists.HF.VALUE may be used. It returns one or zero.
... ...
@@ -372,7 +395,7 @@ exclude_hf_value("Supported", "100rel");
372 395
        dashes.
373 396
      * hvalue - config var formatting supported.
374 397
 
375
-   Example 1.14. hf_value_exists usage
398
+   Example 1.15. hf_value_exists usage
376 399
 ...
377 400
 if (hf_value_exists("Supported", "100rel")) {
378 401
 
... ...
@@ -418,7 +441,7 @@ if (@hf_value_exists.supported.path == "1") {
418 441
      * IDX - Value index, negative value counts from bottom
419 442
      * PARAM_NAME - name of parameter
420 443
 
421
-   Example 1.15. @hf_value select usage
444
+   Example 1.16. @hf_value select usage
422 445
 ...
423 446
 $a = @hf_value.my_header[1].my_param;
424 447
 xplog("L_ERR", "$sel(@hf_value.via[-1]), $sel(@hf_value.from.tag)\n");