Hello Daniel,
Here is the SIP message:
INVITE sip:<CALLED_PARTY>@<IP_KAMAILIO>:5060 SIP/2.0\r\n
Via: SIP/2.0/UDP
<IP_PSTN_GW>:5060;rport;branch=z9hG4bK-1ed2-1416853638-4045-127\r\n
Call-ID: 6929-45b-10242014182718-0-<IP_PSTN_GW>\r\n
CSeq: 1 INVITE\r\n
Max-Forwards: 70\r\n
To: <sip:<CALLED_PARTY>@<IP_KAMAILIO>:5060>\r\n
From:
"<CALLING_PARTY>"<sip:<CALLING_PARTY>@<IP_PSTN_GW>>;tag=95ffcd055e0f78f7d5d397020e89288d30b48734\r\n
User-Agent: <PSTN_GW_UA>\r\n
Timestamp: 11242014182718\r\n
P-Asserted-Identity:
"<CALLING_PARTY>"<sip:<CALLING_PARTY>@<IP_PSTN_GW>>\r\n
Contact: <sip:<CALLING_PARTY>@<IP_PSTN_GW>:5060>\r\n
Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, SUBSCRIBE, NOTIFY, INFO, REFER,
UPDATE\r\n
Supported: path, replaces, timer, tdialog\r\n
Session-Expires: 1800\r\n
Expires: 300\r\n
Organization: PSTN-GW\r\n
Content-Type: application/sdp\r\n
Content-Length: 302\r\n
\r\n
v=0\r\n
o=PSTN-GW_SDP 7430762 0 IN IP4 <IP_PSTN_GW>\r\n
s=PSTN-GW-SIP\r\n
c=IN IP4 <IP_RTP_PSTN_GW>\r\n
t=0 0\r\n
m=audio 8364 RTP/AVP 8 0 18 101\r\n
a=rtpmap:0 PCMU/8000\r\n
a=rtpmap:8 PCMA/8000\r\n
a=rtpmap:18 G729/8000\r\n
a=fmtp:18 annexb=yes\r\n
a=rtpmap:101 telephone-event/8000\r\n
a=fmtp:101 0-15\r\n
a=silenceSupp:off - - - -\r\n
The INVITE is routed to:
route[NATDETECT] {
xlog("ENTERING NATDETECT routes\n");
#!ifdef WITH_NAT
force_rport();
if (nat_uac_test("18")) {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
add_contact_alias();
}
setflag(FLT_NATS);
xlog("NAT_UAC_TEST OK\n");
}
#!endif
return;
}
nat_uac_test is successful whereas before it was not.
Just to let you know, below is the INVITE processed by Kamailio and sent to the end-user:
INVITE sip:<CALLED_PARTY>@<IP_END_USER>:5060 SIP/2.0\r\n
Record-Route: <sip:<IP_KAMAILIO>;lr=on;nat=yes>\r\n
Via: SIP/2.0/UDP
<IP_KAMAILIO>;branch=z9hG4bK6803.0cb148ac58f43357292496d3f11f35fe.0\r\n
Via: SIP/2.0/UDP
<IP_PSTN_GW>:5060;received=<IP_PSTN_GW>;rport=5060;branch=z9hG4bK-1ed2-1416853638-4045-127\r\n
Call-ID: 6929-45b-10242014182718-0-<IP_PSTN_GW>\r\n
CSeq: 1 INVITE\r\n
Max-Forwards: 69\r\n
To: <sip:<CALLED_PARTY>@<IP_KAMAILIO>:5060>\r\n
From:
"<CALLING_PARTY>"<sip:<CALLING_PARTY>@<IP_PSTN_GW>;tag=95ffcd055e0f78f7d5d397020e89288d30b48734\r\n
User-Agent: <PSTN_GW_UA>\r\n
Timestamp: 11242014182718\r\n
P-Asserted-Identity:
"<CALLING_PARTY>"<sip:<CALLING_PARTY>@<IP_PSTN_GW>>\r\n
Contact: <sip:<CALLING_PARTY>@<IP_PSTN_GW>:5060>\r\n
Allow: INVITE, BYE, REGISTER, ACK, OPTIONS, CANCEL, SUBSCRIBE, NOTIFY, INFO, REFER,
UPDATE\r\n
Supported: path, replaces, timer, tdialog\r\n
Session-Expires: 1800\r\n
Expires: 300\r\n
Organization: PSTN-GW\r\n
Content-Type: application/sdp\r\n
Content-Length: 315\r\n
\r\n
v=0\r\n
o=PSTN-GW_SDP 7430762 0 IN IP4 <IP_KAMAILIO>\r\n
s=PSTN-GW-SIP\r\n
c=IN IP4 <IP_KAMAILIO>\r\n
t=0 0\r\n
m=audio 35000 RTP/AVP 8 0 18 101\r\n
a=rtpmap:0 PCMU/8000\r\n
a=rtpmap:8 PCMA/8000\r\n
a=rtpmap:18 G729/8000\r\n
a=fmtp:18 annexb=yes\r\n
a=rtpmap:101 telephone-event/8000\r\n
a=fmtp:101 0-15\r\n
a=silenceSupp:off - - - -\r\n
a=nortpproxy:yes\r\n
I can confirm that the issue is present with 4.2.1 too.
No problem with 4.1.4.
The SIP message and the configuration are the same in both cases.
Thank you.
Regards,
Igor.
De : <mailto:sr-users-bounces@lists.sip-router.org>
sr-users-bounces(a)lists.sip-router.org [mailto:
<mailto:sr-users-bounces@lists.sip-router.org>
sr-users-bounces(a)lists.sip-router.org] De la part de Daniel-Constantin Mierla
Envoyé : vendredi 21 novembre 2014 11:59
À : Kamailio (SER) - Users Mailing List
Objet : Re: [SR-Users] Issue with 4.2.0 and nathelper and/or rtpproxy
Hello,
the commits you refer to were not related to nat_uac_test() function.
Can you send the sip message for which you used the test and is different than in the old
versions?
Cheers,
Daniel
On 21/11/14 11:16, Igor Potjevlesch wrote:
Hello,
Just to let you know that I tried also with 4.2.1 and the issue is the same.
Regards,
Igor.
De : Igor Potjevlesch [ <mailto:igor.potjevlesch@gmail.com>
mailto:igor.potjevlesch@gmail.com]
Envoyé : jeudi 20 novembre 2014 17:00
À : 'Kamailio (SER) - Users Mailing List'
Objet : RE: [SR-Users] Issue with 4.2.0 and nathelper and/or rtpproxy
Hello,
No one has experienced the same issue or similar until 4.2.0?
Regards,
Igor.
De : Igor Potjevlesch [ <mailto:igor.potjevlesch@gmail.com>
mailto:igor.potjevlesch@gmail.com]
Envoyé : mercredi 19 novembre 2014 12:29
À : 'Kamailio (SER) - Users Mailing List'
Objet : RE: [SR-Users] Issue with 4.2.0 and nathelper and/or rtpproxy
Hello,
I reviewed the changelogs.
I can see the following updates that could change the previous behaviour:
commit 42897d422b60edeac393201326a3e71318445e62
Author: Daniel-Constantin Mierla < <mailto:miconda@gmail.com>
miconda(a)gmail.com>
Date: Mon Sep 22 22:04:39 2014 +0200
core: add received parameter to via if rport parameter is present
- required by RFC3581, section 4.
(cherry picked from commit a1e96cbd5a3b43598c59cb50693e6b739801b804)
commit a52c0024723a59d90c3c3966d5deadaf8b0d4440
Author: Daniel-Constantin Mierla < <mailto:miconda@gmail.com>
miconda(a)gmail.com>
Date: Sun Sep 28 12:48:53 2014 +0200
core: helper functions to get addr and port to be used in signaling from socket info
(cherry picked from commit c725f1dec14863e069bfd1e5c26857a1005528d5)
But I can't explain why the same nat_uac_test doesn't behaves the same between the
two versions.
Regards,
Igor.
De : Igor Potjevlesch [ <mailto:igor.potjevlesch@gmail.com>
mailto:igor.potjevlesch@gmail.com]
Envoyé : mardi 18 novembre 2014 14:00
À : <mailto:amit@avhan.com> amit(a)avhan.com; 'Kamailio (SER) - Users Mailing
List'
Objet : RE: [SR-Users] Issue with 4.2.0 and nathelper and/or rtpproxy
Hi Amit,
The config is the same between the two version. Even this line.
Regards,
Igor.
De : sr-users-bounces(a)lists.sip-router.org
<mailto:sr-users-bounces@lists.sip-router.org>
[mailto:sr-users-bounces@lists.sip-router.org] De la part de Amit Patkar
Envoyé : mardi 18 novembre 2014 13:16
À : sr-users(a)lists.sip-router.org <mailto:sr-users@lists.sip-router.org>
Objet : Re: [SR-Users] Issue with 4.2.0 and nathelper and/or rtpproxy
Hi
You should compare this line in your configuration file.
if (nat_uac_test("18")) {
It may be using different parameters.
Regards,
Amit
On 11/18/2014 5:23 PM, Igor Potjevlesch wrote:
Hello,
I can reproduce the issue on a pre-production system.
So, I downgraded to 4.1.5.
Here is the difference:
The INVITE comes into NATDETECT:
route[NATDETECT] {
xlog("ENTERING NATDETECT routes\n");
#!ifdef WITH_NAT
force_rport();
if (nat_uac_test("18")) {
if (is_method("REGISTER")) {
fix_nated_register();
} else {
add_contact_alias();
}
setflag(FLT_NATS);
xlog("NAT_UAC_TEST OK\n");
}
#!endif
return;
}
With Kamailio 4.2.0, the NAT_UAC_TEST returns true whereas with 4.1.5 returns false.
I also look at the “force_rport”. I’m not sure if it’s related, but with 4.2.0, the Via
looks like:
Via: SIP/2.0/UDP
PST_GW:5060;received=PST_GW;rport=5060;branch=z9hG4bK-34d5-1416308856-4847-441\r\n
In 4.1.5:
Via: SIP/2.0/UDP PST_GW:5060;rport=5060;branch=z9hG4bK-2e3d-1416311184-4886-146\r\n
The received parameters is not added. Note that PSTN_GW refers to a public IP address (out
of RFC1918 and Carrier Grade NAT).
Regards,
Igor.
De : Igor Potjevlesch [ <mailto:igor.potjevlesch@gmail.com>
mailto:igor.potjevlesch@gmail.com]
Envoyé : mardi 18 novembre 2014 11:43
À : sr- <mailto:users@lists.sip-router.org> users(a)lists.sip-router.org
Objet : Issue with 4.2.0 and nathelper and/or rtpproxy
Hello,
Since I done the upgrade of Kamailio into 4.2.0, there are, at least, one new case where
the RTPProxy is launched.
When I got an INVITE from my PSTN Gateway, for unknown reason (and not for all calls),
Record-Route is append with nat=yes. I looked into an old trace and this behaviour didn’t
exist.
What could have changed that can explain this?
Regards,
Igor.
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<mailto:sr-users@lists.sip-router.org> sr-users(a)lists.sip-router.org
<http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<mailto:sr-users@lists.sip-router.org> sr-users(a)lists.sip-router.org
<http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda