Browse code

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

Kamailio Dev authored on 21/09/2021 19:01:12
Showing 1 changed files
... ...
@@ -725,15 +725,20 @@ modparam("registrar", "reg_callid_avp", "$avp(s:avp)")
725 725
    Defines the name of XAVP class to store runtime module config values.
726 726
    The values are stored as inner XAVPs, like $xavp(class=>attribute).
727 727
    Valid inner XAVP names:
728
-     * expires - the number of maximum contacts to be stored for the
729
-       current registration AoR. It overwrites the 'max_contacts' module
730
-       parameter value.
731
-     * q - the expires value, to overwrite the value from SIP headers.
728
+     * match_callid - filter contacts by callid. Used in registered().
729
+     * match_contact - filter contacts by contact. Used in registered().
730
+     * match_received - filter contacts by received. Used in registered().
731
+     * rlf_bflags - filter contacts by branch flags. Used in lookup().
732
+     * q - q value of contact (integer 0-1000). It overrides q value given
733
+       in contact header and default_q parameter. Used in save().
734
+     * expires - the expires value, to overwrite the value from SIP
735
+       headers. Used in save().
732 736
      * max_contacts - the number of maximum contacts to be stored for the
733 737
        current registration AoR. It overwrites the 'max_contacts' module
734
-       parameter value.
738
+       parameter value. Used in save().
735 739
      * socket - the string representing the socket on which the register
736
-       request was received, as alternative to using the sock_hdr.
740
+       request was received, as alternative to using the sock_hdr. Used in
741
+       save().
737 742
 
738 743
    For example. if this parameter is set to 'reg', then the number of
739 744
    maximum contacts can be set in $xavp(reg=>max_contacts).
... ...
@@ -1120,7 +1125,7 @@ lookup_branches("location");
1120 1125
      * uri (optional) - SIP URI to do be used instead of Request/To-URI.
1121 1126
        It can be a dynamic string with pseudo-variables.
1122 1127
      * match_option (optional) - flag parameter to restrict contact
1123
-       search. use reg_xavp_cfg to set the values to compare to.
1128
+       search. use xavp_cfg to set the values to compare to.
1124 1129
        flag values is as follows:
1125 1130
           + 1 - match_callid
1126 1131
           + 2 - match_received
Browse code

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

Kamailio Dev authored on 13/09/2021 07:31:18
Showing 1 changed files
... ...
@@ -1009,6 +1009,8 @@ kamcmd cfg.set_now_int registrar use_expired_contacts 0
1009 1009
             AoR (user).
1010 1010
           + 0x08 - Do not apply expires_range or default_expires_range to
1011 1011
             this registration.
1012
+          + 0x10 - prepare the headers for reply, used only if flag 0x02
1013
+            is set.
1012 1014
        The flags may be given in decimal or hexadecimal format.
1013 1015
      * uri (optional - flags param has to be set and can be 0 for default
1014 1016
        behavior) - SIP URI to do be used instead of To header URI. It can
Browse code

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

Kamailio Dev authored on 10/09/2021 11:31:16
Showing 1 changed files
... ...
@@ -935,6 +935,9 @@ end
935 935
        with branch flags matching at least one set inside xavp specified
936 936
        by xavp_cfg parameter with inner name rlf_bflags - e.g.,
937 937
        $xavp(reg=>rlf_bflags).
938
+     * 2 - apply the active tcp connection filter - return only contact
939
+       records that have the associated TCP/TLS/WSS connection active. UDP
940
+       and SCTP contacts are not filtered, all are returned.
938 941
 
939 942
    Default value is NULL (disabled).
940 943
 
Browse code

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

Kamailio Dev authored on 12/03/2021 08:16:23
Showing 1 changed files
... ...
@@ -85,15 +85,16 @@ Bogdan-Andre Iancu
85 85
 
86 86
               4.1. save(domain, [, flags [, uri]])
87 87
               4.2. lookup(domain [, uri])
88
-              4.3. lookup_branches(domain)
89
-              4.4. registered(domain [, uri [, match_option [,
88
+              4.3. lookup_to_dset(domain [, uri])
89
+              4.4. lookup_branches(domain)
90
+              4.5. registered(domain [, uri [, match_option [,
90 91
                       match_action]]])
91 92
 
92
-              4.5. add_sock_hdr(hdr_name)
93
-              4.6. unregister(domain, uri[, ruid])
94
-              4.7. reg_fetch_contacts(domain, uri, profile)
95
-              4.8. reg_free_contacts(profile)
96
-              4.9. reg_send_reply()
93
+              4.6. add_sock_hdr(hdr_name)
94
+              4.7. unregister(domain, uri[, ruid])
95
+              4.8. reg_fetch_contacts(domain, uri, profile)
96
+              4.9. reg_free_contacts(profile)
97
+              4.10. reg_send_reply()
97 98
 
98 99
         5. Event Routes
99 100
 
... ...
@@ -151,15 +152,16 @@ Bogdan-Andre Iancu
151 152
    1.34. Set use_expired_contacts parameter
152 153
    1.35. save usage
153 154
    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
155
+   1.37. lookup_to_dset usage
156
+   1.38. lookup_branches usage
157
+   1.39. registered usage
158
+   1.40. add_sock_hdr usage
159
+   1.41. unregister usage
160
+   1.42. reg_fetch_contacts usage
161
+   1.43. reg_free_contacts usage
162
+   1.44. reg_send_reply usage
163
+   1.45. event_route[usrloc:contact-expired] usage
164
+   1.46. $ulc(name) usage
163 165
 
164 166
 Chapter 1. Admin Guide
165 167
 
... ...
@@ -217,13 +219,14 @@ Chapter 1. Admin Guide
217 219
 
218 220
         4.1. save(domain, [, flags [, uri]])
219 221
         4.2. lookup(domain [, uri])
220
-        4.3. lookup_branches(domain)
221
-        4.4. registered(domain [, uri [, match_option [, match_action]]])
222
-        4.5. add_sock_hdr(hdr_name)
223
-        4.6. unregister(domain, uri[, ruid])
224
-        4.7. reg_fetch_contacts(domain, uri, profile)
225
-        4.8. reg_free_contacts(profile)
226
-        4.9. reg_send_reply()
222
+        4.3. lookup_to_dset(domain [, uri])
223
+        4.4. lookup_branches(domain)
224
+        4.5. registered(domain [, uri [, match_option [, match_action]]])
225
+        4.6. add_sock_hdr(hdr_name)
226
+        4.7. unregister(domain, uri[, ruid])
227
+        4.8. reg_fetch_contacts(domain, uri, profile)
228
+        4.9. reg_free_contacts(profile)
229
+        4.10. reg_send_reply()
227 230
 
228 231
    5. Event Routes
229 232
 
... ...
@@ -968,13 +971,14 @@ kamcmd cfg.set_now_int registrar use_expired_contacts 0
968 971
 
969 972
    4.1. save(domain, [, flags [, uri]])
970 973
    4.2. lookup(domain [, uri])
971
-   4.3. lookup_branches(domain)
972
-   4.4. registered(domain [, uri [, match_option [, match_action]]])
973
-   4.5. add_sock_hdr(hdr_name)
974
-   4.6. unregister(domain, uri[, ruid])
975
-   4.7. reg_fetch_contacts(domain, uri, profile)
976
-   4.8. reg_free_contacts(profile)
977
-   4.9. reg_send_reply()
974
+   4.3. lookup_to_dset(domain [, uri])
975
+   4.4. lookup_branches(domain)
976
+   4.5. registered(domain [, uri [, match_option [, match_action]]])
977
+   4.6. add_sock_hdr(hdr_name)
978
+   4.7. unregister(domain, uri[, ruid])
979
+   4.8. reg_fetch_contacts(domain, uri, profile)
980
+   4.9. reg_free_contacts(profile)
981
+   4.10. reg_send_reply()
978 982
 
979 983
 4.1.  save(domain, [, flags [, uri]])
980 984
 
... ...
@@ -1055,7 +1059,8 @@ save("location", "0x00", "sip:test@kamailio.org");
1055 1059
    Example 1.36. lookup usage
1056 1060
 ...
1057 1061
 lookup("location");
1058
-switch ($retcode) {
1062
+                        switch ($retcode) {:1
1063
+
1059 1064
     case -1:
1060 1065
     case -3:
1061 1066
         sl_send_reply("404", "Not Found");
... ...
@@ -1066,7 +1071,21 @@ switch ($retcode) {
1066 1071
 };
1067 1072
 ...
1068 1073
 
1069
-4.3.  lookup_branches(domain)
1074
+4.3.  lookup_to_dset(domain [, uri])
1075
+
1076
+   Similar to lookup(...), but push the location contacts to destination
1077
+   set, without changing the R-URI (first branch not changed, it creates
1078
+   additional branches). For the meaning of the parameters and the return
1079
+   codes, see the documentation for lookup(...) function.
1080
+
1081
+   This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1082
+
1083
+   Example 1.37. lookup_to_dset usage
1084
+...
1085
+lookup_to_dset("location");
1086
+...
1087
+
1088
+4.4.  lookup_branches(domain)
1070 1089
 
1071 1090
    The function performs lookup(domain) on r-uri and additional branches
1072 1091
    (only branches that have no other attributes set than uri).
... ...
@@ -1078,12 +1097,12 @@ switch ($retcode) {
1078 1097
 
1079 1098
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1080 1099
 
1081
-   Example 1.37. lookup_branches usage
1100
+   Example 1.38. lookup_branches usage
1082 1101
 ...
1083 1102
 lookup_branches("location");
1084 1103
 ...
1085 1104
 
1086
-4.4.  registered(domain [, uri [, match_option [, match_action]]])
1105
+4.5.  registered(domain [, uri [, match_option [, match_action]]])
1087 1106
 
1088 1107
    The function returns true if the AOR in the URI is registered, false
1089 1108
    otherwise. The function does not modify the message being process, it
... ...
@@ -1110,7 +1129,7 @@ lookup_branches("location");
1110 1129
 
1111 1130
    This function can be used from ANY_ROUTE.
1112 1131
 
1113
-   Example 1.38. registered usage
1132
+   Example 1.39. registered usage
1114 1133
 ...
1115 1134
 if (registered("location")) {
1116 1135
         sl_send_reply("100", "Trying");
... ...
@@ -1124,7 +1143,7 @@ if (registered("location","$rz:$Au", 2)) {
1124 1143
 };
1125 1144
 ...
1126 1145
 
1127
-4.5.  add_sock_hdr(hdr_name)
1146
+4.6.  add_sock_hdr(hdr_name)
1128 1147
 
1129 1148
    Adds a new header to the current REGISTER request with “hdr_name” which
1130 1149
    contains the description of the received socket (proto:ip:port)
... ...
@@ -1137,12 +1156,12 @@ if (registered("location","$rz:$Au", 2)) {
1137 1156
 
1138 1157
    This function can be used from REQUEST_ROUTE.
1139 1158
 
1140
-   Example 1.39. add_sock_hdr usage
1159
+   Example 1.40. add_sock_hdr usage
1141 1160
 ...
1142 1161
 add_sock_hdr("Sock-Info");
1143 1162
 ...
1144 1163
 
1145
-4.6.  unregister(domain, uri[, ruid])
1164
+4.7.  unregister(domain, uri[, ruid])
1146 1165
 
1147 1166
    The function removes contacts associated with 'uri' from the location
1148 1167
    database. If 'ruid' is provided a specific contact is removed, if
... ...
@@ -1167,7 +1186,7 @@ add_sock_hdr("Sock-Info");
1167 1186
      * -2 - Error in unregistering user
1168 1187
      * -3 - Contacts for AOR not found
1169 1188
 
1170
-   Example 1.40. unregister usage
1189
+   Example 1.41. unregister usage
1171 1190
 ...
1172 1191
 unregister("location", "$ru");
1173 1192
 unregister("location", "sip:user@kamailio.org");
... ...
@@ -1175,7 +1194,7 @@ unregister("location", "$ru", "$ulc(caller=>ruid)");
1175 1194
 unregister("location", "", "$ruid");
1176 1195
 ...
1177 1196
 
1178
-4.7.  reg_fetch_contacts(domain, uri, profile)
1197
+4.8.  reg_fetch_contacts(domain, uri, profile)
1179 1198
 
1180 1199
    The function fetches the contacts for 'uri' from table 'domain' to
1181 1200
    pseudo-variable $ulc(profile).
... ...
@@ -1191,13 +1210,13 @@ unregister("location", "", "$ruid");
1191 1210
 
1192 1211
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1193 1212
 
1194
-   Example 1.41. reg_fetch_contacts usage
1213
+   Example 1.42. reg_fetch_contacts usage
1195 1214
 ...
1196 1215
 reg_fetch_contacts("location", "$ru", "callee");
1197 1216
 reg_fetch_contacts("location", "sip:user@kamailio.org", "caller");
1198 1217
 ...
1199 1218
 
1200
-4.8.  reg_free_contacts(profile)
1219
+4.9.  reg_free_contacts(profile)
1201 1220
 
1202 1221
    The function frees the contacts from pseudo-variable $ulc(profile).
1203 1222
    Should be called to release the content of a profile. Anyhow, fetching
... ...
@@ -1210,12 +1229,12 @@ reg_fetch_contacts("location", "sip:user@kamailio.org", "caller");
1210 1229
 
1211 1230
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1212 1231
 
1213
-   Example 1.42. reg_free_contacts usage
1232
+   Example 1.43. reg_free_contacts usage
1214 1233
 ...
1215 1234
 reg_free_contacts("callee");
1216 1235
 ...
1217 1236
 
1218
-4.9.  reg_send_reply()
1237
+4.10.  reg_send_reply()
1219 1238
 
1220 1239
    The function sends the SIP reply that is normally sent by save(...),
1221 1240
    but that was skipped due to flag 0x2. It must be used after save(...,
... ...
@@ -1224,7 +1243,7 @@ reg_free_contacts("callee");
1224 1243
 
1225 1244
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE.
1226 1245
 
1227
-   Example 1.43. reg_send_reply usage
1246
+   Example 1.44. reg_send_reply usage
1228 1247
 ...
1229 1248
 save("location", "0x2");
1230 1249
 ...
... ...
@@ -1240,7 +1259,7 @@ reg_send_reply();
1240 1259
    Executed when a contact in location table has expired. The variable
1241 1260
    $ulc(exp=>...) is filled with the attributes of the expired contact.
1242 1261
 
1243
-   Example 1.44. event_route[usrloc:contact-expired] usage
1262
+   Example 1.45. event_route[usrloc:contact-expired] usage
1244 1263
 ...
1245 1264
 event_route[usrloc:contact-expired] {
1246 1265
     xlog("expired contact for $ulc(exp=>aor)\n");
... ...
@@ -1314,7 +1333,7 @@ event_route[usrloc:contact-expired] {
1314 1333
    The pseudo-variable accepts positive index value to access a specific
1315 1334
    contact record.
1316 1335
 
1317
-   Example 1.45. $ulc(name) usage
1336
+   Example 1.46. $ulc(name) usage
1318 1337
 ...
1319 1338
 if(reg_fetch_contacts("location", "$fu", "caller"))
1320 1339
 {
Browse code

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

Kamailio Dev authored on 21/12/2020 13:46:11
Showing 1 changed files
... ...
@@ -722,13 +722,15 @@ modparam("registrar", "reg_callid_avp", "$avp(s:avp)")
722 722
    Defines the name of XAVP class to store runtime module config values.
723 723
    The values are stored as inner XAVPs, like $xavp(class=>attribute).
724 724
    Valid inner XAVP names:
725
+     * expires - the number of maximum contacts to be stored for the
726
+       current registration AoR. It overwrites the 'max_contacts' module
727
+       parameter value.
728
+     * q - the expires value, to overwrite the value from SIP headers.
725 729
      * max_contacts - the number of maximum contacts to be stored for the
726 730
        current registration AoR. It overwrites the 'max_contacts' module
727 731
        parameter value.
728 732
      * socket - the string representing the socket on which the register
729 733
        request was received, as alternative to using the sock_hdr.
730
-     * q - q value of contact (integer 0-1000). It overrides q value given
731
-       in contact header and default_q parameter.
732 734
 
733 735
    For example. if this parameter is set to 'reg', then the number of
734 736
    maximum contacts can be set in $xavp(reg=>max_contacts).
... ...
@@ -742,6 +744,7 @@ modparam("registrar", "xavp_cfg", "reg")
742 744
 request_route {
743 745
     ...
744 746
     $xavp(reg=>max_contacts) = 4;
747
+    $xavp(reg[0]=>expires) = 600;
745 748
     save("location");
746 749
     ...
747 750
 }
Browse code

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

Kamailio Dev authored on 20/10/2020 08:16:27
Showing 1 changed files
... ...
@@ -979,8 +979,9 @@ kamcmd cfg.set_now_int registrar use_expired_contacts 0
979 979
    location records (in usrloc) depending on Contact and Expires header
980 980
    fields in the REGISTER message. On success and when called from the
981 981
    REQUEST_ROUTE, “200 OK” will be returned listing all contacts that are
982
-   currently in the location database. On an error, an error message will
983
-   be sent with a short description in reason phrase.
982
+   currently in the location database. As a side effect, also branch flags
983
+   are stored in usrloc. On an error, an error message will be sent with a
984
+   short description in reason phrase.
984 985
 
985 986
    Meaning of the parameters is as follows:
986 987
      * domain - Logical domain within the registrar. If a database is used
... ...
@@ -1028,7 +1029,8 @@ save("location", "0x00", "sip:test@kamailio.org");
1028 1029
    no such contacts, -1 will be returned. If there are such contacts,
1029 1030
    Request-URI will be overwritten with the contact that has the highest q
1030 1031
    value and optionally the rest will be appended to the message
1031
-   (depending on append_branches parameter value).
1032
+   (depending on append_branches parameter value). As a side effect, also
1033
+   branch flags are restored from usrloc.
1032 1034
 
1033 1035
    If the method_filtering option is enabled and request is initial
1034 1036
    request without to-tag, the lookup function will return only the
Browse code

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

Kamailio Dev authored on 14/10/2020 09:46:17
Showing 1 changed files
... ...
@@ -62,7 +62,7 @@ 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. use_advertised_address (integer)
65
+              3.18. sock_mode (integer)
66 66
               3.19. method_filtering (integer)
67 67
               3.20. use_path (integer)
68 68
               3.21. path_mode (integer)
... ...
@@ -131,7 +131,7 @@ Bogdan-Andre Iancu
131 131
    1.14. Set retry_after parameter
132 132
    1.15. Set sock_flag parameter
133 133
    1.16. Set sock_hdr_name parameter
134
-   1.17. Set use_advertised_address parameter
134
+   1.17. Set sock_mode parameter
135 135
    1.18. Set method_filtering parameter
136 136
    1.19. Set use_path parameter
137 137
    1.20. Set path_mode parameter
... ...
@@ -194,7 +194,7 @@ Chapter 1. Admin Guide
194 194
         3.15. retry_after (integer)
195 195
         3.16. sock_flag (integer)
196 196
         3.17. sock_hdr_name (string)
197
-        3.18. use_advertised_address (integer)
197
+        3.18. sock_mode (integer)
198 198
         3.19. method_filtering (integer)
199 199
         3.20. use_path (integer)
200 200
         3.21. path_mode (integer)
... ...
@@ -325,7 +325,7 @@ Chapter 1. Admin Guide
325 325
    3.15. retry_after (integer)
326 326
    3.16. sock_flag (integer)
327 327
    3.17. sock_hdr_name (string)
328
-   3.18. use_advertised_address (integer)
328
+   3.18. sock_mode (integer)
329 329
    3.19. method_filtering (integer)
330 330
    3.20. use_path (integer)
331 331
    3.21. path_mode (integer)
... ...
@@ -604,21 +604,20 @@ modparam("registrar", "sock_flag", 18)
604 604
 modparam("registrar", "sock_hdr_name", "Sock-Info")
605 605
 ...
606 606
 
607
-3.18. use_advertised_address (integer)
607
+3.18. sock_mode (integer)
608 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.
609
+   If set to 1, the server stores the advertised address in socket field,
610
+   instead of bind address.
612 611
 
613 612
    This could be useful when kamailio is installed behind NAT and it is
614 613
    necessary to store its public IP instead socket on which the register
615 614
    request was received.
616 615
 
617
-   Default value is 0 (disabled).
616
+   Default value is 0 (store bind address).
618 617
 
619
-   Example 1.17. Set use_advertised_address parameter
618
+   Example 1.17. Set sock_mode parameter
620 619
 ...
621
-modparam("registrar", "use_advertised_address", 1)
620
+modparam("registrar", "sock_mode", 1)
622 621
 ...
623 622
 
624 623
 3.19. method_filtering (integer)
Browse code

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

Kamailio Dev authored on 14/10/2020 09:31:20
Showing 1 changed files
... ...
@@ -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) {