Home page |
Mailing list |
Docs
Last updated: Sat Feb 3 05:02:06 2007
Asterisk developer's documentation :: Codename Pineapple
NAT settings in chan_sip.c is settable per device or in the general section of sip.conf NAT support in the current chan_sip has these options:
- nat = yes Always assume NAT. Turn on Symmetric SIP and RTP
- nat = no Enable NAT support only if requested by ;rport
- nat = never Never enable NAT support
- nat = route Assume nat, don't send ;rport
- Can RE-invite?
- In addition to NAT handling, we do support remote RTP bridging with
- canreinvite = yes The device supports direct RTP media (media from another endpoint than asterisk)
- canreinvite = no Never do re-invites
- canreinvite = nonat Don't do re-invites if the device is known to be behind NAT
- canreinvite = update Use UPDATE instead of INVITE for media path redirection This option can be combined with nonat, like "canreinvite=update,nonat"
- Asterisk behind NAT - extern IP
- For Asterisk behind NAT, talking with Internet endpoints we have
- externip = <ip>
- externhost = <hostname>
- externrefresh = <secs>
- localnet = <IP networks>="">
For chan_sip3, I'm considering something like this:
- Automatic NAT support
We will recognize the RFC 1918 networks (192.168.x.x, 10.x.x.x, 72.x.x.x) and automatically enable symmetric RTP for them.
- if they have an IP in the SDP belonging to these networks
- if they request it with ;rport
- if they REGISTER with a Contact URI in these IP ranges
- if the INVITE contact URI belongs to these IP ranges
If the Via header indicates proxy use (device not communicating with us directly) we will only enable symmetric RTP and NOT symmetric SIP.
- Remote bridging
- Remote bridging will happen
- If we don't need DTMF (and DTMF is either RFC2833 or inband)
- If we don't need o record the media stream for any reason
- If we have two devices on public IP and Asterisk is on public IP (no externip setting)
- If we have two devices behind the same NAT. But how do we find that out?
- The bottom Via headers belong to the same network
- The sender's IP is the same
If the devices use STUN and publish a public IP, we just suppose that everything works as if there was no NAT at all.
- STUN support in the SIP client
Asterisk need STUN support in the client to be able to have externip = stun
- Settings in sip3.conf
- nat = auto Only enable nat when needed or if requested by client
- nat = yes Force NAT support, always, regardless
- nat = no
- symmetricmedia = auto, yes, no Only enable NAT for the media streams (text, video, audio, udptl) not for SIP. Assume a SIP proxy in front of the client device and let that one handle SIP nat issues.
- directmedia (replaces can-reinvite) yes, no
- directmediamethod invite, update
- Author:
- OEJ
Asterisk is a trademark for Digium, inc.. | Edvina.net | Asterisk.org | This documentation was generated with Doxygen