[asterisk-users] How to configure a stun server for a sip peer

Marco Ciacci mciacci at silog.it
Fri Apr 27 07:41:04 MST 2007


Yes, i use Asterisk behind a retricted-cone NAT in many cases 
(portforwarding on router, nat=yes and externip=dyndns o static ip), 
but not ever is a possible solution, sometimes my client isn't 
router's owner (telco's router) and i can't do port forwarding.
I known that 1.4 has stun support, but i didn't find nothing :-(
Bye,

At 16.05 27/04/2007, you wrote:
>On Fri, 27 Apr 2007, Marco Ciacci wrote:
>
>>HI all!
>>I'm looking for some infos to configure stun server support for a SIP peer.
>>I've installed Asterisk 1.4.3, but searching for stun support in 
>>chan_sip (sip.conf) i've found nothing, only a "misterious" externip = stun...
>>But where i have to put the ip of stun server?
>>No infos around Google and forum! :-)
>
>I don't know is 1.4 supports a STUN server, 1.2 doesn't that I'm aware of.
>
>What are you trying to achieve? If it's just asterisk behind NAT, then:
>
>The externip= paramter in sip.conf lets asterisk know what the 
>external IP address is, so it can put that in the outgoing SIP 
>headers, and hope that incoming packets to that IP address are 
>"magically" forwarded by the router. You need nat=yes too.
>
>So, Eg. You have a router which has external facing IP address 
>1.2.3.4 and doing NAT to internal hosts on 192.168.1.x. you put 
>externip=1.2.3.4 in the sip.conf file and arrange the router to 
>port-forward incoming 5060 to the asterisk box on 192.168.1.x. At 
>the same time, you need to get the router to port-forward RTP on 
>10000-20000 by default to the asterisk box too.
>
>Then, external SIP devices use the external IP address 1.2.3.4 and 
>it all "just works". (you may have issues if the external SIP 
>devices are behind NAT, but that's another issue)
>
>If asterisk supports STUN, then what the external STUN server will 
>do is tell asterisk what it's external IP address is. (and maybe some more)
>
>I'm sure there's a good reason for SIP having it's IP address 
>encoded into it, but I can't think of one right now )-:
>
>Gordon
>_______________________________________________
>--Bandwidth and Colocation provided by Easynews.com --
>
>asterisk-users mailing list
>To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.

--

Marco Ciacci

Asterisk Admin
Windows Server & Linux Admin
Security & Networking
@
Silog Srl. (Siena)
Tel. 0577271840
mciacci at silog.it




More information about the asterisk-users mailing list