[asterisk-users] How to use stun server?
SIP
sip at arcdiv.com
Thu Aug 2 10:32:54 CDT 2007
Honestly, it's really up to the client how it handles information from
STUN.
Ideally, what will happen is that it will modify its Contact headers and
SDP information to include the STUN-discovered IP address and port. In
so doing, when it sends out a request to another server, that server
will then know the proper IP address to use to send data back to the UA.
This is primarily of importance when you are using SER/OpenSER as a SIP
proxy, or have Asterisk set to canreinvite=yes
What happens is that this allows clients to directly talk to each other
using publicly-addressable IP addresses, taking Asterisk out of the
equation except for passing signaling information. It can save
bandwidth. It can ease Asterisk load. Etc, etc.
If you have canreinvite=no set on your Asterisk server, and you're using
Asterisk for your SIP communications, then STUN will still inform the UA
to rewrite its appropriate headers, but you'll see no real difference.
Audio will still be bridged by the Asterisk box. Your bandwidth won't
change. Etc, etc.
It all really depends on what you want to get out of this whole thing
and what your overall network design is.
N.
Rizwan Hisham wrote:
> hi again.....well i have been trying to know what is the relationship
> between asterisk and stun. what i mean is, i understand that a client
> requests stun server to know whether its behind a nat or not. if its
> not, then its ok. if it is behind nat, then what? Now client knows
> what kind of nat it is behind, what is the roll of asterisk in it.
> asterisk already knows client's public ip whether its behind nat or
> not, if the client is registered. So how does stun simplify things if
> there are nat problems.
>
> After requesting stun server and recieving the required information
> from stun server.....what happens next?
> I hope im clear in stating my problem.
>
> Hope to hear from you soon
>
> On 8/1/07, *SIP* <sip at arcdiv.com <mailto:sip at arcdiv.com>> wrote:
>
> No... there's no STUN server built into Asterisk. Asterisk handles NAT
> in a different way... and is an endpoint rather than a proxy, so it
> doesn't really NEED STUN built into it.
>
> However, we run a STUN server on the same machine as an Asterisk
> server
> and see nothing in terms of load increase. STUN's footprint is rather
> negligible.
>
> N.
>
> Rizwan Hisham wrote:
> > Ok thanx. One more thing to ask is: does asterisk has a stun server
> > implemented in it or not. i mean does asterisk contain a stun
> server
> > and provides any application which can be used for enabling the stun
> > server in asterisk?
> >
> > On 8/1/07, *SIP* < sip at arcdiv.com <mailto:sip at arcdiv.com>
> <mailto: sip at arcdiv.com <mailto:sip at arcdiv.com>>> wrote:
> >
> > STUN is a pretty simplistic server. There's nothing else
> that needs to
> > be configured on the STUN server side. It's pretty much
> either running
> > or it's not.
> >
> > Just start plugging in the server to your clients and give it a
> > whirl.
> > It should work.
> >
> > N.
> >
> >
> > Rizwan Hisham wrote:
> > > Hi all,
> > > This is the first time i am using stun with asterisk for nat
> > problems.
> > > I have read the rfc which describes how stun works. i
> didnt have
> > any
> > > problems understanding it. I have also intalled the stun
> server
> > called
> > > stund which i downloaded from sourceforge. I have seen on
> the list
> > > that most people use stund here. I have started the stun
> server and
> > > its running silently. Now i dont know what to do next. Is
> there
> > > something more to it, like configuration files which i can
> use for
> > > special configuration for asterisk, or is there not. How do i
> > proceed,
> > > if there is nothing more to configure in stun, does that
> mean i can
> > > start configuring my clinets (xten and sipura) to use stun
> server?
> > >
> > > --
> > > Best Regards
> > > Rizwan Hisham
> > > Software Engineer
> > > Axvoice Inc.
> > > www.axvoice.com <http://www.axvoice.com> <
> http://www.axvoice.com> <http://www.axvoice.com
> <http://www.axvoice.com>>
> > >
> >
> ------------------------------------------------------------------------
> >
> > >
> > > _______________________________________________
> > > --Bandwidth and Colocation Provided by
> http://www.api-digital.com--
> > >
> > > asterisk-users mailing list
> > > To UNSUBSCRIBE or update options visit:
> > > http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> >
> > _______________________________________________
> > --Bandwidth and Colocation Provided by
> http://www.api-digital.com--
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> <http://lists.digium.com/mailman/listinfo/asterisk-users>
> >
> >
> >
> >
> > --
> > Best Regards
> > Rizwan Hisham
> > Software Engineer
> > Axvoice Inc.
> > www.axvoice.com <http://www.axvoice.com> < http://www.axvoice.com>
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > --Bandwidth and Colocation Provided by http://www.api-digital.com--
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> > http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by
> http://www.api-digital.com-- <http://www.api-digital.com-->
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
>
> --
> Best Regards
> Rizwan Hisham
> Software Engineer
> Axvoice Inc.
> www.axvoice.com <http://www.axvoice.com>
> ------------------------------------------------------------------------
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list