Browse code

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

Kamailio Dev authored on 05/05/2021 18:46:11
Showing 1 changed files
... ...
@@ -46,13 +46,14 @@ Ramona-Elena Modroiu
46 46
               3.13. reg_timer_interval (int)
47 47
               3.14. reg_retry_interval (int)
48 48
               3.15. reg_random_delay (int)
49
-              3.16. reg_db_table (string)
50
-              3.17. reg_contact_addr (string)
51
-              3.18. reg_keep_callid (int)
52
-              3.19. reg_active (int)
53
-              3.20. reg_gc_interval (int)
54
-              3.21. default_socket (str)
55
-              3.22. event_callback (str)
49
+              3.16. reg_hash_size (int)
50
+              3.17. reg_db_table (string)
51
+              3.18. reg_contact_addr (string)
52
+              3.19. reg_keep_callid (int)
53
+              3.20. reg_active (int)
54
+              3.21. reg_gc_interval (int)
55
+              3.22. default_socket (str)
56
+              3.23. event_callback (str)
56 57
 
57 58
         4. Functions
58 59
 
... ...
@@ -110,40 +111,41 @@ Ramona-Elena Modroiu
110 111
    1.13. Set reg_timer_interval parameter
111 112
    1.14. Set reg_retry_interval parameter
112 113
    1.15. Set reg_random_delay parameter
113
-   1.16. Set reg_db_table parameter
114
-   1.17. Set reg_contact_addr parameter
115
-   1.18. Set reg_keep_callid parameter
116
-   1.19. Set reg_active parameter
117
-   1.20. Set reg_gc_interval parameter
118
-   1.21. Set the “default_socket” parameter
119
-   1.22. Set event_callback parameter
120
-   1.23. uac_replace_from usage
114
+   1.16. Set reg_hash_size parameter
115
+   1.17. Set reg_db_table parameter
116
+   1.18. Set reg_contact_addr parameter
117
+   1.19. Set reg_keep_callid parameter
118
+   1.20. Set reg_active parameter
119
+   1.21. Set reg_gc_interval parameter
120
+   1.22. Set the “default_socket” parameter
121
+   1.23. Set event_callback parameter
121 122
    1.24. uac_replace_from usage
122
-   1.25. uac_restore_from usage
123
-   1.26. uac_replace_to usage
123
+   1.25. uac_replace_from usage
124
+   1.26. uac_restore_from usage
124 125
    1.27. uac_replace_to usage
125
-   1.28. uac_restore_to usage
126
-   1.29. uac_auth usage
127
-   1.30. uac_auth_mode usage
128
-   1.31. uac_req_send usage
129
-   1.32. uac_reg_lookup usage
130
-   1.33. uac_reg_status usage
131
-   1.34. uac_reg_request_to usage
132
-   1.35. uac_reg_enable usage
133
-   1.36. uac_reg_disable usage
134
-   1.37. uac_reg_refresh usage
135
-   1.38. event_route[uac:reply] usage
136
-   1.39. uac.reg_dump usage
137
-   1.40. uac.reg_info usage
138
-   1.41. uac.reg_enable usage
139
-   1.42. uac.reg_disable usage
140
-   1.43. uac.reg_unregister usage
141
-   1.44. uac.reg_reload usage
142
-   1.45. uac.reg_refresh usage
143
-   1.46. uac.reg_active usage
144
-   1.47. uac.reg_add usage
145
-   1.48. uac.reg_remove usage
146
-   1.49. lookup remote registrations usage
126
+   1.28. uac_replace_to usage
127
+   1.29. uac_restore_to usage
128
+   1.30. uac_auth usage
129
+   1.31. uac_auth_mode usage
130
+   1.32. uac_req_send usage
131
+   1.33. uac_reg_lookup usage
132
+   1.34. uac_reg_status usage
133
+   1.35. uac_reg_request_to usage
134
+   1.36. uac_reg_enable usage
135
+   1.37. uac_reg_disable usage
136
+   1.38. uac_reg_refresh usage
137
+   1.39. event_route[uac:reply] usage
138
+   1.40. uac.reg_dump usage
139
+   1.41. uac.reg_info usage
140
+   1.42. uac.reg_enable usage
141
+   1.43. uac.reg_disable usage
142
+   1.44. uac.reg_unregister usage
143
+   1.45. uac.reg_reload usage
144
+   1.46. uac.reg_refresh usage
145
+   1.47. uac.reg_active usage
146
+   1.48. uac.reg_add usage
147
+   1.49. uac.reg_remove usage
148
+   1.50. lookup remote registrations usage
147 149
 
148 150
 Chapter 1. Admin Guide
149 151
 
... ...
@@ -172,13 +174,14 @@ Chapter 1. Admin Guide
172 174
         3.13. reg_timer_interval (int)
173 175
         3.14. reg_retry_interval (int)
174 176
         3.15. reg_random_delay (int)
175
-        3.16. reg_db_table (string)
176
-        3.17. reg_contact_addr (string)
177
-        3.18. reg_keep_callid (int)
178
-        3.19. reg_active (int)
179
-        3.20. reg_gc_interval (int)
180
-        3.21. default_socket (str)
181
-        3.22. event_callback (str)
177
+        3.16. reg_hash_size (int)
178
+        3.17. reg_db_table (string)
179
+        3.18. reg_contact_addr (string)
180
+        3.19. reg_keep_callid (int)
181
+        3.20. reg_active (int)
182
+        3.21. reg_gc_interval (int)
183
+        3.22. default_socket (str)
184
+        3.23. event_callback (str)
182 185
 
183 186
    4. Functions
184 187
 
... ...
@@ -290,13 +293,14 @@ Chapter 1. Admin Guide
290 293
    3.13. reg_timer_interval (int)
291 294
    3.14. reg_retry_interval (int)
292 295
    3.15. reg_random_delay (int)
293
-   3.16. reg_db_table (string)
294
-   3.17. reg_contact_addr (string)
295
-   3.18. reg_keep_callid (int)
296
-   3.19. reg_active (int)
297
-   3.20. reg_gc_interval (int)
298
-   3.21. default_socket (str)
299
-   3.22. event_callback (str)
296
+   3.16. reg_hash_size (int)
297
+   3.17. reg_db_table (string)
298
+   3.18. reg_contact_addr (string)
299
+   3.19. reg_keep_callid (int)
300
+   3.20. reg_active (int)
301
+   3.21. reg_gc_interval (int)
302
+   3.22. default_socket (str)
303
+   3.23. event_callback (str)
300 304
 
301 305
 3.1. rr_from_store_param (string)
302 306
 
... ...
@@ -515,18 +519,31 @@ modparam("uac", "reg_retry_interval", 300)
515 519
 modparam("uac", "reg_random_delay", 300)
516 520
 ...
517 521
 
518
-3.16. reg_db_table (string)
522
+3.16. reg_hash_size (int)
523
+
524
+   The number of entries of the hash table used by uac_reg to store the
525
+   registration records is 2^hash_size. For hash_size=4, the number of
526
+   slots of the hash table is 16.
527
+
528
+   Default value is “4” (16 slots).
529
+
530
+   Example 1.16. Set reg_hash_size parameter
531
+...
532
+modparam("uac", "reg_hash_size", 10)
533
+...
534
+
535
+3.17. reg_db_table (string)
519 536
 
520 537
    DB table name to fetch user profiles for registration.
521 538
 
522 539
    This parameter is optional, it's default value being “uacreg”.
523 540
 
524
-   Example 1.16. Set reg_db_table parameter
541
+   Example 1.17. Set reg_db_table parameter
525 542
 ...
526 543
 modparam("uac", "reg_db_table", "uacreg")
527 544
 ...
528 545
 
529
-3.17. reg_contact_addr (string)
546
+3.18. reg_contact_addr (string)
530 547
 
531 548
    Address to be used to build contact address. Must be at least host
532 549
    part, can have port and parameters. Must not include 'sip:'. The
... ...
@@ -536,24 +553,24 @@ modparam("uac", "reg_db_table", "uacreg")
536 553
    A contact_addr value in the uacreg table will override the parameter
537 554
    for this particular entry.
538 555
 
539
-   Example 1.17. Set reg_contact_addr parameter
556
+   Example 1.18. Set reg_contact_addr parameter
540 557
 ...
541 558
 modparam("uac", "reg_contact_addr", "192.168.1.2:5080")
542 559
 ...
543 560
 
544
-3.18. reg_keep_callid (int)
561
+3.19. reg_keep_callid (int)
545 562
 
546 563
    If set to 0 (default), a new Call-Id will be generated for each
547 564
    registration attempt. If set to non-zero, the same Call-Id will be used
548 565
    for re-registrations, as recommended by RFC3261 section 10.2.4. A new
549 566
    Call-Id will be generated when a previous registration had failed.
550 567
 
551
-   Example 1.18. Set reg_keep_callid parameter
568
+   Example 1.19. Set reg_keep_callid parameter
552 569
 ...
553 570
 modparam("uac", "reg_keep_callid", 1)
554 571
 ...
555 572
 
556
-3.19. reg_active (int)
573
+3.20. reg_active (int)
557 574
 
558 575
    If set to 0, no remote regisrations are done. In other words, it can
559 576
    control at once if the module should do remote registratios or not. It
... ...
@@ -561,12 +578,12 @@ modparam("uac", "reg_keep_callid", 1)
561 578
 
562 579
    The default value is 1 (active).
563 580
 
564
-   Example 1.19. Set reg_active parameter
581
+   Example 1.20. Set reg_active parameter
565 582
 ...
566 583
 modparam("uac", "reg_active", 0)
567 584
 ...
568 585
 
569
-3.20. reg_gc_interval (int)
586
+3.21. reg_gc_interval (int)
570 587
 
571 588
    Timer interval (in seconds) at which remote registrations are cleaned
572 589
    up in case of failure or removed. When setting it take in consideration
... ...
@@ -577,12 +594,12 @@ modparam("uac", "reg_active", 0)
577 594
 
578 595
    The default value is 150 seconds.
579 596
 
580
-   Example 1.20. Set reg_gc_interval parameter
597
+   Example 1.21. Set reg_gc_interval parameter
581 598
 ...
582 599
 modparam("uac", "reg_gc_interval", 60)
583 600
 ...
584 601
 
585
-3.21. default_socket (str)
602
+3.22. default_socket (str)
586 603
 
587 604
    Default socket to be used for generating registration requests and
588 605
    sending requests with the function uac_req_send(). Useful e.g. when
... ...
@@ -599,12 +616,12 @@ modparam("uac", "reg_gc_interval", 60)
599 616
    If you want to force a certain TCP port (e.g. 5060), you will need to
600 617
    set the tcp_reuse_port=yes core parameter as well.
601 618
 
602
-   Example 1.21. Set the “default_socket” parameter
619
+   Example 1.22. Set the “default_socket” parameter
603 620
  ...
604 621
  modparam("uac", "default_socket", "udp:192.168.0.125:5060")
605 622
  ...
606 623
 
607
-3.22. event_callback (str)
624
+3.23. event_callback (str)
608 625
 
609 626
    The name of the function in the kemi configuration file (embedded
610 627
    scripting language such as Lua, Python, ...) to be executed instead of
... ...
@@ -615,7 +632,7 @@ modparam("uac", "reg_gc_interval", 60)
615 632
 
616 633
    Default value is 'empty' (no function is executed for events).
617 634
 
618
-   Example 1.22. Set event_callback parameter
635
+   Example 1.23. Set event_callback parameter
619 636
  ...
620 637
 modparam("uac", "event_callback", "ksr_uac_event")
621 638
 
... ...
@@ -673,7 +690,7 @@ end
673 690
    dialog variables and registering callbacks in dialog module for in
674 691
    dialog requests.
675 692
 
676
-   Example 1.23. uac_replace_from usage
693
+   Example 1.24. uac_replace_from usage
677 694
 ...
678 695
 # replace both display and uri
679 696
 uac_replace_from("$avp(s:display)","$avp(s:uri)");
... ...
@@ -694,7 +711,7 @@ uac_replace_from("","");
694 711
 
695 712
    This function can be used from REQUEST_ROUTE and from BRANCH_ROUTE.
696 713
 
697
-   Example 1.24. uac_replace_from usage
714
+   Example 1.25. uac_replace_from usage
698 715
 ...
699 716
 uac_replace_from("sip:batman@gotham.org");
700 717
 ...
... ...
@@ -707,7 +724,7 @@ uac_replace_from("sip:batman@gotham.org");
707 724
 
708 725
    This function can be used from REQUEST_ROUTE.
709 726
 
710
-   Example 1.25. uac_restore_from usage
727
+   Example 1.26. uac_restore_from usage
711 728
 ...
712 729
 uac_restore_from();
713 730
 ...
... ...
@@ -724,7 +741,7 @@ uac_restore_from();
724 741
    automatically to display variable. That is no longer the case, if you
725 742
    expect that behavior, you will have to add the quotes by yourself.
726 743
 
727
-   Example 1.26. uac_replace_to usage
744
+   Example 1.27. uac_replace_to usage
728 745
 ...
729 746
 # replace both display and uri
730 747
 uac_replace_to("$avp(display)","$avp(uri)");
... ...
@@ -763,7 +780,7 @@ uac_replace_to("","");
763 780
    variables and registering callbacks in dialog module for in dialog
764 781
    requests.
765 782
 
766
-   Example 1.27. uac_replace_to usage
783
+   Example 1.28. uac_replace_to usage
767 784
 ...
768 785
 uac_replace_to("sip:batman@gotham.org");
769 786
 ...
... ...
@@ -776,7 +793,7 @@ uac_replace_to("sip:batman@gotham.org");
776 793
 
777 794
    This function can be used from REQUEST_ROUTE.
778 795
 
779
-   Example 1.28. uac_restore_to usage
796
+   Example 1.29. uac_restore_to usage
780 797
 ...
781 798
 uac_restore_to();
782 799
 ...
... ...
@@ -793,7 +810,7 @@ uac_restore_to();
793 810
 
794 811
    This function can be used from FAILURE_ROUTE.
795 812
 
796
-   Example 1.29. uac_auth usage
813
+   Example 1.30. uac_auth usage
797 814
 ...
798 815
 modparam("uac","auth_username_avp","$avp(auser)")
799 816
 modparam("uac","auth_password_avp","$avp(apass)")
... ...
@@ -837,7 +854,7 @@ failure_route[TRUNKAUTH] {
837 854
 
838 855
    This function can be used from FAILURE_ROUTE.
839 856
 
840
-   Example 1.30. uac_auth_mode usage
857
+   Example 1.31. uac_auth_mode usage
841 858
 ...
842 859
 modparam("uac","auth_username_avp","$avp(auser)")
843 860
 modparam("uac","auth_password_avp","$avp(apass)")
... ...
@@ -876,7 +893,7 @@ failure_route[TRUNKAUTH] {
876 893
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
877 894
    BRANCH_ROUTE, ONREPLY_ROUTE, LOCAL_ROUTE.
878 895
 
879
-   Example 1.31. uac_req_send usage
896
+   Example 1.32. uac_req_send usage
880 897
 ...
881 898
 $uac_req(method)="OPTIONS";
882 899
 $uac_req(ruri)="sip:kamailio.org";
... ...
@@ -893,7 +910,7 @@ uac_req_send();
893 910
 
894 911
    This function can be used from ANY_ROUTE.
895 912
 
896
-   Example 1.32. uac_reg_lookup usage
913
+   Example 1.33. uac_reg_lookup usage
897 914
 ...
898 915
 
899 916
 if(uac_reg_lookup("$rU", "$ru"))
... ...
@@ -917,7 +934,7 @@ if(uac_reg_lookup("$rU", "$ru"))
917 934
 
918 935
    This function can be used from ANY_ROUTE.
919 936
 
920
-   Example 1.33. uac_reg_status usage
937
+   Example 1.34. uac_reg_status usage
921 938
 ...
922 939
 $var(status) = uac_reg_status("$rU");
923 940
 ...
... ...
@@ -942,7 +959,7 @@ $var(status) = uac_reg_status("$rU");
942 959
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
943 960
    BRANCH_ROUTE.
944 961
 
945
-   Example 1.34. uac_reg_request_to usage
962
+   Example 1.35. uac_reg_request_to usage
946 963
 ...
947 964
 
948 965
 if(uac_reg_request_to("$fU", 0))
... ...
@@ -970,7 +987,7 @@ failure_route[REMOTE_AUTH] {
970 987
 
971 988
    The SIP processing is done on the next timer routine.
972 989
 
973
-   Example 1.35. uac_reg_enable usage
990
+   Example 1.36. uac_reg_enable usage
974 991
 ...
975 992
    uac_reg_enable("l_uuid", "account123");
976 993
 ...
... ...
@@ -984,7 +1001,7 @@ failure_route[REMOTE_AUTH] {
984 1001
 
985 1002
    The SIP processing is done on the next timer routine.
986 1003
 
987
-   Example 1.36. uac_reg_disable usage
1004
+   Example 1.37. uac_reg_disable usage
988 1005
 ...
989 1006
    uac_reg_disable("l_uuid", "account123");
990 1007
 ...
... ...
@@ -995,7 +1012,7 @@ failure_route[REMOTE_AUTH] {
995 1012
    record was already loaded, new values are taken from database,
996 1013
    otherwise a new record is created.
997 1014
 
998
-   Example 1.37. uac_reg_refresh usage
1015
+   Example 1.38. uac_reg_refresh usage
999 1016
 ...
1000 1017
    uac_reg_refresh("account123");
1001 1018
 ...
... ...
@@ -1019,7 +1036,7 @@ failure_route[REMOTE_AUTH] {
1019 1036
    then the event_route is executed twice, first for 401/407 and second
1020 1037
    for final reply of the transaction.
1021 1038
 
1022
-   Example 1.38. event_route[uac:reply] usage
1039
+   Example 1.39. event_route[uac:reply] usage
1023 1040
 ...
1024 1041
 $uac_req(method)="OPTIONS";
1025 1042
 $uac_req(ruri)="sip:kamailio.org";
... ...
@@ -1059,7 +1076,7 @@ event_route[uac:reply] {
1059 1076
 
1060 1077
    Dump the content of remote registration table from memory.
1061 1078
 
1062
-   Example 1.39. uac.reg_dump usage
1079
+   Example 1.40. uac.reg_dump usage
1063 1080
 ...
1064 1081
    kamcmd uac.reg_dump
1065 1082
 ...
... ...
@@ -1080,7 +1097,7 @@ event_route[uac:reply] {
1080 1097
      * 16 (2^4) - registration initialized (after loading from database,
1081 1098
        the registration process was initialized)
1082 1099
 
1083
-   Example 1.40. uac.reg_info usage
1100
+   Example 1.41. uac.reg_info usage
1084 1101
 ...
1085 1102
    kamcmd uac.reg_info l_uuid account123
1086 1103
    kamcmd uac.reg_info l_uuid s:12345678
... ...
@@ -1094,7 +1111,7 @@ event_route[uac:reply] {
1094 1111
    matched against the value of the attribute in the remote registration
1095 1112
    record.
1096 1113
 
1097
-   Example 1.41. uac.reg_enable usage
1114
+   Example 1.42. uac.reg_enable usage
1098 1115
 ...
1099 1116
    kamcmd uac.reg_enable l_uuid account123
1100 1117
    kamcmd uac.reg_enable l_uuid s:12345678
... ...
@@ -1108,7 +1125,7 @@ event_route[uac:reply] {
1108 1125
    matched against the value of the attribute in the remote registration
1109 1126
    record.
1110 1127
 
1111
-   Example 1.42. uac.reg_disable usage
1128
+   Example 1.43. uac.reg_disable usage
1112 1129
 ...
1113 1130
    kamcmd uac.reg_disable l_uuid account123
1114 1131
    kamcmd uac.reg_disable l_uuid s:12345678
... ...
@@ -1122,7 +1139,7 @@ event_route[uac:reply] {
1122 1139
    should be matched against the value of the attribute in the remote
1123 1140
    registration record.
1124 1141
 
1125
-   Example 1.43. uac.reg_unregister usage
1142
+   Example 1.44. uac.reg_unregister usage
1126 1143
 ...
1127 1144
    kamcmd uac.reg_unregister l_uuid account123
1128 1145
    kamcmd uac.reg_unregister l_uuid s:12345678
... ...
@@ -1135,7 +1152,7 @@ event_route[uac:reply] {
1135 1152
    150 seconds between reloads -- see the reg_gc_interval parameter for
1136 1153
    more details.
1137 1154
 
1138
-   Example 1.44. uac.reg_reload usage
1155
+   Example 1.45. uac.reg_reload usage
1139 1156
 ...
1140 1157
    kamcmd uac.reg_reload
1141 1158
 ...
... ...
@@ -1146,7 +1163,7 @@ event_route[uac:reply] {
1146 1163
    the record exists in memory, it will be replaced with the new values
1147 1164
    loaded from database.
1148 1165
 
1149
-   Example 1.45. uac.reg_refresh usage
1166
+   Example 1.46. uac.reg_refresh usage
1150 1167
 ...
1151 1168
    kamcmd uac.reg_refresh account123
1152 1169
    kamcmd uac.reg_refresh s:12345678
... ...
@@ -1158,7 +1175,7 @@ event_route[uac:reply] {
1158 1175
    1 enables remote registrations for all records and 0 disables doing
1159 1176
    them.
1160 1177
 
1161
-   Example 1.46. uac.reg_active usage
1178
+   Example 1.47. uac.reg_active usage
1162 1179
 ...
1163 1180
    kamctl rpc uac.reg_active 0
1164 1181
    kamctl rpc uac.reg_active 1
... ...
@@ -1189,7 +1206,7 @@ event_route[uac:reply] {
1189 1206
    Use a dot (.) if no value should be set for auth_password, auth_ha1, or
1190 1207
    contact_addr.
1191 1208
 
1192
-   Example 1.47. uac.reg_add usage
1209
+   Example 1.48. uac.reg_add usage
1193 1210
 ...
1194 1211
    kamcmd uac.reg_add ...
1195 1212
 ...
... ...
@@ -1198,7 +1215,7 @@ event_route[uac:reply] {
1198 1215
 
1199 1216
    Remove a UAC remote registration record by l_uuid.
1200 1217
 
1201
-   Example 1.48. uac.reg_remove usage
1218
+   Example 1.49. uac.reg_remove usage
1202 1219
 ...
1203 1220
    kamcmd uac.reg_remove my_l_uuid
1204 1221
 ...
... ...
@@ -1254,7 +1271,7 @@ event_route[uac:reply] {
1254 1271
    if the call is coming from a remote SIP provider and can change the
1255 1272
    R-URI to local username@domain. Afterwards you can run location lookup.
1256 1273
 
1257
-   Example 1.49. lookup remote registrations usage
1274
+   Example 1.50. lookup remote registrations usage
1258 1275
 ...
1259 1276
     if(uac_reg_lookup("$rU", "$ru")) {
1260 1277
         xlog("request from a remote SIP provider [$ou => $ru]\n");