[Asterisk-Users] Asterisk behind NAT << How to do it.

Balaji NJL bajjeen at yahoo.com
Sun Jan 11 03:34:35 MST 2004


i like the idea of not requiring to open 10000 ports
in the firewall.

Do i need to change rtf.conf to from 10000 - 20000 to
16384 and 16394.

thanks,
-B 
----- Original Message ----- 
From: "Craig Waddington" <craig at xmbsystems.com>
To: <asterisk-users at lists.digium.com>
Sent: Saturday, December 27, 2003 3:43 AM
Subject: RE: [Asterisk-Users] Asterisk behind NAT <<
How to do it.


> Hi
> 
> I have SIP working on NAT using X-lite phones. 
> 
> On my Cisco 827H ADSL router I forwarded ports 5060,
16394, 16384 to my
> * (10.1.0.0).
> 
> 16394,16384 being RTP.
> 
> In X-lite set the RTP port to use 16394 instead of
the default 8000.
> 
> Works great over the internet. Didn't need patches
or anything else.
> 
> I hope that helps you.
> 
> -C
> 
> 
> www.ntfs.org
> 
> 
> 
> 
> -----Original Message-----
> From: asterisk-users-admin at lists.digium.com
> [mailto:asterisk-users-admin at lists.digium.com] On
Behalf Of Balaji NJL
> Sent: 27 December 2003 08:34
> To: asterisk-users at lists.digium.com
> Subject: Re: [Asterisk-Users] Asterisk behind NAT <<
How to do it.
> 
> Hi All,
> 
> i tried to apply this patch and i got the following
> error. The chan_sip.c
> version i hv is 1.265
> 
> hv any one tried this patch on this latest chan_sip
> version.
> 
> thanks,
> -B
> 
> chan_sip.o: In function `load_module':
> chan_sip.o(.text+0x15ebf): undefined reference to
> `ast_rtp_proto_register'
> chan_sip.o(.text+0x15ee0): undefined reference to
> `ast_register_application'
> chan_sip.o: In function `delete_users':
> chan_sip.o(.text+0x15fc1): undefined reference to
> `ast_free_ha'
> chan_sip.o(.text+0x1604d): undefined reference to
> `ast_sched_del'
> chan_sip.o: In function `prune_peers':
> chan_sip.o(.text+0x16167): undefined reference to
> `ast_sched_del'
> chan_sip.o(.text+0x1618d): undefined reference to
> `ast_sched_del'
> chan_sip.o: In function `unload_module':
> chan_sip.o(.text+0x162bd): undefined reference to
> `ast_channel_unregister'
> chan_sip.o(.text+0x162ce): undefined reference to
> `ast_unregister_application'
> chan_sip.o(.text+0x16337): undefined reference to
> `ast_softhangup'
> chan_sip.o(.text+0x1636c): undefined reference to
> `ast_log'
> chan_sip.o(.text+0x163ab): undefined reference to
> `pthread_cancel'
> chan_sip.o(.text+0x163be): undefined reference to
> `pthread_kill'
> chan_sip.o(.text+0x163d1): undefined reference to
> `pthread_join'
> chan_sip.o(.text+0x16418): undefined reference to
> `ast_log'
> chan_sip.o(.text+0x164b8): undefined reference to
> `ast_log'
> collect2: ld returned 1 exit status
> make: *** [chan_sip.so] Error 1
> 
> ----- Original Message ----- 
> From: "listas iPfone" <listas at ipfone.com.br>
> To: <asterisk-users at lists.digium.com>
> Sent: Tuesday, December 09, 2003 2:10 AM
> Subject: Re: [Asterisk-Users] Asterisk behind NAT <<
> How to do it.
> 
> 
> > Hi
> >
> > The version 1.260 of chan_sip.c already have that
> patch?:
> >
> >
>
http://bugs.digium.com/file_download.php?file_id=430&type=bug
> >
> > thanks!
> >
> > Miklos
> >
> >
> > ----- Original Message ----- 
> > From: "Leif Madsen" <leif at hacklocalhost.com>
> > To: <asterisk-users at lists.digium.com>
> > Sent: Friday, November 28, 2003 2:10 AM
> > Subject: [Asterisk-Users] Asterisk behind NAT <<
How
> to do it.
> >
> >
> > > Thanks to ww and his patch on bug #104, I have
> successfully implemented
> > > Asterisk behind NAT without using STUN or
anything
> crazy.  It's quite
> > > straight forward.
> > >
> > > Until this gets tested enough and put into CVS,
> you will have to patch
> > > your chan_sip.c file to do this.  I'm sure
within
> the next few days this
> > > will get put merged into CVS if no one finds any
> problems.
> > >
> > > I tried this on chan_sip.c version 1.249 (the
> version the patch was
> > > written for) and the latest as of today 1.258. 
> Both work great.
> > >
> > > Open ports 5060 and your RTP range (found in
> /etc/asterisk/rtp.conf).
> > > Default is 10000 -> 20000
> > >
> > > Forward ports 5060 and your RTP range to your
> internal Asterisk box.
> > >
> > > For your sip.conf, you need to add three lines:
> > >
> > > ; sip.conf snippet
> > > [general]
> > > port=5060                       ; make sure you
> have this line :)
> > > inside_net=192.168.1.100        ; this is the
> internal ip address of
> > > the                                ;
> > > asterisk server
> > > inside_mask=255.255.255.0       ; internal ip
> mask.  /24 as this example
> > > outside_addr=216.239.33.100     ; this can also
be
> a FQDN! ie.
> > >                                 ; my.domain.com
> > > ; ... plus whatever else you have in your
sip.conf
> > >
> > > Download the patch at:
> > >
>
http://bugs.digium.com/file_download.php?file_id=430&type=bug
> > >
> > > Either update your Asterisk or verify you have
at
> least version 1.249 of
> > > chan_sip.c:
> > >
> > > cd /usr/src/asterisk/channels/
> > > cvs status chan_sip.c
> > >
> > >
>
===================================================================
> > > File: chan_sip.c        Status: Locally Modified
> > >
> > >    Working revision:    1.258
> > >    Repository revision: 1.258
> > > /usr/cvsroot/asterisk/channels/chan_sip.c,v
> > >
> > > While in pwd /usr/src/asterisk/channels/
> > > patch -p0 < /path/to/patch
> > >
> > > Nothing should fail.
> > >
> > > cd /usr/src/asterisk/
> > > make
> > > cp /usr/src/asterisk/channels/chan_sip.so
> /usr/lib/asterisk/modules/
> > >
> > > Restart your Asterisk and try it.  If you want
to
> call a NAT'd Asterisk
> > > box, my Free World Dialup number is 18924. 
> Currently online.
> > >
> > > -- 
> > > Leif Madsen <leif at hacklocalhost.com>
> > > http://www.hacklocalhost.com
> > > _______________________________________________
> > > 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
> 
> 
> __________________________________
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/
> _______________________________________________
> 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

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/



More information about the asterisk-users mailing list