Module: sip-router
Branch: 4.2
Commit: 27b566619cb69345a35f7af82b0b2a6a1c4ed5a6
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=27b5666…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Tue Nov 18 04:32:35 2014 +0200
nathelper: improved add_contact_alias() description
- thanks to Dan Christian Bogos for pointing out the deficiency
(cherry picked from commit c04f9554df58b1323a46f6e40337fa34b34f1cc9)
---
modules/nathelper/README | 69 +++++++++++++++--------------
modules/nathelper/doc/nathelper_admin.xml | 9 +++-
2 files changed, 41 insertions(+), 37 deletions(-)
diff --git a/modules/nathelper/README b/modules/nathelper/README
index bb56670..a526fe7 100644
--- a/modules/nathelper/README
+++ b/modules/nathelper/README
@@ -24,13 +24,13 @@ Edited by
Ovidiu Sas
- Copyright � 2003-2008 Sippy Software, Inc.
+ Copyright (c) 2003-2008 Sippy Software, Inc.
- Copyright � 2005 Voice Sistem SRL
+ Copyright (c) 2005 Voice Sistem SRL
- Copyright � 2009 TuTPro Inc.
+ Copyright (c) 2009 TuTPro Inc.
- Copyright � 2010 VoIPEmbedded Inc.
+ Copyright (c) 2010 VoIPEmbedded Inc.
__________________________________________________________________
Table of Contents
@@ -438,7 +438,7 @@ modparam("nathelper", "udpping_from_path", 1)
5.8. handle_ruri_alias()
5.9. set_contact_alias()
-5.1. fix_nated_contact()
+5.1. fix_nated_contact()
Rewrites the "Contact" header to contain the request's source
address:port.
@@ -451,7 +451,7 @@ modparam("nathelper", "udpping_from_path", 1)
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
changes to be performed may be controled via the "flags" parameter.
@@ -481,7 +481,7 @@ if (search("User-Agent: Cisco ATA.*")
{fix_nated_contact();};
if (search("User-Agent: Cisco ATA.*") {fix_nated_sdp("3");};
...
-5.3. add_rcv_param([flag]),
+5.3. add_rcv_param([flag]),
Add a received parameter to the "Contact" header fields or the Contact
URI. The parameter will contain the URI created from the source IP,
@@ -505,7 +505,7 @@ add_rcv_param(); # add the parameter to the Contact header
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
protocol and stores the URI in an Attribute-Value-Pair. The URI will be
@@ -523,7 +523,7 @@ add_rcv_param("1"); # add the parameter to the Contact URI
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
parameter determines what heuristics is used.
@@ -552,18 +552,19 @@ fix_nated_register();
This function can be used from REQUEST_ROUTE, ONREPLY_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 or rfc6598
address. The parameter allows pseudo-variables usage.
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 an ";alias=ip~port~transport" parameter to the contact URI
containing either received ip, port, and transport protocol or those
- given as parameters.
+ given as parameters. If called without parameters, ";alias" parameter
+ is only added if received ip and port differ from those in contact URI.
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
BRANCH_ROUTE, and LOCAL_ROUTE.
@@ -579,7 +580,7 @@ fix_nated_register();
};
...
-5.8. handle_ruri_alias()
+5.8. handle_ruri_alias()
Checks if the Request URI has an "alias" parameter and if so, removes
it and sets the "$du" based on its value. Note that this means that
@@ -614,7 +615,7 @@ fix_nated_register();
};
...
-5.9. set_contact_alias()
+5.9. set_contact_alias()
Adds an ";alias=ip~port~transport" parameter to the contact URI
containing the received ip, port, and transport protocol. The new
@@ -704,38 +705,38 @@ Chapter 2. Frequently Asked Questions
2.1.
- What happend with "rtpproxy_disable" parameter?
+ What happend with "rtpproxy_disable" parameter?
- It was removed as it became obsolete - now "rtpproxy_sock" can take
- empty value to disable the rtpproxy functionality.
+ It was removed as it became obsolete - now "rtpproxy_sock" can take
+ empty value to disable the rtpproxy functionality.
2.2.
- Where can I find more about Kamailio?
+ Where can I find more about Kamailio?
- Take a look at
http://www.kamailio.org/.
+ Take a look at
http://www.kamailio.org/.
2.3.
- Where can I post a question about this module?
+ Where can I post a question about this module?
- First at all check if your question was already answered on one of our
- mailing lists:
- * User Mailing List -
-
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
- * Developer Mailing List -
-
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
+ First at all check if your question was already answered on one of our
+ mailing lists:
+ * User Mailing List -
+
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
+ * Developer Mailing List -
+
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
- E-mails regarding any stable Kamailio release should be sent to
- <sr-users(a)lists.sip-router.org> and e-mails regarding development
- versions should be sent to <sr-dev(a)lists.sip-router.org>rg>.
+ E-mails regarding any stable Kamailio release should be sent to
+ <sr-users(a)lists.sip-router.org> and e-mails regarding development
+ versions should be sent to <sr-dev(a)lists.sip-router.org>rg>.
- If you want to keep the mail private, send it to
- <sr-users(a)lists.sip-router.org>rg>.
+ If you want to keep the mail private, send it to
+ <sr-users(a)lists.sip-router.org>rg>.
2.4.
- How can I report a bug?
+ How can I report a bug?
- Please follow the guidelines provided at:
-
http://sip-router.org/tracker.
+ Please follow the guidelines provided at:
+
http://sip-router.org/tracker.
diff --git a/modules/nathelper/doc/nathelper_admin.xml
b/modules/nathelper/doc/nathelper_admin.xml
index 63839f6..7283704 100644
--- a/modules/nathelper/doc/nathelper_admin.xml
+++ b/modules/nathelper/doc/nathelper_admin.xml
@@ -642,9 +642,12 @@ fix_nated_register();
<function moreinfo="none">add_contact_alias([ip_addr, port,
proto])</function>
</title>
<para>
- Adds an <quote>;alias=ip~port~transport</quote> parameter to the contact
URI
- containing either received ip, port, and transport protocol
- or those given as parameters.
+ Adds an <quote>;alias=ip~port~transport</quote> parameter to
+ the contact URI containing either received ip, port, and
+ transport protocol or those given as parameters. If called
+ without parameters, <quote>;alias</quote> parameter is
+ only added if received ip and port differ from those in
+ contact URI.
</para>
<para>
This function can be used from