Browse code

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

Kamailio Dev authored on 14/10/2020 09:31:20
Showing 2 changed files
... ...
@@ -35,10 +35,11 @@ Daniel-Constantin Mierla
35 35
 
36 36
               4.1. crypto_aes_encrypt(text, key, res)
37 37
               4.2. crypto_aes_decrypt(text, key, res)
38
-              4.3. crypto_netio_in)
39
-              4.4. crypto_netio_out()
40
-              4.5. crypto_netio_encrypt()
41
-              4.6. crypto_netio_decrypt()
38
+              4.3. crypto_hmac_sha256(text, key, res)
39
+              4.4. crypto_netio_in)
40
+              4.5. crypto_netio_out()
41
+              4.6. crypto_netio_encrypt()
42
+              4.7. crypto_netio_decrypt()
42 43
 
43 44
         5. Event Routes
44 45
 
... ...
@@ -53,11 +54,12 @@ Daniel-Constantin Mierla
53 54
    1.5. Set netio_key parameter
54 55
    1.6. crypto_aes_encrypt usage
55 56
    1.7. crypto_aes_decrypt usage
56
-   1.8. crypto_netio_in usage
57
-   1.9. crypto_netio_out usage
58
-   1.10. crypto_netio_encrypt usage
59
-   1.11. crypto_netio_decrypt usage
60
-   1.12. event_route[crypto:netio] usage
57
+   1.8. crypto_hmac_sha256 usage
58
+   1.9. crypto_netio_in usage
59
+   1.10. crypto_netio_out usage
60
+   1.11. crypto_netio_encrypt usage
61
+   1.12. crypto_netio_decrypt usage
62
+   1.13. event_route[crypto:netio] usage
61 63
 
62 64
 Chapter 1. Admin Guide
63 65
 
... ...
@@ -81,10 +83,11 @@ Chapter 1. Admin Guide
81 83
 
82 84
         4.1. crypto_aes_encrypt(text, key, res)
83 85
         4.2. crypto_aes_decrypt(text, key, res)
84
-        4.3. crypto_netio_in)
85
-        4.4. crypto_netio_out()
86
-        4.5. crypto_netio_encrypt()
87
-        4.6. crypto_netio_decrypt()
86
+        4.3. crypto_hmac_sha256(text, key, res)
87
+        4.4. crypto_netio_in)
88
+        4.5. crypto_netio_out()
89
+        4.6. crypto_netio_encrypt()
90
+        4.7. crypto_netio_decrypt()
88 91
 
89 92
    5. Event Routes
90 93
 
... ...
@@ -199,10 +202,11 @@ modparam("crypto", "netio_key", "strong-password-here")
199 202
 
200 203
    4.1. crypto_aes_encrypt(text, key, res)
201 204
    4.2. crypto_aes_decrypt(text, key, res)
202
-   4.3. crypto_netio_in)
203
-   4.4. crypto_netio_out()
204
-   4.5. crypto_netio_encrypt()
205
-   4.6. crypto_netio_decrypt()
205
+   4.3. crypto_hmac_sha256(text, key, res)
206
+   4.4. crypto_netio_in)
207
+   4.5. crypto_netio_out()
208
+   4.6. crypto_netio_encrypt()
209
+   4.7. crypto_netio_decrypt()
206 210
 
207 211
 4.1.  crypto_aes_encrypt(text, key, res)
208 212
 
... ...
@@ -232,14 +236,29 @@ crypto_aes_encrypt("$rb", "my-secret-key", "$var(encrypted)");
232 236
 crypto_aes_decrypt("$var(encrypted)", "my-secret-key", "$var(text)");
233 237
 ...
234 238
 
235
-4.3.  crypto_netio_in)
239
+4.3.  crypto_hmac_sha256(text, key, res)
240
+
241
+   Calculates HMAC (keyed-hash message authentication code) with SHA256 as
242
+   a cryptographic hash function. The result is encoded in base64 url
243
+   encoded format and stored in res. The parameter res must be a
244
+   read-write variable. The parameters text and key can be static strings
245
+   or strings with variables (dynamic strings).
246
+
247
+   This function can be used from ANY_ROUTE.
248
+
249
+   Example 1.8. crypto_hmac_sha256 usage
250
+...
251
+crypto_hmac_sha256("$var(text)", "my-secret-key", "$var(hmac)");
252
+...
253
+
254
+4.4.  crypto_netio_in)
236 255
 
237 256
    Return 1 (true) if it is an incoming net message, or -1 (false)
238 257
    otherwise.
239 258
 
240 259
    This function can be used from EVENT_ROUTE.
241 260
 
242
-   Example 1.8. crypto_netio_in usage
261
+   Example 1.9. crypto_netio_in usage
243 262
 ...
244 263
 event_route[crypto:netio] {
245 264
   if(crypto_netio_in()) {
... ...
@@ -247,14 +266,14 @@ event_route[crypto:netio] {
247 266
   }
248 267
 ...
249 268
 
250
-4.4.  crypto_netio_out()
269
+4.5.  crypto_netio_out()
251 270
 
252 271
    Return 1 (true) if it is an outgoing net message, or -1 (false)
253 272
    otherwise.
254 273
 
255 274
    This function can be used from EVENT_ROUTE.
256 275
 
257
-   Example 1.9. crypto_netio_out usage
276
+   Example 1.10. crypto_netio_out usage
258 277
 ...
259 278
 event_route[crypto:netio] {
260 279
   if(crypto_netio_out()) {
... ...
@@ -262,13 +281,13 @@ event_route[crypto:netio] {
262 281
   }
263 282
 ...
264 283
 
265
-4.5.  crypto_netio_encrypt()
284
+4.6.  crypto_netio_encrypt()
266 285
 
267 286
    Mark the network message for encryption.
268 287
 
269 288
    This function can be used from EVENT_ROUTE.
270 289
 
271
-   Example 1.10. crypto_netio_encrypt usage
290
+   Example 1.11. crypto_netio_encrypt usage
272 291
 ...
273 292
 event_route[crypto:netio] {
274 293
   if(crypto_netio_out()) {
... ...
@@ -276,13 +295,13 @@ event_route[crypto:netio] {
276 295
   }
277 296
 ...
278 297
 
279
-4.6.  crypto_netio_decrypt()
298
+4.7.  crypto_netio_decrypt()
280 299
 
281 300
    Mark the network message for decryption.
282 301
 
283 302
    This function can be used from EVENT_ROUTE.
284 303
 
285
-   Example 1.11. crypto_netio_decrypt usage
304
+   Example 1.12. crypto_netio_decrypt usage
286 305
 ...
287 306
 event_route[crypto:netio] {
288 307
   if(crypto_netio_in()) {
... ...
@@ -296,7 +315,7 @@ event_route[crypto:netio] {
296 315
 
297 316
 5.1.  event_route[crypto:netio]
298 317
 
299
-   Example 1.12. event_route[crypto:netio] usage
318
+   Example 1.13. event_route[crypto:netio] usage
300 319
 ...
301 320
 # ----- crypto params -----
302 321
 modparam("crypto", "register_evcb", 1)
... ...
@@ -62,23 +62,24 @@ Bogdan-Andre Iancu
62 62
               3.15. retry_after (integer)
63 63
               3.16. sock_flag (integer)
64 64
               3.17. sock_hdr_name (string)
65
-              3.18. method_filtering (integer)
66
-              3.19. use_path (integer)
67
-              3.20. path_mode (integer)
68
-              3.21. path_use_received (integer)
69
-              3.22. path_check_local (integer)
70
-              3.23. reg_callid_avp (string)
71
-              3.24. xavp_cfg (string)
72
-              3.25. xavp_rcd (string)
73
-              3.26. xavp_rcd_mask (int)
74
-              3.27. gruu_enabled (integer)
75
-              3.28. outbound_mode (integer)
76
-              3.29. regid_mode (integer)
77
-              3.30. flow_timer (integer)
78
-              3.31. contact_max_size (integer)
79
-              3.32. event_callback (str)
80
-              3.33. lookup_filter_mode (int)
81
-              3.34. use_expired_contacts (int)
65
+              3.18. use_advertised_address (integer)
66
+              3.19. method_filtering (integer)
67
+              3.20. use_path (integer)
68
+              3.21. path_mode (integer)
69
+              3.22. path_use_received (integer)
70
+              3.23. path_check_local (integer)
71
+              3.24. reg_callid_avp (string)
72
+              3.25. xavp_cfg (string)
73
+              3.26. xavp_rcd (string)
74
+              3.27. xavp_rcd_mask (int)
75
+              3.28. gruu_enabled (integer)
76
+              3.29. outbound_mode (integer)
77
+              3.30. regid_mode (integer)
78
+              3.31. flow_timer (integer)
79
+              3.32. contact_max_size (integer)
80
+              3.33. event_callback (str)
81
+              3.34. lookup_filter_mode (int)
82
+              3.35. use_expired_contacts (int)
82 83
 
83 84
         4. Functions
84 85
 
... ...
@@ -130,34 +131,35 @@ Bogdan-Andre Iancu
130 131
    1.14. Set retry_after parameter
131 132
    1.15. Set sock_flag parameter
132 133
    1.16. Set sock_hdr_name parameter
133
-   1.17. Set method_filtering parameter
134
-   1.18. Set use_path parameter
135
-   1.19. Set path_mode parameter
136
-   1.20. Set path_use_received parameter
137
-   1.21. Set path_check_local parameter
138
-   1.22. Set reg_callid_avp parameter
139
-   1.23. Set xavp_cfg parameter
140
-   1.24. Set xavp_rcd parameter
141
-   1.25. Set xavp_rcd_mask parameter
142
-   1.26. Set gruu_enabled parameter
143
-   1.27. Set outbound_mode parameter
144
-   1.28. Set regid_mode parameter
145
-   1.29. Set flow_timer parameter
146
-   1.30. Set contact_max_size parameter
147
-   1.31. Set event_callback parameter
148
-   1.32. Set xavp_cfg parameter
149
-   1.33. Set use_expired_contacts parameter
150
-   1.34. save usage
151
-   1.35. lookup usage
152
-   1.36. lookup_branches usage
153
-   1.37. registered usage
154
-   1.38. add_sock_hdr usage
155
-   1.39. unregister usage
156
-   1.40. reg_fetch_contacts usage
157
-   1.41. reg_free_contacts usage
158
-   1.42. reg_send_reply usage
159
-   1.43. event_route[usrloc:contact-expired] usage
160
-   1.44. $ulc(name) usage
134
+   1.17. Set use_advertised_address parameter
135
+   1.18. Set method_filtering parameter
136
+   1.19. Set use_path parameter
137
+   1.20. Set path_mode parameter
138
+   1.21. Set path_use_received parameter
139
+   1.22. Set path_check_local parameter
140
+   1.23. Set reg_callid_avp parameter
141
+   1.24. Set xavp_cfg parameter
142
+   1.25. Set xavp_rcd parameter
143
+   1.26. Set xavp_rcd_mask parameter
144
+   1.27. Set gruu_enabled parameter
145
+   1.28. Set outbound_mode parameter
146
+   1.29. Set regid_mode parameter
147
+   1.30. Set flow_timer parameter
148
+   1.31. Set contact_max_size parameter
149
+   1.32. Set event_callback parameter
150
+   1.33. Set xavp_cfg parameter
151
+   1.34. Set use_expired_contacts parameter
152
+   1.35. save usage
153
+   1.36. lookup usage
154
+   1.37. lookup_branches usage
155
+   1.38. registered usage
156
+   1.39. add_sock_hdr usage
157
+   1.40. unregister usage
158
+   1.41. reg_fetch_contacts usage
159
+   1.42. reg_free_contacts usage
160
+   1.43. reg_send_reply usage
161
+   1.44. event_route[usrloc:contact-expired] usage
162
+   1.45. $ulc(name) usage
161 163
 
162 164
 Chapter 1. Admin Guide
163 165
 
... ...
@@ -192,23 +194,24 @@ Chapter 1. Admin Guide
192 194
         3.15. retry_after (integer)
193 195
         3.16. sock_flag (integer)
194 196
         3.17. sock_hdr_name (string)
195
-        3.18. method_filtering (integer)
196
-        3.19. use_path (integer)
197
-        3.20. path_mode (integer)
198
-        3.21. path_use_received (integer)
199
-        3.22. path_check_local (integer)
200
-        3.23. reg_callid_avp (string)
201
-        3.24. xavp_cfg (string)
202
-        3.25. xavp_rcd (string)
203
-        3.26. xavp_rcd_mask (int)
204
-        3.27. gruu_enabled (integer)
205
-        3.28. outbound_mode (integer)
206
-        3.29. regid_mode (integer)
207
-        3.30. flow_timer (integer)
208
-        3.31. contact_max_size (integer)
209
-        3.32. event_callback (str)
210
-        3.33. lookup_filter_mode (int)
211
-        3.34. use_expired_contacts (int)
197
+        3.18. use_advertised_address (integer)
198
+        3.19. method_filtering (integer)
199
+        3.20. use_path (integer)
200
+        3.21. path_mode (integer)
201
+        3.22. path_use_received (integer)
202
+        3.23. path_check_local (integer)
203
+        3.24. reg_callid_avp (string)
204
+        3.25. xavp_cfg (string)
205
+        3.26. xavp_rcd (string)
206
+        3.27. xavp_rcd_mask (int)
207
+        3.28. gruu_enabled (integer)
208
+        3.29. outbound_mode (integer)
209
+        3.30. regid_mode (integer)
210
+        3.31. flow_timer (integer)
211
+        3.32. contact_max_size (integer)
212
+        3.33. event_callback (str)
213
+        3.34. lookup_filter_mode (int)
214
+        3.35. use_expired_contacts (int)
212 215
 
213 216
    4. Functions
214 217
 
... ...
@@ -322,23 +325,24 @@ Chapter 1. Admin Guide
322 325
    3.15. retry_after (integer)
323 326
    3.16. sock_flag (integer)
324 327
    3.17. sock_hdr_name (string)
325
-   3.18. method_filtering (integer)
326
-   3.19. use_path (integer)
327
-   3.20. path_mode (integer)
328
-   3.21. path_use_received (integer)
329
-   3.22. path_check_local (integer)
330
-   3.23. reg_callid_avp (string)
331
-   3.24. xavp_cfg (string)
332
-   3.25. xavp_rcd (string)
333
-   3.26. xavp_rcd_mask (int)
334
-   3.27. gruu_enabled (integer)
335
-   3.28. outbound_mode (integer)
336
-   3.29. regid_mode (integer)
337
-   3.30. flow_timer (integer)
338
-   3.31. contact_max_size (integer)
339
-   3.32. event_callback (str)
340
-   3.33. lookup_filter_mode (int)
341
-   3.34. use_expired_contacts (int)
328
+   3.18. use_advertised_address (integer)
329
+   3.19. method_filtering (integer)
330
+   3.20. use_path (integer)
331
+   3.21. path_mode (integer)
332
+   3.22. path_use_received (integer)
333
+   3.23. path_check_local (integer)
334
+   3.24. reg_callid_avp (string)
335
+   3.25. xavp_cfg (string)
336
+   3.26. xavp_rcd (string)
337
+   3.27. xavp_rcd_mask (int)
338
+   3.28. gruu_enabled (integer)
339
+   3.29. outbound_mode (integer)
340
+   3.30. regid_mode (integer)
341
+   3.31. flow_timer (integer)
342
+   3.32. contact_max_size (integer)
343
+   3.33. event_callback (str)
344
+   3.34. lookup_filter_mode (int)
345
+   3.35. use_expired_contacts (int)
342 346
 
343 347
 3.1. default_expires (integer)
344 348
 
... ...
@@ -600,7 +604,24 @@ modparam("registrar", "sock_flag", 18)
600 604
 modparam("registrar", "sock_hdr_name", "Sock-Info")
601 605
 ...
602 606
 
603
-3.18. method_filtering (integer)
607
+3.18. use_advertised_address (integer)
608
+
609
+   This parameter can be used to override value written into socket field
610
+   when contact is saved. If set to 1, advertised address will be written
611
+   instead local listen socket.
612
+
613
+   This could be useful when kamailio is installed behind NAT and it is
614
+   necessary to store its public IP instead socket on which the register
615
+   request was received.
616
+
617
+   Default value is 0 (disabled).
618
+
619
+   Example 1.17. Set use_advertised_address parameter
620
+...
621
+modparam("registrar", "use_advertised_address", 1)
622
+...
623
+
624
+3.19. method_filtering (integer)
604 625
 
605 626
    Tells if the contact filtering based on supported methods should be
606 627
    performed during lookup on initial requests without to-tag. It's
... ...
@@ -610,12 +631,12 @@ modparam("registrar", "sock_hdr_name", "Sock-Info")
610 631
 
611 632
    Default value is 0 (disabled).
612 633
 
613
-   Example 1.17. Set method_filtering parameter
634
+   Example 1.18. Set method_filtering parameter
614 635
 ...
615 636
 modparam("registrar", "method_filtering", 1)
616 637
 ...
617 638
 
618
-3.19. use_path (integer)
639
+3.20. use_path (integer)
619 640
 
620 641
    If set to 1, the “Path:” header is handled according to the parameter
621 642
    This parameter can be modified via Kamailio config framework.
... ...
@@ -623,12 +644,12 @@ modparam("registrar", "method_filtering", 1)
623 644
 
624 645
    Default value is 0 (disabled).
625 646
 
626
-   Example 1.18. Set use_path parameter
647
+   Example 1.19. Set use_path parameter
627 648
 ...
628 649
 modparam("registrar", "use_path", 1)
629 650
 ...
630 651
 
631
-3.20. path_mode (integer)
652
+3.21. path_mode (integer)
632 653
 
633 654
    The registrar module implements three different modes regarding the
634 655
    response to a registration which includes one or more Path headers:
... ...
@@ -646,12 +667,12 @@ modparam("registrar", "use_path", 1)
646 667
 
647 668
    Default value is 2.
648 669
 
649
-   Example 1.19. Set path_mode parameter
670
+   Example 1.20. Set path_mode parameter
650 671
 ...
651 672
 modparam("registrar", "path_mode", 0)
652 673
 ...
653 674
 
654
-3.21. path_use_received (integer)
675
+3.22. path_use_received (integer)
655 676
 
656 677
    If set to 1, the “received” parameter of the first Path URI of a
657 678
    registration is set as received-uri and the NAT branch flag is set for
... ...
@@ -661,12 +682,12 @@ modparam("registrar", "path_mode", 0)
661 682
 
662 683
    Default value is 0 (disabled).
663 684
 
664
-   Example 1.20. Set path_use_received parameter
685
+   Example 1.21. Set path_use_received parameter
665 686
 ...
666 687
 modparam("registrar", "path_use_received", 1)
667 688
 ...
668 689
 
669
-3.22. path_check_local (integer)
690
+3.23. path_check_local (integer)
670 691
 
671 692
    If set to 1, when performing a lookup the Path (if present) is
672 693
    evaluated and if the first hop is local (according to “myself” test),
... ...
@@ -677,12 +698,12 @@ modparam("registrar", "path_use_received", 1)
677 698
 
678 699
    Default value is 0 (disabled).
679 700
 
680
-   Example 1.21. Set path_check_local parameter
701
+   Example 1.22. Set path_check_local parameter
681 702
 ...
682 703
 modparam("registrar", "path_check_local", 1)
683 704
 ...
684 705
 
685
-3.23. reg_callid_avp (string)
706
+3.24. reg_callid_avp (string)
686 707
 
687 708
    obsolete. use match_option in registered function
688 709
 
... ...
@@ -692,12 +713,12 @@ modparam("registrar", "path_check_local", 1)
692 713
 
693 714
    Default value is NULL (disabled).
694 715
 
695
-   Example 1.22. Set reg_callid_avp parameter
716
+   Example 1.23. Set reg_callid_avp parameter
696 717
 ...
697 718
 modparam("registrar", "reg_callid_avp", "$avp(s:avp)")
698 719
 ...
699 720
 
700
-3.24. xavp_cfg (string)
721
+3.25. xavp_cfg (string)
701 722
 
702 723
    Defines the name of XAVP class to store runtime module config values.
703 724
    The values are stored as inner XAVPs, like $xavp(class=>attribute).
... ...
@@ -715,7 +736,7 @@ modparam("registrar", "reg_callid_avp", "$avp(s:avp)")
715 736
 
716 737
    Default value is NULL (disabled).
717 738
 
718
-   Example 1.23. Set xavp_cfg parameter
739
+   Example 1.24. Set xavp_cfg parameter
719 740
 ...
720 741
 modparam("registrar", "xavp_cfg", "reg")
721 742
 ...
... ...
@@ -727,7 +748,7 @@ request_route {
727 748
 }
728 749
 ...
729 750
 
730
-3.25. xavp_rcd (string)
751
+3.26. xavp_rcd (string)
731 752
 
732 753
    Defines the name of XAVP class to store details from the location
733 754
    records. The values are stored as inner XAVPs, like
... ...
@@ -747,12 +768,12 @@ request_route {
747 768
 
748 769
    Default value is NULL (disabled).
749 770
 
750
-   Example 1.24. Set xavp_rcd parameter
771
+   Example 1.25. Set xavp_rcd parameter
751 772
 ...
752 773
 modparam("registrar", "xavp_rcd", "ulrcd")
753 774
 ...
754 775
 
755
-3.26. xavp_rcd_mask (int)
776
+3.27. xavp_rcd_mask (int)
756 777
 
757 778
    Defines what values to skip when xavp_rcd is stored.
758 779
      * 1 - ruid
... ...
@@ -763,7 +784,7 @@ modparam("registrar", "xavp_rcd", "ulrcd")
763 784
 
764 785
    Default value is 0 (none).
765 786
 
766
-   Example 1.25. Set xavp_rcd_mask parameter
787
+   Example 1.26. Set xavp_rcd_mask parameter
767 788
 ...
768 789
 # skip path value
769 790
 modparam("registrar", "xavp_rcd_mask", 16)
... ...
@@ -772,7 +793,7 @@ modparam("registrar", "xavp_rcd_mask", 16)
772 793
 modparam("registrar", "xavp_rcd_mask", 20)
773 794
 ...
774 795
 
775
-3.27. gruu_enabled (integer)
796
+3.28. gruu_enabled (integer)
776 797
 
777 798
    If set to 1 and the “+sip.instance” parameter to Contact header of
778 799
    REGISTER is present, then the value of the parameter is saved to
... ...
@@ -782,12 +803,12 @@ modparam("registrar", "xavp_rcd_mask", 20)
782 803
 
783 804
    Default value is 1 (enabled).
784 805
 
785
-   Example 1.26. Set gruu_enabled parameter
806
+   Example 1.27. Set gruu_enabled parameter
786 807
 ...
787 808
 modparam("registrar", "gruu_enabled", 0)
788 809
 ...
789 810
 
790
-3.28. outbound_mode (integer)
811
+3.29. outbound_mode (integer)
791 812
 
792 813
    If set to 0 this module will accept REGISTER requests that do not
793 814
    contain a “Supported:” header with the outbound options-tag. The 200 OK
... ...
@@ -810,12 +831,12 @@ modparam("registrar", "gruu_enabled", 0)
810 831
 
811 832
    Default value is 0.
812 833
 
813
-   Example 1.27. Set outbound_mode parameter
834
+   Example 1.28. Set outbound_mode parameter
814 835
 ...
815 836
 modparam("registrar", "outbound_mode", 2)
816 837
 ...
817 838
 
818
-3.29. regid_mode (integer)
839
+3.30. regid_mode (integer)
819 840
 
820 841
    If set to 0 this module will ignore the “regid” contact param when
821 842
    saving REGISTER request if the request does not indicate support for
... ...
@@ -827,12 +848,12 @@ modparam("registrar", "outbound_mode", 2)
827 848
 
828 849
    Default value is 0.
829 850
 
830
-   Example 1.28. Set regid_mode parameter
851
+   Example 1.29. Set regid_mode parameter
831 852
 ...
832 853
 modparam("registrar", "regid_mode", 1)
833 854
 ...
834 855
 
835
-3.30. flow_timer (integer)
856
+3.31. flow_timer (integer)
836 857
 
837 858
    If set to 0 then this module will not add a “Flow-Timer:” header to 200
838 859
    OK responses to REGISTER requests.
... ...
@@ -854,12 +875,12 @@ modparam("registrar", "regid_mode", 1)
854 875
 
855 876
    Default value is 0.
856 877
 
857
-   Example 1.29. Set flow_timer parameter
878
+   Example 1.30. Set flow_timer parameter
858 879
 ...
859 880
 modparam("registrar", "flow_timer", 25)
860 881
 ...
861 882
 
862
-3.31. contact_max_size (integer)
883
+3.32. contact_max_size (integer)
863 884
 
864 885
    Max size of URIs in “Contact:” header.
865 886
 
... ...
@@ -874,12 +895,12 @@ modparam("registrar", "flow_timer", 25)
874 895
 
875 896
    Default value is 512.
876 897
 
877
-   Example 1.30. Set contact_max_size parameter
898
+   Example 1.31. Set contact_max_size parameter
878 899
 ...
879 900
 modparam("registrar", "contact_max_size", 1024)
880 901
 ...
881 902
 
882
-3.32. event_callback (str)
903
+3.33. event_callback (str)
883 904
 
884 905
    The name of the function in the KEMI configuration file (embedded
885 906
    scripting language such as Lua, Python, ...) to be executed instead of
... ...
@@ -890,7 +911,7 @@ modparam("registrar", "contact_max_size", 1024)
890 911
 
891 912
    Default value is 'empty' (no function is executed for events).
892 913
 
893
-   Example 1.31. Set event_callback parameter
914
+   Example 1.32. Set event_callback parameter
894 915
 ...
895 916
 modparam("registrar", "event_callback", "ksr_registrar_event")
896 917
 ...
... ...
@@ -901,7 +922,7 @@ function ksr_registrar_event(evname)
901 922
 end
902 923
 ...
903 924
 
904
-3.33. lookup_filter_mode (int)
925
+3.34. lookup_filter_mode (int)
905 926
 
906 927
    Control what filters should be applied to lookup(...) operations. It
907 928
    can be a combination (sum) of the next values:
... ...
@@ -912,7 +933,7 @@ end
912 933
 
913 934
    Default value is NULL (disabled).
914 935
 
915
-   Example 1.32. Set xavp_cfg parameter
936
+   Example 1.33. Set xavp_cfg parameter
916 937
 ...
917 938
 modparam("registrar", "xavp_cfg", "reg")
918 939
 modparam("registrar", "lookup_filter_mode", 1)
... ...
@@ -925,7 +946,7 @@ request_route {
925 946
 }
926 947
 ...
927 948
 
928
-3.34. use_expired_contacts (int)
949
+3.35. use_expired_contacts (int)
929 950
 
930 951
    Allow/Disallow the usage of the expired contacts.
931 952
      * 0 Disallow the usage of the expired contacts.
... ...
@@ -933,7 +954,7 @@ request_route {
933 954
 
934 955
    Default value is 0 (Disallow).
935 956
 
936
-   Example 1.33. Set use_expired_contacts parameter
957
+   Example 1.34. Set use_expired_contacts parameter
937 958
 ...
938 959
 modparam("registrar", "use_expired_contacts", 1)
939 960
 ...
... ...
@@ -994,7 +1015,7 @@ kamcmd cfg.set_now_int registrar use_expired_contacts 0
994 1015
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE and
995 1016
    REPLY_ROUTE.
996 1017
 
997
-   Example 1.34. save usage
1018
+   Example 1.35. save usage
998 1019
 ...
999 1020
 save("location");
1000 1021
 save("location", "0x01");
... ...
@@ -1027,7 +1048,7 @@ save("location", "0x00", "sip:test@kamailio.org");
1027 1048
 
1028 1049
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1029 1050
 
1030
-   Example 1.35. lookup usage
1051
+   Example 1.36. lookup usage
1031 1052
 ...
1032 1053
 lookup("location");
1033 1054
 switch ($retcode) {
... ...
@@ -1053,7 +1074,7 @@ switch ($retcode) {
1053 1074
 
1054 1075
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1055 1076
 
1056
-   Example 1.36. lookup_branches usage
1077
+   Example 1.37. lookup_branches usage
1057 1078
 ...
1058 1079
 lookup_branches("location");
1059 1080
 ...
... ...
@@ -1085,7 +1106,7 @@ lookup_branches("location");
1085 1106
 
1086 1107
    This function can be used from ANY_ROUTE.
1087 1108
 
1088
-   Example 1.37. registered usage
1109
+   Example 1.38. registered usage
1089 1110
 ...
1090 1111
 if (registered("location")) {
1091 1112
         sl_send_reply("100", "Trying");
... ...
@@ -1112,7 +1133,7 @@ if (registered("location","$rz:$Au", 2)) {
1112 1133
 
1113 1134
    This function can be used from REQUEST_ROUTE.
1114 1135
 
1115
-   Example 1.38. add_sock_hdr usage
1136
+   Example 1.39. add_sock_hdr usage
1116 1137
 ...
1117 1138
 add_sock_hdr("Sock-Info");
1118 1139
 ...
... ...
@@ -1142,7 +1163,7 @@ add_sock_hdr("Sock-Info");
1142 1163
      * -2 - Error in unregistering user
1143 1164
      * -3 - Contacts for AOR not found
1144 1165
 
1145
-   Example 1.39. unregister usage
1166
+   Example 1.40. unregister usage
1146 1167
 ...
1147 1168
 unregister("location", "$ru");
1148 1169
 unregister("location", "sip:user@kamailio.org");
... ...
@@ -1166,7 +1187,7 @@ unregister("location", "", "$ruid");
1166 1187
 
1167 1188
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1168 1189
 
1169
-   Example 1.40. reg_fetch_contacts usage
1190
+   Example 1.41. reg_fetch_contacts usage
1170 1191
 ...
1171 1192
 reg_fetch_contacts("location", "$ru", "callee");
1172 1193
 reg_fetch_contacts("location", "sip:user@kamailio.org", "caller");
... ...
@@ -1185,7 +1206,7 @@ reg_fetch_contacts("location", "sip:user@kamailio.org", "caller");
1185 1206
 
1186 1207
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1187 1208
 
1188
-   Example 1.41. reg_free_contacts usage
1209
+   Example 1.42. reg_free_contacts usage
1189 1210
 ...
1190 1211
 reg_free_contacts("callee");
1191 1212
 ...
... ...
@@ -1199,7 +1220,7 @@ reg_free_contacts("callee");
1199 1220
 
1200 1221
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1201 1222
 
1202
-   Example 1.42. reg_send_reply usage
1223
+   Example 1.43. reg_send_reply usage
1203 1224
 ...
1204 1225
 save("location", "0x2");
1205 1226
 ...
... ...
@@ -1215,7 +1236,7 @@ reg_send_reply();
1215 1236
    Executed when a contact in location table has expired. The variable
1216 1237
    $ulc(exp=>...) is filled with the attributes of the expired contact.
1217 1238
 
1218
-   Example 1.43. event_route[usrloc:contact-expired] usage
1239
+   Example 1.44. event_route[usrloc:contact-expired] usage
1219 1240
 ...
1220 1241
 event_route[usrloc:contact-expired] {
1221 1242
     xlog("expired contact for $ulc(exp=>aor)\n");
... ...
@@ -1289,7 +1310,7 @@ event_route[usrloc:contact-expired] {
1289 1310
    The pseudo-variable accepts positive index value to access a specific
1290 1311
    contact record.
1291 1312
 
1292
-   Example 1.44. $ulc(name) usage
1313
+   Example 1.45. $ulc(name) usage
1293 1314
 ...
1294 1315
 if(reg_fetch_contacts("location", "$fu", "caller"))
1295 1316
 {