Browse code

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

Kamailio Dev authored on 26/05/2020 14:01:15
Showing 1 changed files
... ...
@@ -30,9 +30,10 @@ Muhammad Shahzad Shafi
30 30
         3. Parameters
31 31
 
32 32
               3.1. alias_subdomains (string)
33
-              3.2. nio_intercept (int)
34
-              3.3. nio_min_msg_len (int)
35
-              3.4. nio_msg_avp (string)
33
+              3.2. dns_cache (string)
34
+              3.3. nio_intercept (int)
35
+              3.4. nio_min_msg_len (int)
36
+              3.5. nio_msg_avp (string)
36 37
 
37 38
         4. Functions
38 39
 
... ...
@@ -78,34 +79,35 @@ Muhammad Shahzad Shafi
78 79
    List of Examples
79 80
 
80 81
    1.1. Set alias_subdomains parameter
81
-   1.2. Set nio_intercept parameter
82
-   1.3. Set nio_min_msg_len parameter
83
-   1.4. Set nio_msg_avp parameter
84
-   1.5. append_branch usage
85
-   1.6. send_udp usage
86
-   1.7. send_tcp usage
87
-   1.8. send_data usage
88
-   1.9. sendx usage
89
-   1.10. is_incoming usage
90
-   1.11. msg_iflag_set usage
91
-   1.12. msg_iflag_reset usage
92
-   1.13. msg_iflag_is_set usage
93
-   1.14. file_read usage
94
-   1.15. file_write usage
95
-   1.16. setxflag usage
96
-   1.17. isxflagset usage
97
-   1.18. resetxflag usage
98
-   1.19. set_send_socket usage
99
-   1.20. set_send_socket_name usage
100
-   1.21. set_recv_socket usage
101
-   1.22. set_recv_socket_name usage
102
-   1.23. set_source_address usage
103
-   1.24. via_add_srvid usage
104
-   1.25. via_add_xavp_params usage
105
-   1.26. via_use_xavp_fields usage
106
-   1.27. is_faked_msg usage
107
-   1.28. event_route[network:msg] use cases
108
-   1.29. Sample PERL code for do_compress and do_uncompress
82
+   1.2. Set dns_cache parameter
83
+   1.3. Set nio_intercept parameter
84
+   1.4. Set nio_min_msg_len parameter
85
+   1.5. Set nio_msg_avp parameter
86
+   1.6. append_branch usage
87
+   1.7. send_udp usage
88
+   1.8. send_tcp usage
89
+   1.9. send_data usage
90
+   1.10. sendx usage
91
+   1.11. is_incoming usage
92
+   1.12. msg_iflag_set usage
93
+   1.13. msg_iflag_reset usage
94
+   1.14. msg_iflag_is_set usage
95
+   1.15. file_read usage
96
+   1.16. file_write usage
97
+   1.17. setxflag usage
98
+   1.18. isxflagset usage
99
+   1.19. resetxflag usage
100
+   1.20. set_send_socket usage
101
+   1.21. set_send_socket_name usage
102
+   1.22. set_recv_socket usage
103
+   1.23. set_recv_socket_name usage
104
+   1.24. set_source_address usage
105
+   1.25. via_add_srvid usage
106
+   1.26. via_add_xavp_params usage
107
+   1.27. via_use_xavp_fields usage
108
+   1.28. is_faked_msg usage
109
+   1.29. event_route[network:msg] use cases
110
+   1.30. Sample PERL code for do_compress and do_uncompress
109 111
 
110 112
 Chapter 1. Admin Guide
111 113
 
... ...
@@ -120,9 +122,10 @@ Chapter 1. Admin Guide
120 122
    3. Parameters
121 123
 
122 124
         3.1. alias_subdomains (string)
123
-        3.2. nio_intercept (int)
124
-        3.3. nio_min_msg_len (int)
125
-        3.4. nio_msg_avp (string)
125
+        3.2. dns_cache (string)
126
+        3.3. nio_intercept (int)
127
+        3.4. nio_min_msg_len (int)
128
+        3.5. nio_msg_avp (string)
126 129
 
127 130
    4. Functions
128 131
 
... ...
@@ -206,9 +209,10 @@ Chapter 1. Admin Guide
206 209
 3. Parameters
207 210
 
208 211
    3.1. alias_subdomains (string)
209
-   3.2. nio_intercept (int)
210
-   3.3. nio_min_msg_len (int)
211
-   3.4. nio_msg_avp (string)
212
+   3.2. dns_cache (string)
213
+   3.3. nio_intercept (int)
214
+   3.4. nio_min_msg_len (int)
215
+   3.5. nio_msg_avp (string)
212 216
 
213 217
 3.1. alias_subdomains (string)
214 218
 
... ...
@@ -225,7 +229,32 @@ modparam("corex", "alias_subdomains", "kamailio.org")
225 229
 modparam("corex", "alias_subdomains", "udp:sip-router.org:5060")
226 230
 ...
227 231
 
228
-3.2. nio_intercept (int)
232
+3.2. dns_cache (string)
233
+
234
+   Add A or AAAA records to internal DNS cache at startup. It can be set
235
+   many times to add more than one record.
236
+
237
+   The format of the value follows the SIP params style:
238
+   "attr1=val1;attr2=val2;...". The attributes can be:
239
+     * type - it can be "A" (IPv4) or "AAAA" (IPv6)
240
+     * name - the domain name
241
+     * addr - the IP address
242
+     * ttl - TTL value
243
+     * flags - can be: 1 - the domain is unresolvable (like blacklisted);
244
+       2 - the record is permanent (never times out, never deleted, never
245
+       overwritten)
246
+
247
+   Default value is “NULL”.
248
+
249
+   Example 1.2. Set dns_cache parameter
250
+...
251
+modparam("corex", "dns_cache", "type=A;name=kamailio.org;addr=193.22.119.66;ttl=
252
+3600000;flags=0")
253
+modparam("corex", "dns_cache", "type=AAAA;name=kamailio.org;addr=2a00:d60:0:400:
254
+:2;ttl=3600000;flags=0")
255
+...
256
+
257
+3.3. nio_intercept (int)
229 258
 
230 259
    If set to non-zero then raw data received from a remote host or about
231 260
    to be sent to a remote host is made available in
... ...
@@ -234,12 +263,12 @@ modparam("corex", "alias_subdomains", "udp:sip-router.org:5060")
234 263
 
235 264
    Default value is 0, i.e. do not allow access to network io data.
236 265
 
237
-   Example 1.2. Set nio_intercept parameter
266
+   Example 1.3. Set nio_intercept parameter
238 267
 ...
239 268
 modparam("corex", "nio_intercept", 1)
240 269
 ...
241 270
 
242
-3.3. nio_min_msg_len (int)
271
+3.4. nio_min_msg_len (int)
243 272
 
244 273
    Minimum content length of the packet to execute the
245 274
    event_route[network:msg]. This only works if nio_intercept parameter is
... ...
@@ -247,12 +276,12 @@ modparam("corex", "nio_intercept", 1)
247 276
 
248 277
    Default value is 0.
249 278
 
250
-   Example 1.3. Set nio_min_msg_len parameter
279
+   Example 1.4. Set nio_min_msg_len parameter
251 280
 ...
252 281
 modparam("corex", "nio_min_msg_len", 32)
253 282
 ...
254 283
 
255
-3.4. nio_msg_avp (string)
284
+3.5. nio_msg_avp (string)
256 285
 
257 286
    AVP name to store modified content to be set in the packet. If not set
258 287
    in event_route[network:msg], then all changes are lost and original
... ...
@@ -261,7 +290,7 @@ modparam("corex", "nio_min_msg_len", 32)
261 290
 
262 291
    Default value is empty.
263 292
 
264
-   Example 1.4. Set nio_msg_avp parameter
293
+   Example 1.5. Set nio_msg_avp parameter
265 294
 ...
266 295
 modparam("corex", "nio_msg_avp", "$avp(msg)")
267 296
 ...
... ...
@@ -308,7 +337,7 @@ modparam("corex", "nio_msg_avp", "$avp(msg)")
308 337
 
309 338
    This function can be used from REQUEST_ROUTE or FAILURE_ROUTE.
310 339
 
311
-   Example 1.5. append_branch usage
340
+   Example 1.6. append_branch usage
312 341
 ...
313 342
     append_branch();
314 343
     append_branch("$avp(uri)", "0.5");
... ...
@@ -328,7 +357,7 @@ modparam("corex", "nio_msg_avp", "$avp(msg)")
328 357
 
329 358
    This function can be used from REQUEST_ROUTE or FAILURE_ROUTE.
330 359
 
331
-   Example 1.6. send_udp usage
360
+   Example 1.7. send_udp usage
332 361
 ...
333 362
         send_udp();
334 363
         send_udp("10.20.15.10");
... ...
@@ -341,7 +370,7 @@ modparam("corex", "nio_msg_avp", "$avp(msg)")
341 370
    This function is identical to send_udp() described above, except that
342 371
    it sends the SIP message using the TCP protocol instead of UDP.
343 372
 
344
-   Example 1.7. send_tcp usage
373
+   Example 1.8. send_tcp usage
345 374
 ...
346 375
         send_tcp();
347 376
         send_tcp("10.20.15.10");
... ...
@@ -357,7 +386,7 @@ modparam("corex", "nio_msg_avp", "$avp(msg)")
357 386
 
358 387
    This function can be used from ANY_ROUTE.
359 388
 
360
-   Example 1.8. send_data usage
389
+   Example 1.9. send_data usage
361 390
 ...
362 391
         send_data("sip:example.com:5070;transport=sctp", "Message at $Ts");
363 392
 ...
... ...
@@ -372,7 +401,7 @@ modparam("corex", "nio_msg_avp", "$avp(msg)")
372 401
 
373 402
    This function can be used from ANY_ROUTE.
374 403
 
375
-   Example 1.9. sendx usage
404
+   Example 1.10. sendx usage
376 405
 ...
377 406
 sendx("sip:example.com:5070;transport=sctp", "sctp:2.3.4.5:5060", "Message at $T
378 407
 s");
... ...
@@ -387,7 +416,7 @@ s");
387 416
 
388 417
    This function can be used from event_route[network:msg].
389 418
 
390
-   Example 1.10. is_incoming usage
419
+   Example 1.11. is_incoming usage
391 420
 ...
392 421
 event_route[network:msg] {
393 422
     if (is_incoming()) {
... ...
@@ -412,7 +441,7 @@ event_route[network:msg] {
412 441
 
413 442
    This function can be used from ANY_ROUTE.
414 443
 
415
-   Example 1.11. msg_iflag_set usage
444
+   Example 1.12. msg_iflag_set usage
416 445
 ...
417 446
     msg_iflag_set("UAC_AUTH");
418 447
 ...
... ...
@@ -423,7 +452,7 @@ event_route[network:msg] {
423 452
 
424 453
    This function can be used from ANY_ROUTE.
425 454
 
426
-   Example 1.12. msg_iflag_reset usage
455
+   Example 1.13. msg_iflag_reset usage
427 456
 ...
428 457
     msg_iflag_reset("UAC_AUTH");
429 458
 ...
... ...
@@ -434,7 +463,7 @@ event_route[network:msg] {
434 463
 
435 464
    This function can be used from ANY_ROUTE.
436 465
 
437
-   Example 1.13. msg_iflag_is_set usage
466
+   Example 1.14. msg_iflag_is_set usage
438 467
 ...
439 468
     if(msg_iflag_is_set("UAC_AUTH")) { ... }
440 469
 ...
... ...
@@ -445,7 +474,7 @@ event_route[network:msg] {
445 474
 
446 475
    This function can be used from ANY_ROUTE.
447 476
 
448
-   Example 1.14. file_read usage
477
+   Example 1.15. file_read usage
449 478
 ...
450 479
 if(file_read("/tmp/data.txt", "$var(data)")) { ... }
451 480
 ...
... ...
@@ -456,7 +485,7 @@ if(file_read("/tmp/data.txt", "$var(data)")) { ... }
456 485
 
457 486
    This function can be used from ANY_ROUTE.
458 487
 
459
-   Example 1.15. file_write usage
488
+   Example 1.16. file_write usage
460 489
 ...
461 490
 if(file_write("/tmp/data.txt", "Data is: $var(data)")) { ... }
462 491
 ...
... ...
@@ -471,7 +500,7 @@ if(file_write("/tmp/data.txt", "Data is: $var(data)")) { ... }
471 500
 
472 501
    This function can be used from ANY_ROUTE.
473 502
 
474
-   Example 1.16. setxflag usage
503
+   Example 1.17. setxflag usage
475 504
 ...
476 505
 setxflag("1");
477 506
 ...
... ...
@@ -489,7 +518,7 @@ setxflag("$var(flag)");
489 518
 
490 519
    This function can be used from ANY_ROUTE.
491 520
 
492
-   Example 1.17. isxflagset usage
521
+   Example 1.18. isxflagset usage
493 522
 ...
494 523
 if(isxflagset("1"))
495 524
 {
... ...
@@ -507,7 +536,7 @@ if(isxflagset("1"))
507 536
 
508 537
    This function can be used from ANY_ROUTE.
509 538
 
510
-   Example 1.18. resetxflag usage
539
+   Example 1.19. resetxflag usage
511 540
 ...
512 541
 resetxflag("1");
513 542
 ...
... ...
@@ -522,7 +551,7 @@ resetxflag("1");
522 551
 
523 552
    This function can be used from ANY_ROUTE.
524 553
 
525
-   Example 1.19. set_send_socket usage
554
+   Example 1.20. set_send_socket usage
526 555
 ...
527 556
 set_send_socket("udp:127.0.0.1:5060");
528 557
 ...
... ...
@@ -537,7 +566,7 @@ set_send_socket("udp:127.0.0.1:5060");
537 566
 
538 567
    This function can be used from ANY_ROUTE.
539 568
 
540
-   Example 1.20. set_send_socket_name usage
569
+   Example 1.21. set_send_socket_name usage
541 570
 ...
542 571
 set_send_socket_name("sock1");
543 572
 ...
... ...
@@ -552,7 +581,7 @@ set_send_socket_name("sock1");
552 581
 
553 582
    This function can be used from ANY_ROUTE.
554 583
 
555
-   Example 1.21. set_recv_socket usage
584
+   Example 1.22. set_recv_socket usage
556 585
 ...
557 586
 set_recv_socket("udp:127.0.0.1:5060");
558 587
 ...
... ...
@@ -567,7 +596,7 @@ set_recv_socket("udp:127.0.0.1:5060");
567 596
 
568 597
    This function can be used from ANY_ROUTE.
569 598
 
570
-   Example 1.22. set_recv_socket_name usage
599
+   Example 1.23. set_recv_socket_name usage
571 600
 ...
572 601
 set_recv_socket_name("sock1");
573 602
 ...
... ...
@@ -582,7 +611,7 @@ set_recv_socket_name("sock1");
582 611
 
583 612
    This function can be used from ANY_ROUTE.
584 613
 
585
-   Example 1.23. set_source_address usage
614
+   Example 1.24. set_source_address usage
586 615
 ...
587 616
 set_source_address("udp:127.0.0.1:5080");
588 617
 ...
... ...
@@ -597,7 +626,7 @@ set_source_address("udp:127.0.0.1:5080");
597 626
 
598 627
    This function can be used from ANY_ROUTE.
599 628
 
600
-   Example 1.24. via_add_srvid usage
629
+   Example 1.25. via_add_srvid usage
601 630
 ...
602 631
 via_add_srv("1");
603 632
 ...
... ...
@@ -612,7 +641,7 @@ via_add_srv("1");
612 641
 
613 642
    This function can be used from ANY_ROUTE.
614 643
 
615
-   Example 1.25. via_add_xavp_params usage
644
+   Example 1.26. via_add_xavp_params usage
616 645
 ...
617 646
 xavp_via_params="xvia"
618 647
 ...
... ...
@@ -635,7 +664,7 @@ request_route {
635 664
 
636 665
    This function can be used from ANY_ROUTE.
637 666
 
638
-   Example 1.26. via_use_xavp_fields usage
667
+   Example 1.27. via_use_xavp_fields usage
639 668
 ...
640 669
 xavp_via_fields="mvia"
641 670
 ...
... ...
@@ -660,7 +689,7 @@ request_route {
660 689
 
661 690
    This function can be used in ANY_ROUTE.
662 691
 
663
-   Example 1.27. is_faked_msg usage
692
+   Example 1.28. is_faked_msg usage
664 693
 ...
665 694
 event_route[dispatcher:dst-down] {
666 695
     if (is_faked_msg()) {
... ...
@@ -803,7 +832,7 @@ event_route[dispatcher:dst-down] {
803 832
    Next is a basic usage example where encoding and decoding is done using
804 833
    PERL.
805 834
 
806
-   Example 1.28. event_route[network:msg] use cases
835
+   Example 1.29. event_route[network:msg] use cases
807 836
 ...
808 837
 loadmodule "app_perl.so"
809 838
 loadmodule "corex.so"
... ...
@@ -834,7 +863,7 @@ event_route[network:msg] {
834 863
 }
835 864
 ...
836 865
 
837
-   Example 1.29. Sample PERL code for do_compress and do_uncompress
866
+   Example 1.30. Sample PERL code for do_compress and do_uncompress
838 867
 ...
839 868
 use strict;
840 869
 use warnings;