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@hacklocalhost.com> http://www.hacklocalhost.com
Cees de Groot
2003-Nov-28 02:15 UTC
[Asterisk-Users] Re: Asterisk behind NAT << How to do it.
Leif Madsen <asterisk-users@lists.digium.com> said:>outside_addr=216.239.33.100 ; this can also be a FQDN! ie. > ; my.domain.com >Which might be a problem for dynamic environments, but still nice that someone implemented this patch. I'm sure going to take a look at it - we're currently happy with DIAX calling in to my NAT'ed * setup, but it would be handy to be able to use SIP as well - thanks! (that leaves me with two options - I noticed my Speedtouch 510 also supports SIP in its NAT stuff) -- Cees de Groot http://www.tric.nl <cg@tric.nl> tric, the new way helpdesk/ticketing software, VoIP/CTI, web applications, custom development
Darren McIntosh
2003-Nov-28 16:23 UTC
[Asterisk-Users] Re: Asterisk behind NAT << How to do it.
> Message: 9 > From: Leif Madsen <leif@hacklocalhost.com> > To: asterisk-users@lists.digium.com > Organization: http://www.hacklocalhost.com > Date: 27 Nov 2003 23:10:42 -0500 > Subject: [Asterisk-Users] Asterisk behind NAT << How to do it. > Reply-To: asterisk-users@lists.digium.com > > 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@hacklocalhost.com> > http://www.hacklocalhost.com >I can confirm this works for my NAT'd setup as well. Just one comment though that the inside_net variable is your internal subnet address not the asterisk server address. cheers, darren
Arnold Ligtvoet
2003-Dec-02 13:55 UTC
[Asterisk-Users] Asterisk behind NAT << How to do it.
> -----Original Message----- > From: asterisk-users-admin@lists.digium.com > [mailto:asterisk-users-admin@lists.digium.com]On Behalf Of Leif Madsen > Sent: vrijdag 28 november 2003 5:11 > To: asterisk-users@lists.digium.com > 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. >Hi Leif, I tried the patch. Installed it exactly as described per your email. Thought that you might be interested that it works for me as well. Like a charm, I can finally call FWD numbers like 10001 and 612 (speaking clock demo). BTW: For anybody wanting to install this, if your version of chan_sip.c is older than the one described, first use 'cvs update -C asterisk/channels/chan_sip.c'. Thanks, Arnold Ligtvoet.
Can the phone port on the x100p be an addressable extension on asterisk? I want to plug our conference phone into that phone jack as it is an analog phone. Todd Wallace
> -----Original Message----- > From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users- > admin@lists.digium.com] On Behalf Of Todd Wallace > Sent: Wednesday, December 03, 2003 4:12 PM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] phone port on the x100p > > Can the phone port on the x100p be an addressable extension onasterisk?> I > want to plug our conference phone into that phone jack as it is ananalog> phone. > > > Todd Wallace > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-usersIn a word.... No. You can use it to check the POTS line and not much else.
On Wed, 2003-12-03 at 15:34, William Waites wrote:> > > localnet= internal ip of * machine? > > localnet should be the internal network address not the internal > ip address. i.e. if your asterisk server is 192.168.0.245, localnet > should be 192.168.0.0Agreed, I was wrong before :) -- Leif Madsen <leif@hacklocalhost.com> http://www.hacklocalhost.com
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@hacklocalhost.com> To: <asterisk-users@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@hacklocalhost.com> > http://www.hacklocalhost.com > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users >
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@ipfone.com.br> To: <asterisk-users@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 thatpatch?:> >http://bugs.digium.com/file_download.php?file_id=430&type=bug> > thanks! > > Miklos > > > ----- Original Message ----- > From: "Leif Madsen" <leif@hacklocalhost.com> > To: <asterisk-users@lists.digium.com> > Sent: Friday, November 28, 2003 2:10 AM > Subject: [Asterisk-Users] Asterisk behind NAT << Howto do it.> > > > Thanks to ww and his patch on bug #104, I havesuccessfully implemented> > Asterisk behind NAT without using STUN or anythingcrazy. 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 withinthe next few days this> > will get put merged into CVS if no one finds anyproblems.> > > > I tried this on chan_sip.c version 1.249 (theversion 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 yourinternal Asterisk box.> > > > For your sip.conf, you need to add three lines: > > > > ; sip.conf snippet > > [general] > > port=5060 ; make sure youhave this line :)> > inside_net=192.168.1.100 ; this is theinternal ip address of> > the ; > > asterisk server > > inside_mask=255.255.255.0 ; internal ipmask. /24 as this example> > outside_addr=216.239.33.100 ; this can also bea 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 atleast 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 tocall a NAT'd Asterisk> > box, my Free World Dialup number is 18924.Currently online.> > > > -- > > Leif Madsen <leif@hacklocalhost.com> > > http://www.hacklocalhost.com > > _______________________________________________ > > Asterisk-Users mailing list > > Asterisk-Users@lists.digium.com > >http://lists.digium.com/mailman/listinfo/asterisk-users> > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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/
Craig Waddington
2003-Dec-27 04:43 UTC
[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@lists.digium.com [mailto:asterisk-users-admin@lists.digium.com] On Behalf Of Balaji NJL Sent: 27 December 2003 08:34 To: asterisk-users@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@ipfone.com.br> To: <asterisk-users@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 thatpatch?:> >http://bugs.digium.com/file_download.php?file_id=430&type=bug> > thanks! > > Miklos > > > ----- Original Message ----- > From: "Leif Madsen" <leif@hacklocalhost.com> > To: <asterisk-users@lists.digium.com> > Sent: Friday, November 28, 2003 2:10 AM > Subject: [Asterisk-Users] Asterisk behind NAT << Howto do it.> > > > Thanks to ww and his patch on bug #104, I havesuccessfully implemented> > Asterisk behind NAT without using STUN or anythingcrazy. 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 withinthe next few days this> > will get put merged into CVS if no one finds anyproblems.> > > > I tried this on chan_sip.c version 1.249 (theversion 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 yourinternal Asterisk box.> > > > For your sip.conf, you need to add three lines: > > > > ; sip.conf snippet > > [general] > > port=5060 ; make sure youhave this line :)> > inside_net=192.168.1.100 ; this is theinternal ip address of> > the ; > > asterisk server > > inside_mask=255.255.255.0 ; internal ipmask. /24 as this example> > outside_addr=216.239.33.100 ; this can also bea 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 atleast 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 tocall a NAT'd Asterisk> > box, my Free World Dialup number is 18924.Currently online.> > > > -- > > Leif Madsen <leif@hacklocalhost.com> > > http://www.hacklocalhost.com > > _______________________________________________ > > Asterisk-Users mailing list > > Asterisk-Users@lists.digium.com > >http://lists.digium.com/mailman/listinfo/asterisk-users> > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users
thats cool. i ll try that too. Whats ur * version. if thats the case what is this patch for. Is bug 104 already approved and in production. -B ----- Original Message ----- From: "Craig Waddington" <craig@xmbsystems.com> To: <asterisk-users@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 ofthe default 8000.> > Works great over the internet. Didn't need patchesor anything else.> > I hope that helps you. > > -C > > > www.ntfs.org > > > > > -----Original Message----- > From: asterisk-users-admin@lists.digium.com > [mailto:asterisk-users-admin@lists.digium.com] OnBehalf Of Balaji NJL> Sent: 27 December 2003 08:34 > To: asterisk-users@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@ipfone.com.br> > To: <asterisk-users@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@hacklocalhost.com> > > To: <asterisk-users@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 oranything> 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 surewithin> 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 alsobe> a FQDN! ie. > > > ; my.domain.com > > > ; ... plus whatever else you have in yoursip.conf> > > > > > Download the patch at: > > > >http://bugs.digium.com/file_download.php?file_id=430&type=bug> > > > > > Either update your Asterisk or verify you haveat> 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 wantto> call a NAT'd Asterisk > > > box, my Free World Dialup number is 18924. > Currently online. > > > > > > -- > > > Leif Madsen <leif@hacklocalhost.com> > > > http://www.hacklocalhost.com > > > _______________________________________________ > > > Asterisk-Users mailing list > > > Asterisk-Users@lists.digium.com > > > >http://lists.digium.com/mailman/listinfo/asterisk-users> > > > > _______________________________________________ > > Asterisk-Users mailing list > > Asterisk-Users@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@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users> > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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/
Hi All, i just applied this patch. i need to test whether its working. Can someone connect to my server and leave me a vm at extension 2000. Server : ojoobala.com Phone Extension : 2005 pwd : mytest auth: md5. pl leave a vm on extension 2000. thanks a lot, -B ----- Original Message ----- From: "listas iPfone" <listas@ipfone.com.br> To: <asterisk-users@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 thatpatch?:> >http://bugs.digium.com/file_download.php?file_id=430&type=bug> > thanks! > > Miklos > > > ----- Original Message ----- > From: "Leif Madsen" <leif@hacklocalhost.com> > To: <asterisk-users@lists.digium.com> > Sent: Friday, November 28, 2003 2:10 AM > Subject: [Asterisk-Users] Asterisk behind NAT << Howto do it.> > > > Thanks to ww and his patch on bug #104, I havesuccessfully implemented> > Asterisk behind NAT without using STUN or anythingcrazy. 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 withinthe next few days this> > will get put merged into CVS if no one finds anyproblems.> > > > I tried this on chan_sip.c version 1.249 (theversion 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 yourinternal Asterisk box.> > > > For your sip.conf, you need to add three lines: > > > > ; sip.conf snippet > > [general] > > port=5060 ; make sure youhave this line :)> > inside_net=192.168.1.100 ; this is theinternal ip address of> > the ; > > asterisk server > > inside_mask=255.255.255.0 ; internal ipmask. /24 as this example> > outside_addr=216.239.33.100 ; this can also bea 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 atleast 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 tocall a NAT'd Asterisk> > box, my Free World Dialup number is 18924.Currently online.> > > > -- > > Leif Madsen <leif@hacklocalhost.com> > > http://www.hacklocalhost.com > > _______________________________________________ > > Asterisk-Users mailing list > > Asterisk-Users@lists.digium.com > >http://lists.digium.com/mailman/listinfo/asterisk-users> > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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/
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@xmbsystems.com> To: <asterisk-users@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 ofthe default 8000.> > Works great over the internet. Didn't need patchesor anything else.> > I hope that helps you. > > -C > > > www.ntfs.org > > > > > -----Original Message----- > From: asterisk-users-admin@lists.digium.com > [mailto:asterisk-users-admin@lists.digium.com] OnBehalf Of Balaji NJL> Sent: 27 December 2003 08:34 > To: asterisk-users@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@ipfone.com.br> > To: <asterisk-users@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@hacklocalhost.com> > > To: <asterisk-users@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 oranything> 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 surewithin> 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 alsobe> a FQDN! ie. > > > ; my.domain.com > > > ; ... plus whatever else you have in yoursip.conf> > > > > > Download the patch at: > > > >http://bugs.digium.com/file_download.php?file_id=430&type=bug> > > > > > Either update your Asterisk or verify you haveat> 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 wantto> call a NAT'd Asterisk > > > box, my Free World Dialup number is 18924. > Currently online. > > > > > > -- > > > Leif Madsen <leif@hacklocalhost.com> > > > http://www.hacklocalhost.com > > > _______________________________________________ > > > Asterisk-Users mailing list > > > Asterisk-Users@lists.digium.com > > > >http://lists.digium.com/mailman/listinfo/asterisk-users> > > > > _______________________________________________ > > Asterisk-Users mailing list > > Asterisk-Users@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@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users> > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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/
Craig Waddington
2004-Jan-11 05:05 UTC
[Asterisk-Users] Asterisk behind NAT << How to do it.
Balaji. I just left rtf.conf at default. Though I guess it wouldn't hurt to change it to test. Does it currently work for you with the settings I provided? Craig. www.ntfs.org -----Original Message----- From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users-admin@lists.digium.com] On Behalf Of Balaji NJL Sent: 11 January 2004 10:35 To: asterisk-users@lists.digium.com Subject: Re: [Asterisk-Users] Asterisk behind NAT << How to do it. 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@xmbsystems.com> To: <asterisk-users@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 ofthe default 8000.> > Works great over the internet. Didn't need patchesor anything else.> > I hope that helps you. > > -C > > > www.ntfs.org > > > > > -----Original Message----- > From: asterisk-users-admin@lists.digium.com > [mailto:asterisk-users-admin@lists.digium.com] OnBehalf Of Balaji NJL> Sent: 27 December 2003 08:34 > To: asterisk-users@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@ipfone.com.br> > To: <asterisk-users@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@hacklocalhost.com> > > To: <asterisk-users@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 oranything> 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 surewithin> 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 alsobe> a FQDN! ie. > > > ; my.domain.com > > > ; ... plus whatever else you have in yoursip.conf> > > > > > Download the patch at: > > > >http://bugs.digium.com/file_download.php?file_id=430&type=bug> > > > > > Either update your Asterisk or verify you haveat> 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 wantto> call a NAT'd Asterisk > > > box, my Free World Dialup number is 18924. > Currently online. > > > > > > -- > > > Leif Madsen <leif@hacklocalhost.com> > > > http://www.hacklocalhost.com > > > _______________________________________________ > > > Asterisk-Users mailing list > > > Asterisk-Users@lists.digium.com > > > >http://lists.digium.com/mailman/listinfo/asterisk-users> > > > > _______________________________________________ > > Asterisk-Users mailing list > > Asterisk-Users@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@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users> > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Reasonably Related Threads
- Re: Asterisk behind NAT << How to do it. (Leif Madsen)
- Help with questions for initial Asterisk wizard (GUI)
- MP3s in /var/lib/asterisk/mohmp3 causes Asterisk crash
- Does externalip= do anything to help with SIP behind a Linux based NAT router?
- OT: Document Control System?