RTP and NAT - Traffic going to wrong IP address.

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
syncopix
Posts: 2
Joined: Mon Dec 15, 2014 3:06 pm
Location: United Kingdom

RTP and NAT - Traffic going to wrong IP address.

Post by syncopix »

1. Brekeke Product Name and Version: Brekeke SIP Server 2.4.9.0/286.3

2. Java version:

3. OS type and the version: Windows Server 2003

4. UA (phone), gateway or other hardware/software involved:

5. Your problem:

Hello.

I have a scenario where the UA is behind NAT. The UA is assigned a 100.100.x.x address on the LAN and there is a VPN tunnel from the router to the HQ where the Brekeke PBX/SIP is located. Traffic going from the UA is NAT'd through the VPN tunnel so at the Brekeke end the traffic appears to be on the LAN, which is 10.x.x.x.

The first problem I had was with SIP. Because the SIP header contained the 100.100.x.x (pre-NAT) address the UA was being registered on the SIP server using this address. The actual IP address is of course the post-NAT 10.x.x.x address so SIP packets from Brekeke were being sent to 100.100.x.x and getting no where.

I fixed this by setting the following in the Advanced configuration:

register.contact.remote=true

Now SIP is going to the post-NAT 10.x.x.x address.

But RTP is still going to the pre-NAT 100.100.x.x address.

How can I fix this?

I have tried things like RTP relay "on" and I have also tried setting "net.rtp.follow.remoteaddr=true" in Advance configuration too but a packet capture always shows RTP going to the wrong IP address.

I can provide a screenshot of a packet capture if required.

Any help would be appreciated.
Laurie
Posts: 246
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

Add this line in the Advanced configuration.

net.registrar.awake.use = true

Then re-register the UA.
syncopix
Posts: 2
Joined: Mon Dec 15, 2014 3:06 pm
Location: United Kingdom

Post by syncopix »

Thanks for your reply.

I added this, restarted SIP server and restarted the UA but it didn't make any difference. SIP traffic goes to the correct address (10.x.x.x) but RTP traffic was still going to the incorrect address (100.100.x.x) which isn't routable on the network.

However, I found net.sip.fixed.addrport.uas and set this to true and this appears to have fixed my issue and not break anything else. So my Advanced settings look like:

register.contact.remote=true
net.rtp.follow.remoteaddr=true
net.registrar.awake.use=true
net.sip.fixed.addrport.uas=true

I'm trying to find a list of all these variables and what they mean/do. I have no idea what "net.sip.fixed.addrport.uas" is doing. I just found it mentioned on the forums :) Is there a place where I can find this information?

Thanks.
Laurie
Posts: 246
Joined: Mon Jan 07, 2008 12:25 pm

Post by Laurie »

Hi syncopix,

I don't think "net.sip.fixed.addrport.uas" solved the issue because it is for using a fixed UAS's IP address during a SIP session.
So I suppose that RTP-relay still works even if you remove "net.sip.fixed.addrport.uas".

For "net.registrar.awake.use"..
Have you re-registered SIP UA clients after you set "net.registrar.awake.use"?
If not, RTP-relay will not work as you want.

I recommend you remove "net.sip.fixed.addrport.uas" and keep "net.registrar.awake.use".

Also I strongly recommend that you use the latest version of Brekeke SIP Server. It will bring better audio quality.
Post Reply