Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
RTP and NAT - Traffic going to wrong IP address.
Author Message
syncopix
Brekeke Newbie


Joined: 15 Dec 2014
Posts: 2
Location: United Kingdom

PostPosted: Mon Dec 15, 2014 3:17 pm    Post subject: RTP and NAT - Traffic going to wrong IP address. Reply with quote

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.
Back to top
View user's profile
Laurie
Brekeke Master Guru


Joined: 07 Jan 2008
Posts: 243

PostPosted: Mon Dec 15, 2014 5:23 pm    Post subject: Reply with quote

Add this line in the Advanced configuration.

net.registrar.awake.use = true

Then re-register the UA.
Back to top
View user's profile
syncopix
Brekeke Newbie


Joined: 15 Dec 2014
Posts: 2
Location: United Kingdom

PostPosted: Tue Dec 16, 2014 1:34 am    Post subject: Reply with quote

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 Smile Is there a place where I can find this information?

Thanks.
Back to top
View user's profile
Laurie
Brekeke Master Guru


Joined: 07 Jan 2008
Posts: 243

PostPosted: Tue Dec 16, 2014 12:07 pm    Post subject: Reply with quote

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.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1