[Asterisk-Users] Stun support

Eric Wieling aka ManxPower eric at fnords.org
Tue Aug 9 07:57:31 MST 2005


Rajeew Kumar Singh wrote:
> Hi Eric,
> How one can make outgoing call to a SIP user sitting in the Internet when
> Asterisk is not configured with Outbound Proxy to  some SIP Proxy server on
> the Internet for this simple scenario ?
> 
> SIP UA A ------- Asterisk -------NAT-------Internet----------- SIP UA B
> I know if Asterisk is configured with Outbound proxy sitting in the
> Internet, it will work.
> What will happen when it is not configured with that?

This is just a standard home/SME NAT setup with Asterisk.  Nothing 
special about it.  Heck, the SIP devices are not even behind NAT!

Use externip= and localnet= in sip.conf then port forward 5060/UDP and 
the RTP ports on the NAT router.  The only significant is issue is 
making sure the remote SIP devices use the RTP ports you are expecting 
them to and making sure that the SIP device does not have any NAT 
options enabled.

I use an even more complicated configuration where I have this setup:

SIP UA A ------ Asterisk ------ NAT ----Internet

My SIP UA A can roam between the local network, the internet with public 
IP and the internet with a NAT IP.  No config changes at all to Asterisk 
or the SIP UA when I move bewteen networks.  Just unplug the device from 
my home network and go to another network and plug it in.

There are two significant limitations to my setup.

The first is that all audio that goes between remote SIP devices that 
are behind NAT must go thru Asterisk.  i.e. Reinvites won't work.  My 
response to this issue is "Who cares?".  A VoIP service provider will 
have most of their calls going from the SIP UA to the PSTN.  Assuming 
Asterisk is acting as the PSTN gateway, then the audio will have to go 
thru Asterisk anyway, so reinvites not working is a non-issue.

The second limitation is that the NAT IP should not be dynamic. 
Asterisk has significant issues with ANY transient DNS issue.  I've been 
told that this issue has been addressed in CVS-HEAD, but have not 
personally tested this.

-- 
Eric Wieling * BTEL Consulting * 504-210-3699 x2120

r: Generate a ringing tone for the calling party, passing no audio from
the called channel(s) until one answers. Use with care and don't insert
this by default into all your dial statements as you are killing call
progress information for the user. Really, you almost certainly do not
want to use this. Asterisk will generate ring tones automatically where
it is appropriate to do so. "r" makes it go the next step and
additionally generate ring tones where it is probably not appropriate to
do so.




More information about the asterisk-users mailing list