Browse code

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

Kamailio Dev authored on 05/10/2018 05:31:52
Showing 2 changed files
... ...
@@ -51,9 +51,10 @@ Ovidiu Sas
51 51
               3.10. timer_interval (integer)
52 52
               3.11. db_expires (integer)
53 53
               3.12. enable_dmq (integer)
54
-              3.13. timer_procs (integer)
55
-              3.14. event_callback (str)
56
-              3.15. event_callback_mode (int)
54
+              3.13. dmq_init_sync (integer)
55
+              3.14. timer_procs (integer)
56
+              3.15. event_callback (str)
57
+              3.16. event_callback_mode (int)
57 58
 
58 59
         4. Functions
59 60
 
... ...
@@ -106,23 +107,24 @@ Ovidiu Sas
106 107
    1.13. Set timer_interval parameter
107 108
    1.14. Set db_expires parameter
108 109
    1.15. Set enable_dmq parameter
109
-   1.16. Set timer_procs parameter
110
-   1.17. Set event_callback parameter
111
-   1.18. Set event_callback_mode parameter
112
-   1.19. sht_print usage
113
-   1.20. sht_rm usage
114
-   1.21. sht_rm_name_re usage
115
-   1.22. sht_rm_value_re usage
116
-   1.23. sht_rm_name usage
117
-   1.24. sht_rm_value usage
118
-   1.25. sht_reset usage
119
-   1.26. sht_lock usage
120
-   1.27. sht_unlock usage
121
-   1.28. sht_iterator_start usage
122
-   1.29. sht_iterator_end usage
123
-   1.30. sht_iterator_next usage
124
-   1.31. sht_has_name usage
110
+   1.16. Set dmq_init_sync parameter
111
+   1.17. Set timer_procs parameter
112
+   1.18. Set event_callback parameter
113
+   1.19. Set event_callback_mode parameter
114
+   1.20. sht_print usage
115
+   1.21. sht_rm usage
116
+   1.22. sht_rm_name_re usage
117
+   1.23. sht_rm_value_re usage
118
+   1.24. sht_rm_name usage
119
+   1.25. sht_rm_value usage
120
+   1.26. sht_reset usage
121
+   1.27. sht_lock usage
122
+   1.28. sht_unlock usage
123
+   1.29. sht_iterator_start usage
124
+   1.30. sht_iterator_end usage
125
+   1.31. sht_iterator_next usage
125 126
    1.32. sht_has_name usage
127
+   1.33. sht_has_name usage
126 128
 
127 129
 Chapter 1. Admin Guide
128 130
 
... ...
@@ -149,9 +151,10 @@ Chapter 1. Admin Guide
149 151
         3.10. timer_interval (integer)
150 152
         3.11. db_expires (integer)
151 153
         3.12. enable_dmq (integer)
152
-        3.13. timer_procs (integer)
153
-        3.14. event_callback (str)
154
-        3.15. event_callback_mode (int)
154
+        3.13. dmq_init_sync (integer)
155
+        3.14. timer_procs (integer)
156
+        3.15. event_callback (str)
157
+        3.16. event_callback_mode (int)
155 158
 
156 159
    4. Functions
157 160
 
... ...
@@ -422,9 +425,10 @@ $ kamcmd htable.dump htable
422 425
    3.10. timer_interval (integer)
423 426
    3.11. db_expires (integer)
424 427
    3.12. enable_dmq (integer)
425
-   3.13. timer_procs (integer)
426
-   3.14. event_callback (str)
427
-   3.15. event_callback_mode (int)
428
+   3.13. dmq_init_sync (integer)
429
+   3.14. timer_procs (integer)
430
+   3.15. event_callback (str)
431
+   3.16. event_callback_mode (int)
428 432
 
429 433
 3.1. htable (str)
430 434
 
... ...
@@ -619,7 +623,21 @@ modparam("htable", "db_expires", 1)
619 623
 modparam("htable", "enable_dmq", 1)
620 624
 ...
621 625
 
622
-3.13. timer_procs (integer)
626
+3.13. dmq_init_sync (integer)
627
+
628
+   If set to 1, will request synchronization from other nodes at startup.
629
+   It applies to all tables having the "dmqreplicate" parameter set. As
630
+   above, it is important to ensure the definition (size, autoexpire etc.)
631
+   of replicated tables is identical across all instances.
632
+
633
+   Default value is 0.
634
+
635
+   Example 1.16. Set dmq_init_sync parameter
636
+...
637
+modparam("htable", "dmq_init_sync", 1)
638
+...
639
+
640
+3.14. timer_procs (integer)
623 641
 
624 642
    If set to 1 or greater, the module will create its own timer processes
625 643
    to scan for expired items in hash tables. If set to zero, it will use
... ...
@@ -628,12 +646,12 @@ modparam("htable", "enable_dmq", 1)
628 646
 
629 647
    Default value is 0.
630 648
 
631
-   Example 1.16. Set timer_procs parameter
649
+   Example 1.17. Set timer_procs parameter
632 650
 ...
633 651
 modparam("htable", "timer_procs", 4)
634 652
 ...
635 653
 
636
-3.14. event_callback (str)
654
+3.15. event_callback (str)
637 655
 
638 656
    The name of the function in the kemi configuration file (embedded
639 657
    scripting language such as Lua, Python, ...) to be executed instead of
... ...
@@ -645,7 +663,7 @@ modparam("htable", "timer_procs", 4)
645 663
 
646 664
    Default value is 'empty' (no function is executed for events).
647 665
 
648
-   Example 1.17. Set event_callback parameter
666
+   Example 1.18. Set event_callback parameter
649 667
 ...
650 668
 modparam("htable", "event_callback", "ksr_htable_event")
651 669
 ...
... ...
@@ -656,7 +674,7 @@ function ksr_htable_event(evname)
656 674
 end
657 675
 ...
658 676
 
659
-3.15. event_callback_mode (int)
677
+3.16. event_callback_mode (int)
660 678
 
661 679
    Control when event_route[htable:init] is executed: 0 - after all
662 680
    modules were initialized; 1 - in first worker process.
... ...
@@ -666,7 +684,7 @@ end
666 684
 
667 685
    Default value is 0.
668 686
 
669
-   Example 1.18. Set event_callback_mode parameter
687
+   Example 1.19. Set event_callback_mode parameter
670 688
 ...
671 689
 modparam("htable", "event_callback_mode", 1)
672 690
 ...
... ...
@@ -696,7 +714,7 @@ modparam("htable", "event_callback_mode", 1)
696 714
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
697 715
    ONREPLY_ROUTE, BRANCH_ROUTE.
698 716
 
699
-   Example 1.19. sht_print usage
717
+   Example 1.20. sht_print usage
700 718
 ...
701 719
 sht_print();
702 720
 ...
... ...
@@ -708,7 +726,7 @@ sht_print();
708 726
 
709 727
    This function can be used from ANY_ROUTE.
710 728
 
711
-   Example 1.20. sht_rm usage
729
+   Example 1.21. sht_rm usage
712 730
 ...
713 731
 sht_rm("ha", "test"");
714 732
 ...
... ...
@@ -721,7 +739,7 @@ sht_rm("ha", "test"");
721 739
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
722 740
    ONREPLY_ROUTE, BRANCH_ROUTE.
723 741
 
724
-   Example 1.21. sht_rm_name_re usage
742
+   Example 1.22. sht_rm_name_re usage
725 743
 ...
726 744
 sht_rm_name_re("ha=>.*");
727 745
 ...
... ...
@@ -734,7 +752,7 @@ sht_rm_name_re("ha=>.*");
734 752
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
735 753
    ONREPLY_ROUTE, BRANCH_ROUTE.
736 754
 
737
-   Example 1.22. sht_rm_value_re usage
755
+   Example 1.23. sht_rm_value_re usage
738 756
 ...
739 757
 sht_rm_value_re("ha=>.*");
740 758
 ...
... ...
@@ -752,7 +770,7 @@ sht_rm_value_re("ha=>.*");
752 770
 
753 771
    This function can be used from ANY_ROUTE.
754 772
 
755
-   Example 1.23. sht_rm_name usage
773
+   Example 1.24. sht_rm_name usage
756 774
 ...
757 775
 sht_rm_name("ha", "re", ".*");
758 776
 ...
... ...
@@ -770,7 +788,7 @@ sht_rm_name("ha", "re", ".*");
770 788
 
771 789
    This function can be used from ANY_ROUTE.
772 790
 
773
-   Example 1.24. sht_rm_value usage
791
+   Example 1.25. sht_rm_value usage
774 792
 ...
775 793
 sht_rm_value("ha", "re", ".*");
776 794
 ...
... ...
@@ -782,7 +800,7 @@ sht_rm_value("ha", "re", ".*");
782 800
 
783 801
    This function can be used from ANY_ROUTE.
784 802
 
785
-   Example 1.25. sht_reset usage
803
+   Example 1.26. sht_reset usage
786 804
 ...
787 805
 sht_reset("ha$var(x)");
788 806
 ...
... ...
@@ -795,7 +813,7 @@ sht_reset("ha$var(x)");
795 813
 
796 814
    This function can be used from ANY_ROUTE.
797 815
 
798
-   Example 1.26. sht_lock usage
816
+   Example 1.27. sht_lock usage
799 817
 ...
800 818
 sht_lock("ha=>test");
801 819
 ...
... ...
@@ -808,7 +826,7 @@ sht_lock("ha=>test");
808 826
 
809 827
    This function can be used from ANY_ROUTE.
810 828
 
811
-   Example 1.27. sht_unlock usage
829
+   Example 1.28. sht_unlock usage
812 830
 ...
813 831
 sht_lock("ha=>test");
814 832
 $sht(ha=>test) = $sht(ha=>test) + 10;
... ...
@@ -830,7 +848,7 @@ sht_unlock("ha=>test");
830 848
 
831 849
    This function can be used from ANY_ROUTE.
832 850
 
833
-   Example 1.28. sht_iterator_start usage
851
+   Example 1.29. sht_iterator_start usage
834 852
 ...
835 853
 sht_iterator_start("i1", "h1");
836 854
 ...
... ...
@@ -845,7 +863,7 @@ sht_iterator_start("i1", "h1");
845 863
 
846 864
    This function can be used from ANY_ROUTE.
847 865
 
848
-   Example 1.29. sht_iterator_end usage
866
+   Example 1.30. sht_iterator_end usage
849 867
 ...
850 868
 sht_iterator_end("i1");
851 869
 ...
... ...
@@ -867,7 +885,7 @@ sht_iterator_end("i1");
867 885
 
868 886
    This function can be used from ANY_ROUTE.
869 887
 
870
-   Example 1.30. sht_iterator_next usage
888
+   Example 1.31. sht_iterator_next usage
871 889
 ...
872 890
     sht_iterator_start("i1", "h1");
873 891
     while(sht_iterator_next("i1")) {
... ...
@@ -891,7 +909,7 @@ sht_iterator_end("i1");
891 909
 
892 910
    This function can be used from ANY_ROUTE.
893 911
 
894
-   Example 1.31. sht_has_name usage
912
+   Example 1.32. sht_has_name usage
895 913
 ...
896 914
 if(sht_has_name("ha", "eq", "alice")) {
897 915
   ...
... ...
@@ -913,7 +931,7 @@ if(sht_has_name("ha", "eq", "alice")) {
913 931
 
914 932
    This function can be used from ANY_ROUTE.
915 933
 
916
-   Example 1.32. sht_has_name usage
934
+   Example 1.33. sht_has_name usage
917 935
 ...
918 936
 if(sht_has_str_value("ha", "eq", "alice")) {
919 937
   ...
... ...
@@ -79,26 +79,27 @@ Gabriel Vasile
79 79
               4.9. tel2sip(uri, hostpart, result)
80 80
               4.10. is_e164(pseudo-variable)
81 81
               4.11. is_uri_user_e164(pseudo-variable)
82
-              4.12. is_tel_number(tval)
83
-              4.13. is_numeric(tval)
84
-              4.14. is_alphanum(tval)
85
-              4.15. is_alphanumex(tval, eset)
86
-              4.16. encode_contact(encoding_prefix,hostpart)
87
-              4.17. decode_contact()
88
-              4.18. decode_contact_header()
89
-              4.19. cmp_uri(str1, str2)
90
-              4.20. cmp_aor(str1, str2)
91
-              4.21. append_rpid_hf()
92
-              4.22. append_rpid_hf(prefix, suffix)
93
-              4.23. is_rpid_user_e164()
94
-              4.24. set_uri_user(uri, user)
95
-              4.25. set_uri_host(uri, host)
96
-              4.26. is_request()
97
-              4.27. is_reply()
98
-              4.28. is_gruu([uri])
99
-              4.29. is_supported(option)
100
-              4.30. is_first_hop()
101
-              4.31. sip_p_charging_vector(flags)
82
+              4.12. is_uri(pseudo-variable)
83
+              4.13. is_tel_number(tval)
84
+              4.14. is_numeric(tval)
85
+              4.15. is_alphanum(tval)
86
+              4.16. is_alphanumex(tval, eset)
87
+              4.17. encode_contact(encoding_prefix,hostpart)
88
+              4.18. decode_contact()
89
+              4.19. decode_contact_header()
90
+              4.20. cmp_uri(str1, str2)
91
+              4.21. cmp_aor(str1, str2)
92
+              4.22. append_rpid_hf()
93
+              4.23. append_rpid_hf(prefix, suffix)
94
+              4.24. is_rpid_user_e164()
95
+              4.25. set_uri_user(uri, user)
96
+              4.26. set_uri_host(uri, host)
97
+              4.27. is_request()
98
+              4.28. is_reply()
99
+              4.29. is_gruu([uri])
100
+              4.30. is_supported(option)
101
+              4.31. is_first_hop()
102
+              4.32. sip_p_charging_vector(flags)
102 103
 
103 104
         5. Exported pseudo-variables
104 105
 
... ...
@@ -130,26 +131,27 @@ Gabriel Vasile
130 131
    1.18. tel2sip usage
131 132
    1.19. is_e164 usage
132 133
    1.20. is_uri_user_e164 usage
133
-   1.21. is_tel_number usage
134
-   1.22. is_numeric usage
135
-   1.23. is_alphanum usage
136
-   1.24. is_alphanumex usage
137
-   1.25. encode_contact usage
138
-   1.26. decode_contact usage
139
-   1.27. decode_contact_header usage
140
-   1.28. cmp_uri usage
141
-   1.29. cmp_aor usage
142
-   1.30. append_rpid_hf usage
143
-   1.31. append_rpid_hf(prefix, suffix) usage
144
-   1.32. is_rpid_user_e164 usage
145
-   1.33. set_uri_user usage
146
-   1.34. set_uri_host usage
147
-   1.35. is_request usage
148
-   1.36. is_reply usage
149
-   1.37. is_gruu() usage
150
-   1.38. is_supported() usage
151
-   1.39. is_first_hop() usage
152
-   1.40. sip_p_charging_vector() usage
134
+   1.21. is_uri usage
135
+   1.22. is_tel_number usage
136
+   1.23. is_numeric usage
137
+   1.24. is_alphanum usage
138
+   1.25. is_alphanumex usage
139
+   1.26. encode_contact usage
140
+   1.27. decode_contact usage
141
+   1.28. decode_contact_header usage
142
+   1.29. cmp_uri usage
143
+   1.30. cmp_aor usage
144
+   1.31. append_rpid_hf usage
145
+   1.32. append_rpid_hf(prefix, suffix) usage
146
+   1.33. is_rpid_user_e164 usage
147
+   1.34. set_uri_user usage
148
+   1.35. set_uri_host usage
149
+   1.36. is_request usage
150
+   1.37. is_reply usage
151
+   1.38. is_gruu() usage
152
+   1.39. is_supported() usage
153
+   1.40. is_first_hop() usage
154
+   1.41. sip_p_charging_vector() usage
153 155
 
154 156
 Chapter 1. Admin Guide
155 157
 
... ...
@@ -186,26 +188,27 @@ Chapter 1. Admin Guide
186 188
         4.9. tel2sip(uri, hostpart, result)
187 189
         4.10. is_e164(pseudo-variable)
188 190
         4.11. is_uri_user_e164(pseudo-variable)
189
-        4.12. is_tel_number(tval)
190
-        4.13. is_numeric(tval)
191
-        4.14. is_alphanum(tval)
192
-        4.15. is_alphanumex(tval, eset)
193
-        4.16. encode_contact(encoding_prefix,hostpart)
194
-        4.17. decode_contact()
195
-        4.18. decode_contact_header()
196
-        4.19. cmp_uri(str1, str2)
197
-        4.20. cmp_aor(str1, str2)
198
-        4.21. append_rpid_hf()
199
-        4.22. append_rpid_hf(prefix, suffix)
200
-        4.23. is_rpid_user_e164()
201
-        4.24. set_uri_user(uri, user)
202
-        4.25. set_uri_host(uri, host)
203
-        4.26. is_request()
204
-        4.27. is_reply()
205
-        4.28. is_gruu([uri])
206
-        4.29. is_supported(option)
207
-        4.30. is_first_hop()
208
-        4.31. sip_p_charging_vector(flags)
191
+        4.12. is_uri(pseudo-variable)
192
+        4.13. is_tel_number(tval)
193
+        4.14. is_numeric(tval)
194
+        4.15. is_alphanum(tval)
195
+        4.16. is_alphanumex(tval, eset)
196
+        4.17. encode_contact(encoding_prefix,hostpart)
197
+        4.18. decode_contact()
198
+        4.19. decode_contact_header()
199
+        4.20. cmp_uri(str1, str2)
200
+        4.21. cmp_aor(str1, str2)
201
+        4.22. append_rpid_hf()
202
+        4.23. append_rpid_hf(prefix, suffix)
203
+        4.24. is_rpid_user_e164()
204
+        4.25. set_uri_user(uri, user)
205
+        4.26. set_uri_host(uri, host)
206
+        4.27. is_request()
207
+        4.28. is_reply()
208
+        4.29. is_gruu([uri])
209
+        4.30. is_supported(option)
210
+        4.31. is_first_hop()
211
+        4.32. sip_p_charging_vector(flags)
209 212
 
210 213
    5. Exported pseudo-variables
211 214
 
... ...
@@ -400,26 +403,27 @@ modparam("auth", "rpid_avp", "$avp(myrpid)")
400 403
    4.9. tel2sip(uri, hostpart, result)
401 404
    4.10. is_e164(pseudo-variable)
402 405
    4.11. is_uri_user_e164(pseudo-variable)
403
-   4.12. is_tel_number(tval)
404
-   4.13. is_numeric(tval)
405
-   4.14. is_alphanum(tval)
406
-   4.15. is_alphanumex(tval, eset)
407
-   4.16. encode_contact(encoding_prefix,hostpart)
408
-   4.17. decode_contact()
409
-   4.18. decode_contact_header()
410
-   4.19. cmp_uri(str1, str2)
411
-   4.20. cmp_aor(str1, str2)
412
-   4.21. append_rpid_hf()
413
-   4.22. append_rpid_hf(prefix, suffix)
414
-   4.23. is_rpid_user_e164()
415
-   4.24. set_uri_user(uri, user)
416
-   4.25. set_uri_host(uri, host)
417
-   4.26. is_request()
418
-   4.27. is_reply()
419
-   4.28. is_gruu([uri])
420
-   4.29. is_supported(option)
421
-   4.30. is_first_hop()
422
-   4.31. sip_p_charging_vector(flags)
406
+   4.12. is_uri(pseudo-variable)
407
+   4.13. is_tel_number(tval)
408
+   4.14. is_numeric(tval)
409
+   4.15. is_alphanum(tval)
410
+   4.16. is_alphanumex(tval, eset)
411
+   4.17. encode_contact(encoding_prefix,hostpart)
412
+   4.18. decode_contact()
413
+   4.19. decode_contact_header()
414
+   4.20. cmp_uri(str1, str2)
415
+   4.21. cmp_aor(str1, str2)
416
+   4.22. append_rpid_hf()
417
+   4.23. append_rpid_hf(prefix, suffix)
418
+   4.24. is_rpid_user_e164()
419
+   4.25. set_uri_user(uri, user)
420
+   4.26. set_uri_host(uri, host)
421
+   4.27. is_request()
422
+   4.28. is_reply()
423
+   4.29. is_gruu([uri])
424
+   4.30. is_supported(option)
425
+   4.31. is_first_hop()
426
+   4.32. sip_p_charging_vector(flags)
423 427
 
424 428
 4.1.  ring_insert_callid()
425 429
 
... ...
@@ -624,14 +628,31 @@ if (is_uri_user_e164("$avp(i:705)") {
624 628
 };
625 629
 ...
626 630
 
627
-4.12.  is_tel_number(tval)
631
+4.12.  is_uri(pseudo-variable)
632
+
633
+   Checks if string value of pseudo variable argument is a valid uri.
634
+
635
+   This function can be used from ANY_ROUTE.
636
+
637
+   Example 1.21. is_uri usage
638
+...
639
+if (is_uri("$var(x)")) {  # Check if variable contains a uri
640
+   ...
641
+}
642
+if (is_uri("$avp(i:705)") {
643
+   # Check value stored in avp i:705
644
+   ...
645
+};
646
+...
647
+
648
+4.13.  is_tel_number(tval)
628 649
 
629 650
    Checks if the parameter value is a telephone number: starting with one
630 651
    optional +, followed by digits. The parameter can include variables.
631 652
 
632 653
    This function can be used from ANY_ROUTE.
633 654
 
634
-   Example 1.21. is_tel_number usage
655
+   Example 1.22. is_tel_number usage
635 656
 ...
636 657
 if (is_tel_number("$rU")) {  # Test if R-URI user is telephone number
637 658
    ...
... ...
@@ -641,35 +662,35 @@ if (is_tel_number("+24242424") {
641 662
 }
642 663
 ...
643 664
 
644
-4.13.  is_numeric(tval)
665
+4.14.  is_numeric(tval)
645 666
 
646 667
    Checks if the parameter value consists solely of decimal digits. The
647 668
    parameter can include variables.
648 669
 
649 670
    This function can be used from ANY_ROUTE.
650 671
 
651
-   Example 1.22. is_numeric usage
672
+   Example 1.23. is_numeric usage
652 673
 ...
653 674
 if (is_numeric("$rU")) {  # Test if R-URI user consists of decimal digits
654 675
    ...
655 676
 }
656 677
 ...
657 678
 
658
-4.14.  is_alphanum(tval)
679
+4.15.  is_alphanum(tval)
659 680
 
660 681
    Checks if the parameter value consists solely of decimal digits or
661 682
    alphabetic ASCII characters. The parameter can include variables.
662 683
 
663 684
    This function can be used from ANY_ROUTE.
664 685
 
665
-   Example 1.23. is_alphanum usage
686
+   Example 1.24. is_alphanum usage
666 687
 ...
667 688
 if (is_alphanum("$rU")) {
668 689
    ...
669 690
 }
670 691
 ...
671 692
 
672
-4.15.  is_alphanumex(tval, eset)
693
+4.16.  is_alphanumex(tval, eset)
673 694
 
674 695
    Checks if the value of parameter 'tval' consists solely of decimal
675 696
    digits, alphabetic ASCII characters and the characters in the second
... ...
@@ -677,14 +698,14 @@ if (is_alphanum("$rU")) {
677 698
 
678 699
    This function can be used from ANY_ROUTE.
679 700
 
680
-   Example 1.24. is_alphanumex usage
701
+   Example 1.25. is_alphanumex usage
681 702
 ...
682 703
 if (is_alphanumex("$rU", "+.-_")) {
683 704
    ...
684 705
 }
685 706
 ...
686 707
 
687
-4.16.  encode_contact(encoding_prefix,hostpart)
708
+4.17.  encode_contact(encoding_prefix,hostpart)
688 709
 
689 710
    This function will encode uri-s inside Contact header in the following
690 711
    manner sip:username:password@ip:port;transport=protocol goes
... ...
@@ -706,12 +727,12 @@ if (is_alphanumex("$rU", "+.-_")) {
706 727
 
707 728
    This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
708 729
 
709
-   Example 1.25. encode_contact usage
730
+   Example 1.26. encode_contact usage
710 731
 ...
711 732
 if (src_ip == 10.0.0.0/8) encode_contact("natted_client","1.2.3.4");
712 733
 ...
713 734
 
714
-4.17.  decode_contact()
735
+4.18.  decode_contact()
715 736
 
716 737
    This function will decode the request URI. If the RURI is in the format
717 738
    sip:encoding_prefix*username*ip*port*protocol@hostpart it will be
... ...
@@ -724,12 +745,12 @@ if (src_ip == 10.0.0.0/8) encode_contact("natted_client","1.2.3.4");
724 745
 
725 746
    This function can be used from REQUEST_ROUTE.
726 747
 
727
-   Example 1.26. decode_contact usage
748
+   Example 1.27. decode_contact usage
728 749
 ...
729 750
 if (uri =~ "^sip:natted_client") { decode_contact(); }
730 751
 ...
731 752
 
732
-4.18.  decode_contact_header()
753
+4.19.  decode_contact_header()
733 754
 
734 755
    This function will decode URIs inside Contact header. If the URI in the
735 756
    format sip:encoding_prefix*username*ip*port*protocol@hostpart it will
... ...
@@ -742,7 +763,7 @@ if (uri =~ "^sip:natted_client") { decode_contact(); }
742 763
 
743 764
    This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE.
744 765
 
745
-   Example 1.27. decode_contact_header usage
766
+   Example 1.28. decode_contact_header usage
746 767
 ...
747 768
 reply_route[2] {
748 769
         ...
... ...
@@ -751,13 +772,13 @@ reply_route[2] {
751 772
 }
752 773
 ...
753 774
 
754
-4.19.  cmp_uri(str1, str2)
775
+4.20.  cmp_uri(str1, str2)
755 776
 
756 777
    The function returns true if the two parameters matches as SIP URI.
757 778
 
758 779
    This function can be used from ANY_ROUTE.
759 780
 
760
-   Example 1.28. cmp_uri usage
781
+   Example 1.29. cmp_uri usage
761 782
 ...
762 783
 if(cmp_uri("$ru", "sip:kamailio@kamailio.org"))
763 784
 {
... ...
@@ -765,14 +786,14 @@ if(cmp_uri("$ru", "sip:kamailio@kamailio.org"))
765 786
 }
766 787
 ...
767 788
 
768
-4.20.  cmp_aor(str1, str2)
789
+4.21.  cmp_aor(str1, str2)
769 790
 
770 791
    The function returns true if the two parameters matches as AoR. The
771 792
    parameters have to be SIP URIs.
772 793
 
773 794
    This function can be used from ANY_ROUTE.
774 795
 
775
-   Example 1.29. cmp_aor usage
796
+   Example 1.30. cmp_aor usage
776 797
 ...
777 798
 if(cmp_aor("$rU@KaMaIlIo.org", "sip:kamailio@$fd"))
778 799
 {
... ...
@@ -780,7 +801,7 @@ if(cmp_aor("$rU@KaMaIlIo.org", "sip:kamailio@$fd"))
780 801
 }
781 802
 ...
782 803
 
783
-4.21.  append_rpid_hf()
804
+4.22.  append_rpid_hf()
784 805
 
785 806
    Appends to the message a Remote-Party-ID header that contains header
786 807
    'Remote-Party-ID: ' followed by the saved value of the SIP URI received
... ...
@@ -791,14 +812,14 @@ if(cmp_aor("$rU@KaMaIlIo.org", "sip:kamailio@$fd"))
791 812
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
792 813
    BRANCH_ROUTE.
793 814
 
794
-   Example 1.30. append_rpid_hf usage
815
+   Example 1.31. append_rpid_hf usage
795 816
 ...
796 817
 append_rpid_hf();  # Append Remote-Party-ID header field
797 818
 ...
798 819
 
799
-4.22.  append_rpid_hf(prefix, suffix)
820
+4.23.  append_rpid_hf(prefix, suffix)
800 821
 
801
-   This function is the same as Section 4.21, “ append_rpid_hf()”. The
822
+   This function is the same as Section 4.22, “ append_rpid_hf()”. The
802 823
    only difference is that it accepts two parameters--prefix and suffix to
803 824
    be added to Remote-Party-ID header field. This function ignores
804 825
    rpid_prefix and rpid_suffix parameters, instead of that allows to set
... ...
@@ -815,13 +836,13 @@ append_rpid_hf();  # Append Remote-Party-ID header field
815 836
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
816 837
    BRANCH_ROUTE.
817 838
 
818
-   Example 1.31. append_rpid_hf(prefix, suffix) usage
839
+   Example 1.32. append_rpid_hf(prefix, suffix) usage
819 840
 ...
820 841
 # Append Remote-Party-ID header field
821 842
 append_rpid_hf("", ";party=calling;id-type=subscriber;screen=yes");
822 843
 ...
823 844
 
824
-4.23.  is_rpid_user_e164()
845
+4.24.  is_rpid_user_e164()
825 846
 
826 847
    The function checks if the SIP URI received from the database or radius
827 848
    server and will potentially be used in Remote-Party-ID header field
... ...
@@ -831,68 +852,68 @@ append_rpid_hf("", ";party=calling;id-type=subscriber;screen=yes");
831 852
 
832 853
    This function can be used from REQUEST_ROUTE.
833 854
 
834
-   Example 1.32. is_rpid_user_e164 usage
855
+   Example 1.33. is_rpid_user_e164 usage
835 856
 ...
836 857
 if (is_rpid_user_e164()) {
837 858
     # do something here
838 859
 };
839 860
 ...
840 861
 
841
-4.24.  set_uri_user(uri, user)
862
+4.25.  set_uri_user(uri, user)
842 863
 
843 864
    Sets userpart of SIP URI stored in writable pseudo variable 'uri' to
844 865
    value of pseudo variable 'user'.
845 866
 
846 867
    This function can be used from ANY_ROUTE.
847 868
 
848
-   Example 1.33. set_uri_user usage
869
+   Example 1.34. set_uri_user usage
849 870
 ...
850 871
 $var(uri) = "sip:user@host";
851 872
 $var(user) = "new_user";
852 873
 set_uri_user("$var(uri)", "$var(user)");
853 874
 ...
854 875
 
855
-4.25.  set_uri_host(uri, host)
876
+4.26.  set_uri_host(uri, host)
856 877
 
857 878
    Sets hostpart of SIP URI stored in writable pseudo variable 'uri' to
858 879
    value of pseudo variable 'host'.
859 880
 
860 881
    This function can be used from ANY_ROUTE.
861 882
 
862
-   Example 1.34. set_uri_host usage
883
+   Example 1.35. set_uri_host usage
863 884
 ...
864 885
 $var(uri) = "sip:user@host";
865 886
 $var(host) = "new_host";
866 887
 set_uri_host("$var(uri)", "$var(host)");
867 888
 ...
868 889
 
869
-4.26.  is_request()
890
+4.27.  is_request()
870 891
 
871 892
    Return true if the SIP message is a request.
872 893
 
873 894
    This function can be used from ANY_ROUTE.
874 895
 
875
-   Example 1.35. is_request usage
896
+   Example 1.36. is_request usage
876 897
 ...
877 898
 if (is_request()) {
878 899
         ...
879 900
 }
880 901
 ...
881 902
 
882
-4.27.  is_reply()
903
+4.28.  is_reply()
883 904
 
884 905
    Return true if the SIP message is a reply.
885 906
 
886 907
    This function can be used from ANY_ROUTE.
887 908
 
888
-   Example 1.36. is_reply usage
909
+   Example 1.37. is_reply usage
889 910
 ...
890 911
 if (is_reply()) {
891 912
         ...
892 913
 }
893 914
 ...
894 915
 
895
-4.28.  is_gruu([uri])
916
+4.29.  is_gruu([uri])
896 917
 
897 918
    The function returns true if the uri is GRUU ('gr' parameter is
898 919
    present): 1 - pub-gruu; 2 - temp-gruu.
... ...
@@ -903,12 +924,12 @@ if (is_reply()) {
903 924
 
904 925
    This function can be used from ANY_ROUTE.
905 926
 
906
-   Example 1.37. is_gruu() usage
927
+   Example 1.38. is_gruu() usage
907 928
 ...
908 929
 if(is_gruu()) { ... }
909 930
 ...
910 931
 
911
-4.29.  is_supported(option)
932
+4.30.  is_supported(option)
912 933
 
913 934
    Function returns true if given option is listed in Supported header(s)
914 935
    (if any) of the request. Currently the following options are known:
... ...
@@ -916,12 +937,12 @@ if(is_gruu()) { ... }
916 937
 
917 938
    This function can be used from ANY_ROUTE.
918 939
 
919
-   Example 1.38. is_supported() usage
940
+   Example 1.39. is_supported() usage
920 941
 ...
921 942
 if (is_supported("outbound")) { ... }
922 943
 ...
923 944
 
924
-4.30.  is_first_hop()
945
+4.31.  is_first_hop()
925 946
 
926 947
    The function returns true if the proxy is first hop after the original
927 948
    sender. For incoming SIP requests, it means there is only one Via
... ...
@@ -935,19 +956,19 @@ if (is_supported("outbound")) { ... }
935 956
 
936 957
    This function can be used from ANY_ROUTE.
937 958
 
938
-   Example 1.39. is_first_hop() usage
959
+   Example 1.40. is_first_hop() usage
939 960
 ...
940 961
 if(is_first_hop()) { ... }
941 962
 ...
942 963
 
943
-4.31.  sip_p_charging_vector(flags)
964
+4.32.  sip_p_charging_vector(flags)
944 965
 
945 966
    Manage the P-Charging-Vector header (RFC7315). The flags can be: 'r' -
946 967
    remove; 'g' - generate; 'f' - force (remove + generate).
947 968
 
948 969
    This function can be used from ANY_ROUTE.
949 970
 
950
-   Example 1.40. sip_p_charging_vector() usage
971
+   Example 1.41. sip_p_charging_vector() usage
951 972
 ...
952 973
 sip_p_charging_vector("g");
953 974
 ...