NAT Problem


#1

Hi,

I am trying to configure SIP on asterisk server. My SIP server is behing the Router. The IP address of SIP server is 172.31.255.5. I have forwardered UDP port 5060 from the router onto 172.31.255.5. I can call and listen to the other people using xten soft phone when I am in the internal LAN i.e. 172.31.255.0.

My Problem in this case is if someone else calls me from the outside/internet, then the xten phone rings. I can call outside and anyone can call me inside. But, I cannot hear the voice. There is no voice at all.

I have forwarded RTP ports to the asterisk server as well. I belive RTP port that asterisk by default uses are 10000-20000 and its mentinoed in rtp.conf.

In sip.conf I have put the following NAT related entries.

externip = mypublicip
localnet = 172.31.255.0/255.255.255.0
nat = yes

Can anyone please guide me in this record what I am doing wrong here.

Thanks in Advance.

Regards

Haroon


#2

Maybe this link can be useful for you:

http://www.voip-info.org/wiki/view/Asterisk%40Home+Handbook+Wiki+Chapter+2#2532Settingupyourrouterfirewallsoyourrem


#3

Please post your entire sip.conf. Something is missing.


#4

Open ports (all UDP !!):

5060-5063
10000-50000

No harm in the latter but some phones are using RTP ports outside the 10000-20000 range.

You might want to check this line in your sip.conf
autodomain=yes

depending on your network setup it might be needed.

Make sure the correspondending SIP blocks for the phones are correct, esp. the “NAT=YES” and canreinvite lines.


#5

RichardHH, mirceahuh and David,

Thank you all of you replying to my post. I have already resolved the problem. The problem was with the port forwarding on the router. I was doing that wrongly. Fixed that and every thing is crystal clear now.

Thanks again

Regards

Haroon