Hi.
Sorry to keep this conversation open.
I’m still facing this problem and I don’t know why is happening.
The Contact stored in the “location” table keeps the Private IP, despite
the fact is fix_nated_register().
{
"AOR": "d1.920-mydomain",
{
"Contact": "
sip:[email protected]:5060;rinstance=d1.920-d789e5c341f8ac524c0a3441cded7ba6
",
"ContactID": "933089547795847775",
"Expires": 518,
"Q": "",
"Callid": "
[email protected]",
"Cseq": 2,
"User-agent": "CounterPath Bria Push Server
2.3.0 (20980)",
"Received": "sip:216.93.246.120:5060",
"State": "CS_NEW",
"Flags": 0,
"Cflags": "SIP_PING NAT",
"Socket": "udp:64.76.XXX.133:5060",
"Methods": 3567,
"SIP_instance":
"<urn:uuid:f7a5b4e0-92dd-5227-b355-0467623c49c0>"
And INVITE to this extension flows ok… but the ACK to the 200 OK still
goes to the Private IP In the contact header.
The thing I don’t get, as I explained in the preview mail, is why the FIRST
REGISTER the CONTACT is fixed, but for the second REGISTER (from the Push
Server) the contact is not fixed… (despite the fact it has a Received
parameter).
Ay cloue?.
Thanks!
Ricardo
*De:* Ricardo Martinez <[email protected]>
*Enviado el:* viernes, 20 de noviembre de 2020 11:41
*Para:* 'OpenSIPS users mailling list' <[email protected]>
*Asunto:* Weird problem with NATHELPER
Hi.
I’m facing a weird problem with the NATHELPER module. I’m using Opensips
3.1.0.
Seems that for certains REGISTER messages the nathelper module can fix the
Contact IP address with the fix_nated_register() function. I don’t know if
I’m missing something or maybe is a bug.
So, this is the scenarario.
I have opensips in front of a PBX, using the NATHELPER module for NAT
traversal and the MID_REGISTER module for managing the REGISTER messages to
the PBX
Local PBX – Opensips (NATHELPE + REGISTER) --- UAC
The UAC is a softphone in a local WiFi network, when the softphone register
for the first time I can see the REGISTER flow OK, NATHELPER module
changing the private IP with the public received IP and port. This is the
initial register:
2020/11/20 11:05:21.150428 186.106.166.154:44849 -> 64.76.XXX.133:5060
REGISTER sip:my.domain.com:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.83:44849
;branch=z9hG4bK-524287-1---10f17e71be522f67;rport
Max-Forwards: 70
Contact: <sip:[email protected]:44849;rinstance=e21f207006bd104d
>;+sip.instance="<urn:uuid:f7a5b4e0-92dd-5227-b355-0467623c49c0>";reg-id=1
To: "User 920"<sip:[email protected]:5060>
From: "User 920"<sip:[email protected]:5060>;tag=4fa4f17b
Call-ID: 186079_mobile-rel120NjE4M2U3MWEzMjFhYjRmZDM0NGQyYWNkYWJjZjliNjA
CSeq: 1 REGISTER
Expires: 300
Allow: OPTIONS, INVITE, ACK, CANCEL, BYE, REFER, INFO, NOTIFY, UPDATE,
PRACK, SUBSCRIBE, MESSAGE
Supported: outbound, path
User-Agent: VEX Android 6.3.1.1 build 122490
Content-Length: 0
And the output for the command ul_dump
[root@sbcar opensips]# opensips-cli -x mi ul_dump
{
"Domains": [
{
"name": "location",
"hash_size": 4096,
"AORs": [
{
"AOR": "d1.920-mydomain1",
"Contacts": [
{
"Contact": "
sip:[email protected]:44849;rinstance=e21f207006bd104d",
"ContactID": "933089547795829631",
"Expires": 290,
"Q": "",
"Callid":
"186079_mobile-rel120NjE4M2U3MWEzMjFhYjRmZDM0NGQyYWNkYWJjZjliNjA",
"Cseq": 10,
"User-agent": "VEX Android 6.3.1.1 build
122490",
"Received": "sip:186.106.166.154:44849",
"State": "CS_NEW",
"Flags": 0,
"Cflags": "SIP_PING NAT",
"Socket": "udp:64.76.XXX.133:5060",
"Methods": 8063,
"SIP_instance":
"<urn:uuid:f7a5b4e0-92dd-5227-b355-0467623c49c0>"
So far so good.
But, the softphone is an app in a mobile phone, so at some point the
softphone “goes to sleep”, and my “PUSH” server takes control. So the Push
server REGISTERS on behalf of the softphone… the REGISTER arrives at the
Opensip, again from a NATED environment, so the uac_nat_test(19) catch the
REGISTER, and apply fix_nated_register. But for some reason I don’t get
the stored “Contact” keeps the “private” IP.
This is the “new” REGISTER for the PUSH SERVER….
2020/11/20 11:06:21.333836 216.93.246.120:5060 -> 64.76.XXX.133:5060
REGISTER sip:my.domain.com:5060 SIP/2.0
Via: SIP/2.0/UDP 10.10.223.107:5060
;branch=z9hG4bK-524287-1---4703675abd3a9c18;rport
Max-Forwards: 70
Contact: <
sip:[email protected]:5060;rinstance=d1.920-d789e5c341f8ac524c0a3441cded7ba6
>;+sip.instance="<urn:uuid:f7a5b4e0-92dd-5227-b355-0467623c49c0>";reg-id=1;expires=600
To: <sip:[email protected]:5060>
From: <sip:[email protected]:5060>;tag=cfad065a
Call-ID: [email protected]
CSeq: 1 REGISTER
Expires: 600
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, MESSAGE, OPTIONS, PRACK, REGISTER,
UPDATE
User-Agent: CounterPath Bria Push Server 2.3.0 (20980)
Content-Length: 0
And this is the locations table.
[root@sbcar opensips]# opensips-cli -x mi ul_dump
{
"Domains": [
{
"name": "location",
"hash_size": 4096,
"AORs": [
{
"AOR": "d1.920-mydomain",
"Contacts": [
{
"Contact": "
sip:[email protected]:5060;rinstance=d1.920-d789e5c341f8ac524c0a3441cded7ba6
",
"ContactID": "933089547795829633",
"Expires": 587,
"Q": "",
"Callid": "
[email protected]",
"Cseq": 2,
"User-agent": "CounterPath Bria Push Server
2.3.0 (20980)",
"Received": "sip:216.93.246.120:5060",
"State": "CS_NEW",
"Flags": 0,
"Cflags": "SIP_PING NAT",
"Socket": "udp:64.76.XXX.133:5060",
"Methods": 3567,
"SIP_instance":
"<urn:uuid:f7a5b4e0-92dd-5227-b355-0467623c49c0>"
Does someone have a clue on this?
Thanks!
*Ricardo Martinez*
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users