[SIPForum-discussion] My sip proxy forward SIP ACKs when it must not, because R-R was changed by me. How to fix the issue?
Rodrigo Pimenta Carvalho
pimenta at inatel.br
Wed Jan 13 19:35:36 UTC 2016
Dear SIP-users;
My sip proxy is behind a NAT. The public IP is xxx.xxx.xxx.xx.
So, I have configured my proxy to it advertises the address="xxx.xxx.xxx.xx" in Record-Routes header fields.
It seems that such new configurations takes appropriated effect, because a Record-Route header field in a SIP OK message (for a call that was answered) contains the IP xxx.xxx.xxx.xx, when it arrives to the caller (the proxy adds Record-Rout xxx.xxx.xxx.xx when the SIP INVITE is forwarded).
So, when the caller receives that SIP OK it sends the SIP ACK to IP xxx.xxx.xxx.xx, port 5060. Then the proxy receives the SIP ACK that has Route header field containing the IP xxx.xxx.xxx.xx.
Now the problem: the proxy refuses the SIP ACK as this message was to another proxy and forward it. As log as the route is xxx.xxx.xxx.xx, the SIP ACK returns to the proxy that forward it again. It becomes a loop.
How to solve this issue? That is, how to change my Record-route fields when my proxy is behind a NAT device?
Any hint?
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Some more details:
Message Header from SIP OK when the proxy considers its public IP (received by the caller):
Via: SIP/2.0/TCP 192.168.100.156:49701;received=192.168.100.156;rport=49435;branch=z9hG4bK-524287-1---83551a757586c661
From: "6003" <sip:6003 at 192.168.100.166;transport=TCP>;tag=6411c24d
To: <sip:5454 at 192.168.100.166;transport=TCP>;tag=6gfJa5K
Call-ID: CqALnsdKO7c4dV5Oqsy9Aw..
CSeq: 2 INVITE
User-Agent: LinphoneAndroid/2.5.1 (belle-sip/1.4.1)
Supported: outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE
Contact: <sip:5454 at 192.168.100.190:52634;transport=tcp>;+sip.instance="<urn:uuid:2c8780cb-11e4-414e-a7a5-9508e3ab0737>"
Content-Type: application/sdp
Content-Length: 196
Record-route: <sip:xxx.xxx.xxx.xx;transport=tcp;lr;nat=yes;did=ef9.b0083ae4>
Message Header from SIP ACK (sent by caller and received by the proxy. the proxy forward it instead of handle it):
Via: SIP/2.0/TCP 192.168.100.156:49701;branch=z9hG4bK-524287-1---4adc5e2a67267ccd
Max-Forwards: 70
Route: <sip:xxx.xxx.xxx.xx;transport=tcp;lr;nat=yes;did=de2.a332f873> // The xxx.xxx.xxx.xx is the public ip of my proxy. So the proxy should consider this message and handle it, sending the ACK to the callee.
Contact: <sip:6003 at 192.168.100.156:49701;transport=tcp>
To: <sip:5454 at 192.168.100.166;transport=TCP>;tag=Zw5eZ5e
From: "6003" <sip:6003 at 192.168.100.166;transport=TCP>;tag=f97c143e
Call-ID: iGu3D2Ej0BIXJF18BzYQKA..
CSeq: 2 ACK
User-Agent: Z 3.9.32144 r32121
Content-Length: 0
When the proxy uses its private IP, in record-routes header fields, I have a situation that every thing is OK. See:
Message Header from SIP OK:
Via: SIP/2.0/TCP 192.168.100.156:54027;received=192.168.100.156;rport=49762;branch=z9hG4bK-524287-1---797c5d2ec2efe2e5
From: "6003" <sip:6003 at 192.168.100.166;transport=TCP>;tag=3f450756
To: <sip:5454 at 192.168.100.166;transport=TCP>;tag=4K3qFjS
Call-ID: 4vi0QfkKNA1uG097UpxFew..
CSeq: 2 INVITE
User-Agent: LinphoneAndroid/2.5.1 (belle-sip/1.4.1)
Supported: outbound
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, UPDATE
Contact: <sip:5454 at 192.168.100.190:52906;transport=tcp>;+sip.instance="<urn:uuid:2c8780cb-11e4-414e-a7a5-9508e3ab0737>"
Content-Type: application/sdp
Content-Length: 195
Record-route: <sip:192.168.100.166;transport=tcp;lr;nat=yes;did=eea.041a8154>
Message Header from SIP ACK (sent by caller and received by the proxy.):
Via: SIP/2.0/TCP 192.168.100.156:54027;branch=z9hG4bK-524287-1---9aabb6a752bd7158
Max-Forwards: 70
Route: <sip:192.168.100.166;transport=tcp;lr;nat=yes;did=eea.041a8154>
Contact: <sip:6003 at 192.168.100.156:54027;transport=tcp>
To: <sip:5454 at 192.168.100.166;transport=TCP>;tag=4K3qFjS
From: "6003" <sip:6003 at 192.168.100.166;transport=TCP>;tag=3f450756
Call-ID: 4vi0QfkKNA1uG097UpxFew..
CSeq: 2 ACK
User-Agent: Z 3.9.32144 r32121
Content-Length: 0
Any hint will be very helpful!
Best regards.
RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sipforum.org/pipermail/discussion/attachments/20160113/171382f5/attachment-0002.html>
More information about the discussion
mailing list