[asterisk-users] Asterisk and NAT
Vincent
vincent.delporte at bigfoot.com
Tue Dec 11 14:08:23 CST 2007
On Tue, 11 Dec 2007 11:05:24 -0600, Carlos Chavez
<cursor at telecomabmex.com> wrote:
> The only thing you need to do is set nat=yes when you configure the
>phones in Asterisk. You may need to use a STUN server in case the
>phones do not properly see the outside address. Once the phones
>register they should be able to dial each other.
Unless I'm mistaken, there are other things to do:
- add the following in sip.conf
[general]
...
externip=1.2.3.4
nat=yes
localnet=192.168.0.0/24
qualify=yes
canreinvite=no
[200]
...
qualify=yes ; Qualify peer is no more than 2000 ms away
nat=yes
host=dynamic ; This device registers with us
canreinvite=no ; Asterisk by default tries to redirect
- if the NAT firewalls that protect the two phones aren't
SIP-friendly, you'll have to force the phones to use specific UDP
ports for SIP and RTP, and map those ports on the firewall so that
incoming packets are let through.
I was about to post a message about Asterisk and NAT, but I might as
well ask here: Is there really no way to get two SIP devices to talk
to each other in case one or both are behind a NAT firewall, ie. RTP
packets must always go through Asterisk (hence, the "canreinvite=no")?
Thx
Fred.
More information about the asterisk-users
mailing list