Remote VOIP/SIP Phones through two routers

Home » Asterisk Users » Remote VOIP/SIP Phones through two routers
Asterisk Users 2 Comments

So, assuming your Asterisk box is behind one firewall (Linksys/Tomato
Software) and your Wireless SIP phone is behind another firewall
(SonicWall 1260 Enhanced). Is there anything special that I have to do
to the firewalls. I do have the Asterisk firewall configured to work
(ports 5060 & 10001-20000). But I’m not sure about the other end. Do I
need STUN at the SIP Phone end? Do I need to make sure that any
particular ports are open. Anybody have specific experience with
setting a SonicWall up so that local SIP phones will work.

The Specific phone is a D-Link DPH-540 (WiFi). But it would be nice to
allow more standard SIP phones like the SPA942 etc.


2 thoughts on - Remote VOIP/SIP Phones through two routers

  • On Sat, 25 Dec 2010 09:49:29 -0500, John Ervin

    If the SonicWall firewall supports STUN, just configure each SIP
    client to use this to connect to the Asterisk server.

    In Asterisk, provided the firewall also provides NAT, use the
    following settings in sip.conf so that Asterisk knows that SIP packets
    should be rewritten and how:

    externip= ;the LAN where Asterisk lives

    ;all RTP packets go through Asterisk

    ;template for SIP users


    As for the RTP part :
    – 10001 is wrong, since RTP always starts on even ports, and AFAIK
    uses two ports (one for sound TX/RX, and one for RTCP)
    trim it down. Make sure the range mapped on the Tomato matches what it
    says in rtp.conf


  • OK my sip.conf looked OK and to save ports, I changed the rtp.conf to
    specify the following and altered the linksys to match.


    I don’t think I remember seeing Stun on the sonicwall, but it does seem
    to have a lot of VOIP stuff. They do have a help for VOIP so I’ll play
    with that.