[Asterisk-Users] How STUN work?

Karl Brose khb at brose.com
Mon Aug 2 10:19:01 MST 2004


STUN (RFC-3489) is an UNSAF type network protocol (see RFC 3424) that is 
used to discover UDP address and port
 bindings across network address translators.

(a) Currently Asterisk only supports static configuration of the 
external IP address of a NAT.
You need to discover it  manually by other means and configure SIP channel.
This method fails for certain types of NATs that don't  preserve port 
mapping from inside to outside across the
NAT.  i.e. if you are originating a request from  ipaddress:5060, the 
NAT may map it to anotheraddress:15345
and this mapping may not be predictable, therefore asterisk cannot send 
proper SIP headers and will fail.

(b) Some ISP providers who use dynamic IPs will force your NAT  router 
to refresh its IP address periodically
and assign you a different one, at which time it would be nice to 
automatically recognize that without having to
shut down your Asterisk and restarting.

ShanKutti wrote:

>  
>Hi 
>
> Can anyone give suggestion why we need STUN while using asterisk behind the NAT.
>
>Regards
>Shan.
>  
>



More information about the asterisk-users mailing list