0
votes

I have asterisk in a server having public ip. I am trying to asterisk from outside network from a sip phone(zoipar). I have opened the port 5060 on my router which is the default udp port for asterisk sip connection and i have also opened the 10000-20000 port for rtp defined in rtp.conf in asterisk. When i m trying to connect my softphone to asterisk server from outside my network, it says Registration timeout and when i check if i got any hit on my port 5060, its doesnt show anything. on my server 5060 is running

netstat -nlp | grep 5060

udp        0      0 0.0.0.0:5060  0.0.0.0:*  21768/asterisk

BTW I'm able to connect from local network without any problem .

3
Since you have not collected any information first make sure receiving sip packets from outside using asterisk cli sip debug or tcpdump then look at packet to see from which ip you're receiving from, you might want to change externip and nat configuration in sip.confvahid abdi
If your computer is behind NAT, you might have to use a STUN server. Enable STUN support and specify the hostname (or IP) of a STUN server in your sip phone.pce
@Vahid thanks for your suggestion :) , When i try to capture sip packets using tcpdump , i only see packets from only local machines , not from outside machines. i have given the extenip according to examples. What can be the problem i m not able to get sip packets from outside network?n j
@pce yes my computer is behind the NAT, i will try to use a STUN server(i dont know what is that ), but i just found some links on google, i will try and let u know :) thanksn j

3 Answers

1
votes

You need to forward incoming traffic on your router from SIP and RTP to your asterisk server, it's not enough to open those ports, you need to explain your router where to send incoming traffic ton those ports

1
votes

You need setup NAT.

This article will help you in your situation.

http://www.voip-info.org/wiki/view/Asterisk+sip+nat

0
votes

You need to login to your router and forward the ports to your asterisk server internal IP.

You will also need to make sure your firewall on your server is setup correctly to allow the ports to go in and out of your server.

You can read more on iptables here: http://www.cyberciti.biz/tips/linux-iptables-examples.html