diff --git a/src/modules/nathelper/doc/nathelper_admin.xml b/src/modules/nathelper/doc/nathelper_admin.xml
index 9c3373a9ec3..c032fc3a843 100644
--- a/src/modules/nathelper/doc/nathelper_admin.xml
+++ b/src/modules/nathelper/doc/nathelper_admin.xml
@@ -707,8 +707,8 @@ if(is_rfc1918("$rd")) {
the contact URI containing either received ip, port, and
transport protocol or those given as parameters. If called
without parameters, ;alias
parameter is
- only added if received ip and port differ from those in
- contact URI.
+ only added if received ip, port, or transport protocol differs
+ from that in contact URI.
This function can be used from
diff --git a/src/modules/nathelper/nathelper.c b/src/modules/nathelper/nathelper.c
index a34d0a19dd8..5e7b82b6171 100644
--- a/src/modules/nathelper/nathelper.c
+++ b/src/modules/nathelper/nathelper.c
@@ -780,13 +780,13 @@ static int add_contact_alias_0(struct sip_msg *msg)
&& ((ip = str2ip6(&(uri.host))) == NULL)) {
LM_DBG("contact uri host is not an ip address\n");
} else {
- if(ip_addr_cmp(ip, &(msg->rcv.src_ip))
- && ((msg->rcv.src_port == uri.port_no)
- || ((uri.port.len == 0)
- && (msg->rcv.src_port == 5060)))) {
- LM_DBG("no need to add alias param\n");
- return 2;
- }
+ if (ip_addr_cmp(ip, &(msg->rcv.src_ip)) &&
+ ((msg->rcv.src_port == uri.port_no) ||
+ ((uri.port.len == 0) && (msg->rcv.src_port == 5060))) &&
+ (uri.proto == msg->rcv.proto)) {
+ LM_DBG("no need to add alias param\n");
+ return 2;
+ }
}
/* Check if function has been called already */