|
@@ -40,12 +40,13 @@ Bogdan-Andrei Iancu
|
|
4.2. append_fromtag (integer)
|
|
4.2. append_fromtag (integer)
|
|
4.3. enable_double_rr (integer)
|
|
4.3. enable_double_rr (integer)
|
|
4.4. add_username (integer)
|
|
4.4. add_username (integer)
|
|
|
|
+ 4.5. enable_socket_mismatch_warning (integer)
|
|
|
|
|
|
5. Exported Functions
|
|
5. Exported Functions
|
|
|
|
|
|
5.1. loose_route()
|
|
5.1. loose_route()
|
|
5.2. record_route() and record_route(string)
|
|
5.2. record_route() and record_route(string)
|
|
- 5.3. record_route_preset(string)
|
|
|
|
|
|
+ 5.3. record_route_preset(string [,string2])
|
|
5.4. add_rr_param(param)
|
|
5.4. add_rr_param(param)
|
|
5.5. check_route_param(re)
|
|
5.5. check_route_param(re)
|
|
5.6. is_direction(dir)
|
|
5.6. is_direction(dir)
|
|
@@ -69,12 +70,13 @@ Bogdan-Andrei Iancu
|
|
1.3. Set append_fromtag parameter
|
|
1.3. Set append_fromtag parameter
|
|
1.4. Set enable_double_rr parameter
|
|
1.4. Set enable_double_rr parameter
|
|
1.5. Set add_username parameter
|
|
1.5. Set add_username parameter
|
|
- 1.6. loose_route usage
|
|
|
|
- 1.7. record_route usage
|
|
|
|
- 1.8. record_route_preset usage
|
|
|
|
- 1.9. add_rr_param usage
|
|
|
|
- 1.10. check_route_param usage
|
|
|
|
- 1.11. is_direction usage
|
|
|
|
|
|
+ 1.6. enable_socket_mismatch_warning usage
|
|
|
|
+ 1.7. loose_route usage
|
|
|
|
+ 1.8. record_route usage
|
|
|
|
+ 1.9. record_route_preset usage
|
|
|
|
+ 1.10. add_rr_param usage
|
|
|
|
+ 1.11. check_route_param usage
|
|
|
|
+ 1.12. is_direction usage
|
|
2.1. Loading RR module's API from another module
|
|
2.1. Loading RR module's API from another module
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
Chapter 1. Admin Guide
|
|
@@ -94,12 +96,13 @@ Chapter 1. Admin Guide
|
|
4.2. append_fromtag (integer)
|
|
4.2. append_fromtag (integer)
|
|
4.3. enable_double_rr (integer)
|
|
4.3. enable_double_rr (integer)
|
|
4.4. add_username (integer)
|
|
4.4. add_username (integer)
|
|
|
|
+ 4.5. enable_socket_mismatch_warning (integer)
|
|
|
|
|
|
5. Exported Functions
|
|
5. Exported Functions
|
|
|
|
|
|
5.1. loose_route()
|
|
5.1. loose_route()
|
|
5.2. record_route() and record_route(string)
|
|
5.2. record_route() and record_route(string)
|
|
- 5.3. record_route_preset(string)
|
|
|
|
|
|
+ 5.3. record_route_preset(string [,string2])
|
|
5.4. add_rr_param(param)
|
|
5.4. add_rr_param(param)
|
|
5.5. check_route_param(re)
|
|
5.5. check_route_param(re)
|
|
5.6. is_direction(dir)
|
|
5.6. is_direction(dir)
|
|
@@ -176,6 +179,7 @@ UAC Kamailio PROXY UAS
|
|
4.2. append_fromtag (integer)
|
|
4.2. append_fromtag (integer)
|
|
4.3. enable_double_rr (integer)
|
|
4.3. enable_double_rr (integer)
|
|
4.4. add_username (integer)
|
|
4.4. add_username (integer)
|
|
|
|
+ 4.5. enable_socket_mismatch_warning (integer)
|
|
|
|
|
|
4.1. enable_full_lr (integer)
|
|
4.1. enable_full_lr (integer)
|
|
|
|
|
|
@@ -232,11 +236,27 @@ modparam("rr", "enable_double_rr", 0)
|
|
modparam("rr", "add_username", 1)
|
|
modparam("rr", "add_username", 1)
|
|
...
|
|
...
|
|
|
|
|
|
|
|
+4.5. enable_socket_mismatch_warning (integer)
|
|
|
|
+
|
|
|
|
+ When a preset record-route header is forced in Kamailio config and the
|
|
|
|
+ host from the record-route header is not the same as the host server, a
|
|
|
|
+ warning will be printed out in the logs. The
|
|
|
|
+ 'enable_socket_mismatch_warning' parameter enables or disables the
|
|
|
|
+ warning. When Kamailio is behind a NATed firewall, we don't want this
|
|
|
|
+ warning to be printed for every bridged call.
|
|
|
|
+
|
|
|
|
+ Default value is 1 (yes).
|
|
|
|
+
|
|
|
|
+ Example 1.6. enable_socket_mismatch_warning usage
|
|
|
|
+...
|
|
|
|
+modparam("rr", "enable_socket_mismatch_warning", 0)
|
|
|
|
+...
|
|
|
|
+
|
|
5. Exported Functions
|
|
5. Exported Functions
|
|
|
|
|
|
5.1. loose_route()
|
|
5.1. loose_route()
|
|
5.2. record_route() and record_route(string)
|
|
5.2. record_route() and record_route(string)
|
|
- 5.3. record_route_preset(string)
|
|
|
|
|
|
+ 5.3. record_route_preset(string [,string2])
|
|
5.4. add_rr_param(param)
|
|
5.4. add_rr_param(param)
|
|
5.5. check_route_param(re)
|
|
5.5. check_route_param(re)
|
|
5.6. is_direction(dir)
|
|
5.6. is_direction(dir)
|
|
@@ -270,7 +290,7 @@ modparam("rr", "add_username", 1)
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE.
|
|
This function can be used from REQUEST_ROUTE.
|
|
|
|
|
|
- Example 1.6. loose_route usage
|
|
|
|
|
|
+ Example 1.7. loose_route usage
|
|
...
|
|
...
|
|
loose_route();
|
|
loose_route();
|
|
...
|
|
...
|
|
@@ -288,24 +308,30 @@ loose_route();
|
|
This function can be used from REQUEST_ROUTE, BRANCH_ROUTE and
|
|
This function can be used from REQUEST_ROUTE, BRANCH_ROUTE and
|
|
FAILURE_ROUTE.
|
|
FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.7. record_route usage
|
|
|
|
|
|
+ Example 1.8. record_route usage
|
|
...
|
|
...
|
|
record_route();
|
|
record_route();
|
|
...
|
|
...
|
|
|
|
|
|
-5.3. record_route_preset(string)
|
|
|
|
|
|
+5.3. record_route_preset(string [,string2])
|
|
|
|
|
|
This function will put the string into Record-Route, don't use unless
|
|
This function will put the string into Record-Route, don't use unless
|
|
you know what you are doing.
|
|
you know what you are doing.
|
|
|
|
|
|
Meaning of the parameters is as follows:
|
|
Meaning of the parameters is as follows:
|
|
- * string - String to be inserted into the header field; it may
|
|
|
|
|
|
+ * string - String to be inserted into the first header field; it may
|
|
contain pseudo-variables.
|
|
contain pseudo-variables.
|
|
|
|
+ * string2 - String to be inserted into the second header field; it
|
|
|
|
+ may contain pseudo-variables.
|
|
|
|
+
|
|
|
|
+ Note: If 'string2' is present, then the 'string' param is pointing to
|
|
|
|
+ the outbound interface and the 'string2' param is pointing to the
|
|
|
|
+ inbound interface.
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE, BRANCH_ROUTE and
|
|
This function can be used from REQUEST_ROUTE, BRANCH_ROUTE and
|
|
FAILURE_ROUTE.
|
|
FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.8. record_route_preset usage
|
|
|
|
|
|
+ Example 1.9. record_route_preset usage
|
|
...
|
|
...
|
|
record_route_preset("1.2.3.4:5090");
|
|
record_route_preset("1.2.3.4:5090");
|
|
...
|
|
...
|
|
@@ -324,7 +350,7 @@ record_route_preset("1.2.3.4:5090");
|
|
This function can be used from REQUEST_ROUTE, BRANCH_ROUTE and
|
|
This function can be used from REQUEST_ROUTE, BRANCH_ROUTE and
|
|
FAILURE_ROUTE.
|
|
FAILURE_ROUTE.
|
|
|
|
|
|
- Example 1.9. add_rr_param usage
|
|
|
|
|
|
+ Example 1.10. add_rr_param usage
|
|
...
|
|
...
|
|
add_rr_param(";nat=yes");
|
|
add_rr_param(";nat=yes");
|
|
...
|
|
...
|
|
@@ -341,7 +367,7 @@ add_rr_param(";nat=yes");
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE.
|
|
This function can be used from REQUEST_ROUTE.
|
|
|
|
|
|
- Example 1.10. check_route_param usage
|
|
|
|
|
|
+ Example 1.11. check_route_param usage
|
|
...
|
|
...
|
|
if (check_route_param("nat=yes")) {
|
|
if (check_route_param("nat=yes")) {
|
|
setflag(6);
|
|
setflag(6);
|
|
@@ -369,7 +395,7 @@ if (check_route_param("nat=yes")) {
|
|
|
|
|
|
This function can be used from REQUEST_ROUTE.
|
|
This function can be used from REQUEST_ROUTE.
|
|
|
|
|
|
- Example 1.11. is_direction usage
|
|
|
|
|
|
+ Example 1.12. is_direction usage
|
|
...
|
|
...
|
|
if (is_direction("downstream")) {
|
|
if (is_direction("downstream")) {
|
|
xdbg("in-dialog request from caller to callee (downstream) ($rm)\n");
|
|
xdbg("in-dialog request from caller to callee (downstream) ($rm)\n");
|