x
willypick
The asterisk config that dare not speak its name: Double NAT!

Yes, it's possible in spite of what ManxPower and others have said on the #asterisk channel! They mean well, it isn't fun and it won't work with all routers.

So here is is. I have a WRT54G at home with the following connected to this router:
  • 1 BT102 SIP phone
  • 1 IAXy
  • multiple SIP softphones on PC and laptop

Asterisk is running at the office on a Linksys WAG54G at 192.168.1.5.

Let's start with the port forwarding on the asterisk router:

  • 5060 (sip) UDP/TCP to 192.168.1.5
  • 10000-10100 UDP to 192.168.1.5 - (same ports in rtp.conf)
  • 4569 (IAX2) UDP to 192.168.1.5
  • 22 (ssh) to 192.168.1.5
If you want to run Apache, add port 80 to the list but you'll want to be careful about controlling access.


The client side configs (on the home router):

Port protocol device
  • 5060 UDP/TCP BT102
  • 10000-10049 UDP BT102
  • 5061 UDP/TCP Softphone1
  • 10050-10100 Softphone1
  • 4569 UDP IAXy - I need this to reprovision from a dynamic asterisk server ip


Set the Grandstream to begin using RTP ports at 10000.
Set Softphone1 to use 10050
Set Softphone1 to sip.yourserver.com:5061

That's all I've done. When someone else got a phone to put on his DSL connection, he forwarded 5060 to the phone, set it to use 10000 for rtp and it worked right away.

Also, in sip.conf I have nat=yes in the general section with externip= and localnet= filled in.

In all type=friend entries that are behind NAT are also

nat=yes
canreinvite=no

hth
 
Calendar

September 2010
1234
567891011
12131415161718
19202122232425
2627282930

January 2007
123456
78910111213
14151617181920
21222324252627
28293031

October 2006
1234567
891011121314
15161718192021
22232425262728
293031


Older