[Asterisk-Users] SIP NAT

Rich Adamson radamson at routers.com
Thu Oct 30 10:01:43 MST 2003


Dave,

> Should it work to have a multi-homed asterisk server with grandstream 
> phones on the internal network and another grandstream phone on the 
> internet and be able to call between them? I set the bindaddr to the 
> external IP and pointed the internal and external grandstream phones to 
> that address. The signalling works fine to call between phones, but when 
> you pick up the ringing phone you get a reorder tone.

You can probably get it to work. Might read my "lengthy" rant on nat from
the last day or two.

If you don't understand the sip protocol in detail, at least recognize
that a sip call setup involves:
 a. sip phone #1 interacts with * on udp 5060
 b. after dialing sip phone #2, * will attempt to ask sip phone #1 to
    contact sip phone #2 directly on udp 5060 (through nat)
 c. the two sip phones will negotiate some other udp port for the RTP
    (voice conversation), and the actual port selected is phone-vendor
    dependent.

In your case, the words that you've used suggest the RTP part of that
process is being blocked by your nat/firewall box. (That's why you get
the reorder tone.)

On some sip phones you can set the range of ports to be used for RTP.
I'm not a grandstream user, so don't have a clue how that might be done.
If it can, then set the range to something like 21000-21010 (or whatever),
and set static port forwarding entries in your nat box for the same.
May also need "nat=yes" for the extensions in sip.conf.

Another approach is to set canreinvite=no on both phones in sip.conf,
which forces the RTP flow to pass through asterisk. (Best check the
syntax of that as I'm going from sleep-deprived coffee-lacking memory.)

Rich





More information about the asterisk-users mailing list