|
@@ -78,6 +78,10 @@ Ovidiu Sas
|
|
|
|
|
|
7.1. nh_enable_ping
|
|
7.1. nh_enable_ping
|
|
|
|
|
|
|
|
+ 8. Selects
|
|
|
|
+
|
|
|
|
+ 8.1. @nathelper.rewrite_contact[n]
|
|
|
|
+
|
|
2. Frequently Asked Questions
|
|
2. Frequently Asked Questions
|
|
|
|
|
|
List of Examples
|
|
List of Examples
|
|
@@ -102,6 +106,7 @@ Ovidiu Sas
|
|
1.18. $rr_count usage
|
|
1.18. $rr_count usage
|
|
1.19. $rr_top_count usage
|
|
1.19. $rr_top_count usage
|
|
1.20. nh_enable_ping usage
|
|
1.20. nh_enable_ping usage
|
|
|
|
+ 1.21. @nathelper.rewrite_contact usage
|
|
|
|
|
|
Chapter 1. Admin Guide
|
|
Chapter 1. Admin Guide
|
|
|
|
|
|
@@ -148,6 +153,10 @@ Chapter 1. Admin Guide
|
|
|
|
|
|
7.1. nh_enable_ping
|
|
7.1. nh_enable_ping
|
|
|
|
|
|
|
|
+ 8. Selects
|
|
|
|
+
|
|
|
|
+ 8.1. @nathelper.rewrite_contact[n]
|
|
|
|
+
|
|
1. Overview
|
|
1. Overview
|
|
|
|
|
|
This is a module to help with NAT traversal and reuse of tcp
|
|
This is a module to help with NAT traversal and reuse of tcp
|
|
@@ -396,7 +405,7 @@ modparam("nathelper", "keepalive_timeout", 120)
|
|
5.7. add_contact_alias([ip_addr, port, proto])
|
|
5.7. add_contact_alias([ip_addr, port, proto])
|
|
5.8. handle_ruri_alias()
|
|
5.8. handle_ruri_alias()
|
|
|
|
|
|
-5.1. fix_nated_contact()
|
|
|
|
|
|
+5.1. fix_nated_contact()
|
|
|
|
|
|
Rewrites Contact HF to contain request's source address:port.
|
|
Rewrites Contact HF to contain request's source address:port.
|
|
|
|
|
|
@@ -408,7 +417,7 @@ modparam("nathelper", "keepalive_timeout", 120)
|
|
if (search("User-Agent: Cisco ATA.*") {fix_nated_contact();};
|
|
if (search("User-Agent: Cisco ATA.*") {fix_nated_contact();};
|
|
...
|
|
...
|
|
|
|
|
|
-5.2. fix_nated_sdp(flags [, ip_address])
|
|
|
|
|
|
+5.2. fix_nated_sdp(flags [, ip_address])
|
|
|
|
|
|
Alters the SDP information in orer to facilitate NAT traversal. What
|
|
Alters the SDP information in orer to facilitate NAT traversal. What
|
|
changes to be performed may be controled via the "flags" parameter.
|
|
changes to be performed may be controled via the "flags" parameter.
|
|
@@ -436,7 +445,7 @@ if (search("User-Agent: Cisco ATA.*") {fix_nated_contact();};
|
|
if (search("User-Agent: Cisco ATA.*") {fix_nated_sdp("3");};
|
|
if (search("User-Agent: Cisco ATA.*") {fix_nated_sdp("3");};
|
|
...
|
|
...
|
|
|
|
|
|
-5.3. add_rcv_param([flag]),
|
|
|
|
|
|
+5.3. add_rcv_param([flag]),
|
|
|
|
|
|
Add received parameter to Contact header fields or Contact URI. The
|
|
Add received parameter to Contact header fields or Contact URI. The
|
|
parameter will contain URI created from the source IP, port, and
|
|
parameter will contain URI created from the source IP, port, and
|
|
@@ -460,7 +469,7 @@ add_rcv_param(); # add the parameter to the Contact header
|
|
add_rcv_param("1"); # add the parameter to the Contact URI
|
|
add_rcv_param("1"); # add the parameter to the Contact URI
|
|
...
|
|
...
|
|
|
|
|
|
-5.4. fix_nated_register()
|
|
|
|
|
|
+5.4. fix_nated_register()
|
|
|
|
|
|
The function creates a URI consisting of the source IP, port, and
|
|
The function creates a URI consisting of the source IP, port, and
|
|
protocol and stores the URI in an Attribute-Value-Pair. The URI will be
|
|
protocol and stores the URI in an Attribute-Value-Pair. The URI will be
|
|
@@ -478,7 +487,7 @@ add_rcv_param("1"); # add the parameter to the Contact URI
|
|
fix_nated_register();
|
|
fix_nated_register();
|
|
...
|
|
...
|
|
|
|
|
|
-5.5. nat_uac_test(flags)
|
|
|
|
|
|
+5.5. nat_uac_test(flags)
|
|
|
|
|
|
Tries to guess if client's request originated behind a nat. The
|
|
Tries to guess if client's request originated behind a nat. The
|
|
parameter determines what heuristics is used.
|
|
parameter determines what heuristics is used.
|
|
@@ -501,14 +510,14 @@ fix_nated_register();
|
|
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
|
|
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
|
|
FAILURE_ROUTE, BRANCH_ROUTE.
|
|
FAILURE_ROUTE, BRANCH_ROUTE.
|
|
|
|
|
|
-5.6. is_rfc1918(ip_address)
|
|
|
|
|
|
+5.6. is_rfc1918(ip_address)
|
|
|
|
|
|
Determines if the address in the parameter is an rfc1918 address. The
|
|
Determines if the address in the parameter is an rfc1918 address. The
|
|
parameter allows pseudo-variables usage.
|
|
parameter allows pseudo-variables usage.
|
|
|
|
|
|
This function can be used from ANY_ROUTE.
|
|
This function can be used from ANY_ROUTE.
|
|
|
|
|
|
-5.7. add_contact_alias([ip_addr, port, proto])
|
|
|
|
|
|
+5.7. add_contact_alias([ip_addr, port, proto])
|
|
|
|
|
|
Adds ;alias=ip~port~transport parameter to contact URI containing
|
|
Adds ;alias=ip~port~transport parameter to contact URI containing
|
|
either received ip, port, and transport protocol or those given as
|
|
either received ip, port, and transport protocol or those given as
|
|
@@ -528,7 +537,7 @@ fix_nated_register();
|
|
};
|
|
};
|
|
...
|
|
...
|
|
|
|
|
|
-5.8. handle_ruri_alias()
|
|
|
|
|
|
+5.8. handle_ruri_alias()
|
|
|
|
|
|
Checks if Request URI has alias param and if so, removes it and sets
|
|
Checks if Request URI has alias param and if so, removes it and sets
|
|
$du based on its value. Note that this means that routing of request is
|
|
$du based on its value. Note that this means that routing of request is
|
|
@@ -607,6 +616,22 @@ fix_nated_register();
|
|
$ kamctl fifo nh_enable_ping 1
|
|
$ kamctl fifo nh_enable_ping 1
|
|
...
|
|
...
|
|
|
|
|
|
|
|
+8. Selects
|
|
|
|
+
|
|
|
|
+ 8.1. @nathelper.rewrite_contact[n]
|
|
|
|
+
|
|
|
|
+8.1. @nathelper.rewrite_contact[n]
|
|
|
|
+
|
|
|
|
+ Get n-th Contact value with IP:Port rewritten to source ip:port. N is
|
|
|
|
+ counted from 1. Only IP:port is rewritten, remaining part are left
|
|
|
|
+ unchanged. Full nameaddr is supported.
|
|
|
|
+
|
|
|
|
+ Example 1.21. @nathelper.rewrite_contact usage
|
|
|
|
+...
|
|
|
|
+$c = @nathelper.rewrite_contact[1];
|
|
|
|
+...
|
|
|
|
+$c2 = @nathelper.rewrite_contact[1].nameaddr.uri;
|
|
|
|
+
|
|
Chapter 2. Frequently Asked Questions
|
|
Chapter 2. Frequently Asked Questions
|
|
|
|
|
|
2.1. What happend with "rtpproxy_disable" parameter?
|
|
2.1. What happend with "rtpproxy_disable" parameter?
|