SIP-NAT issues (was: RE: [Asterisk-Users] Free World Dialup behind NAT)

Dan dtoma at fx.ro
Sun May 25 02:22:47 MST 2003


Hi.

How can this work behind a NAT router???
In order to use a SIP UA behind a NAT with FWD, you have ONLY 2 options:
- forward required ports through NAT and use standard setup for the UA with
fwd.pulver.com:5060 as proxy. then there is no need for special section in
sip.conf. Just use a line like:
register => 21250:mypassword at fwd.pulver.com/399  ..then 399 extension ring
when someoane calls you at 21250.
- do not forward anything and use as outbound proxy fwdnat.pulver.com:5082

How can you specify in sip.conf an outbound proxy for SIP??

BR,
Dan
----- Original Message ----- 
From: "Jamie Carl" <me at jazz-inc.net>
To: <asterisk-users at lists.digium.com>
Sent: Sunday, May 25, 2003 10:20 AM
Subject: RE: SIP-NAT issues (was: RE: [Asterisk-Users] Free World Dialup
behind NAT)


> *This message was transferred with a trial version of CommuniGate(tm) Pro*
> sip.conf for this is as follows:
>
> [fwd1]
> reinvite=no
> canreinvite=no
> nat=yes
> type=friend
> secret=dunk13
> username=33537
> host=fwd.pulver.com
> ;host=192.246.69.247
> context=inbound
>
> If i have 'canreinvite' omitted or yes, call setup doesn't work at all.
>
>
> Regards,
>
> Jamie Carl
> Email: me at jazz-inc.net
> PH: +61-414-365-466
>
> -----Original Message-----
> From: William Walsh [mailto:william at wxw.org]
> Sent: Sunday, 25 May 2003 4:59 PM
> To: asterisk-users at lists.digium.com
> Subject: Re: SIP-NAT issues (was: RE: [Asterisk-Users] Free World Dialup
> behind NAT)
>
>
> *This message was transferred with a trial version of CommuniGate(tm)
> Pro*
>
> In your sip client context in sip.conf, do you have:
> canreinvite=no
>
> If not, add it, and try again.
>
>
> On Sat, 2003-05-24 at 22:28, Jamie Carl wrote:
> > *This message was transferred with a trial version of CommuniGate(tm)
> Pro*
> > I've been trying this too.  I've had a look at the SIP packets and the
> > SDP section gives the internal IP address for RTP destination.
> >
> > INVITE sip:10001 at fwd.pulver.com SIP/2.0
> > Via: SIP/2.0/UDP 10.50.1.2:5060;branch=z9hG4bK47758f0a
> > From: "asterisk" <sip:asterisk at 10.50.1.2>;tag=as6f148dbb
> > To: <sip:10001 at fwd.pulver.com>
> > Contact: <sip:asterisk at 10.50.1.2>
> > Call-ID: 671df30d248a69495aaa784f64aa6fc3 at 10.50.1.2
> > CSeq: 102 INVITE
> > User-Agent: Asterisk PBX
> > Content-Type: application/sdp
> > Content-Length: 183
> >
> > v=0
> > o=root 10741 10741 IN IP4 10.50.1.2
> > s=session                 ^^^^^^^^^
> > c=IN IP4 10.50.1.2
> >          ^^^^^^^^^^  <--  Here's the problem
> > t=0 0
> > m=audio 11296 RTP/AVP 0 101
> > a=rtpmap:0 PCMU/8000
> > a=rtpmap:101 telephone-event/8000
> > a=fmtp:101 0-16
> >
> > So call setup works, but the remote endpoint is sending the RTP stream
> > to the wrong address.  Is there any way around this??
> >
> > I have "nat=yes" in my sip.conf file, but there seems to be NO public
> > information in this header at all.  So i'm thinking, what does
> "nat=yes"
> > actually do?
> >
> >
> > Regards,
> >
> > Jamie Carl
> > Email: me at jazz-inc.net
> > PH: +61-414-365-466
> >
> > -----Original Message-----
> > From: Shaun Ewing [mailto:shaun at ewing.dropbear.id.au]
> > Sent: Sunday, 25 May 2003 2:07 PM
> > To: asterisk-users at lists.digium.com
> > Subject: Re: [Asterisk-Users] Free World Dialup behind NAT
> >
> >
> > *This message was transferred with a trial version of CommuniGate(tm)
> > Pro*
> >
> > ----- Original Message -----
> > From: "Oliver Brandt" <oliver_mlisten at gmx.de>
> >
> > <SNIP>
> >
> > > Anyway, I set up an acount and as long as my * box dials into the
> > > internet itself it works fine. But as soon as I try to connect from
> > > behind the NAT I can't here the other person (he can here me
> though).
> > >
> > > My setup:
> > > ATA -> * -> NAT -> Freeworld -> other person
> >
> > I had the same problem.
> >
> > I tried everything I could think of (forwarding ports, etc) with no
> > luck.
> >
> > It seemed (by looking at sip debug) that Asterisk was including its
> > internal
> > IP address in the outgoing headers. My guess is that the udp reply
> > packets
> > are being sent to that internal address - but as the person isn't on
> > your
> > network they're going into a black hole.
> >
> > The only way I could solve it was by using one of my public IP
> addresses
> > (my
> > ISP gives up to 4).
> >
> > Previously my config was similar to yours, but now it is:
> >
> > Softphone -> * -> FWD -> other person
> >                  -> * -> LAN (other phones).
> >
> > Once I had the * box on the public Internet and not behind NAT it
> worked
> > perfectly.
> >
> > It would be interesting to see if there is a way to get around this
> > without
> > having an IP - I'm not too keen on having this box on the public
> > Internet;
> > I'd feel much more secure with it behind the firewall.
> >
> > --Shaun
> >
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> >
> >
> >
> > _______________________________________________
> > Asterisk-Users mailing list
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
> -- 
> William Walsh <william at wxw.org>
> Jabber: william at wxw.biz
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>





More information about the asterisk-users mailing list