Link to home
Start Free TrialLog in
Avatar of jonnydollar
jonnydollar

asked on

Asterisk: port forward sip protocol to asterisk server

i need to port forward sip protocol to asterisk server so that remot phones can get connected. i have a linksys router
Avatar of bhnmi
bhnmi

Forward Port 5060 (if it is on the default sip port) To the IP address of the trix box
Avatar of jonnydollar

ASKER

i have done a range of ports 5060-5080 to the asterisk server i think and i am still unable to register
1) Forward tcp & udp port 5060 to the asterisk server.

2) Forward udp ports 10000-20000 to the asterisk server and check /etc/asterisk/rtp.conf to make sure asterisk is using this port range for rtp.
If you done do this then you will get one way audio.

3) Edit /etc/asterisk/sip.conf and define your local network IP range and the external IP address of the asterisk box (which will be the public IP address of the netgear router).
This is required so that asterisk puts the correct IP address in the SIP packets.

4) In sip.conf for the phones connecting from the internet put 'NAT=yes'. This helps if the phone itself is also behind a NAT device.
I know you're trying to do this with a SIP protocol. Its quite tricky Have you considered IAX?

I've used this site:
http://www.voip-info.org/wiki/view/Asterisk+SIP+NAT+solutions

But with little success. My best solution was to create a VPN tunnel between two sites. This involved no hacking of the Asterisk box, just the firewalls.
grblades:

I used dyndns to reach my network because my public ip is a dynamic one from the provider. will this still be successful? you mentioned defining the local network ip range and the public ip in the sip.conf file. Can you give me an example?
ASKER CERTIFIED SOLUTION
Avatar of grblades
grblades
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i use a combination of soft phones and ip phones. i have one grandstream budgetone bt-101 sip phone and on my computers i use eyeBeam. Is it still reccommended i use IAX?
eyebeam is on a laptop that i would like to register to the remote asterisk server btw
If eybeam is working for you now then by all means carry on using it.

You may find that it does not work from some hotels etc...
If you find this is often the case then you can switch to DIAX and it will improve the chance of you being able to use it.
Yes, Eyebeam is what I use in hotels setup using IAX2. Works great!
it worked i can register but i cant get any audio coming back from the other end. any suggestions
Can you post the contents of your rtp.conf file.
I assume the audio problem is when using SIP?

If you wanted to try IAX2 you will just need to open UDP port 4569 and then make the relevant addition to the iax configuration file and the dialplan (to call the iax extension). You wont have any one way audio problems with IAX2.