Edit: This post is now quite out of date. There’s a more recent discussion of this at the trixbox forums.
Original Post:
Despite digium’s screwed up licensing restrictions, and its diabolical coding standards (something which Callweaver will hopefully make a thing of the past, but that’s for another day), SIP over TCP support is now finally available in asterisk (at least for the 1.2 branch).
Brief instructions how to upgrade your 1.2.x installation are given below:
Download the source
cd /usr/src wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.2.24.tar.gz tar -zxf asterisk-1.2.24.tar.gz
Get and apply the patch
cd asterisk-1.2.24/channels wget -O asterisk-1.2.24-tcp-patch "http://bugs.digium.com/file_download.php?file_id=15742&type=bug&download" patch < asterisk-1.2.24-tcp-patch
ensure at this point that all of patch was applied correctly. If it wasn't, probably best to check the related bug report on digium for details. Next we build & install it
cd .. make asterisk -rx "stop gracefully" make install asterisk -vvvc
If everything works as it should, your asterisk should be up and running again, but this time with SIP over TCP support. You can check what ports/protocols asterisk is listening on using the command
netstat -l -p | grep asterisk
Next we add the following two lines to sip.conf (or sip_custom.conf if you're using freepbx)
tcpenable=yes transport=tcp
Do a
sip reload
on the asterisk console, and you should be good to go.
That's it. Configure your SIP clients to use TCP, or both TCP & UDP, depending on packet size (the auto setting on some clients), and start making calls. In particular this works with the nokia voip client (tested on E65 in both TCP & Auto modes).
Popularity: 98% [?]
#1 by Bricky - October 19th, 2007 at 23:04
Further info here: http://thread.gmane.org/gmane.comp.telephony.pbx.asterisk.devel/25816
#2 by Doug - November 24th, 2007 at 03:18
Hi,
I tried to upgrade the TCP support on my 1.2.24 Asterisk/Trixbox system. It seems like everything worked. But I am not Linux knowledgable.
When I tried to start Asterisk it just did not start.
I have a text file of the start of Asterisk and didn’t see anything obvious.
I was running in a VMware machine and had a backup. I also backed up the VM that has the TCP patch so I can start it to try and determine the problem.
Any help is appreciated.
I wish I was more helpful in identifying the problem. If you could tell me what to try or do to get any information for you, let me know.
Can you help?
Doug
#3 by Bricky - November 24th, 2007 at 04:20
I’m not very familiar with trixbox Doug, but I’ll give whatever help I can
First things first: What’s the output of
And did the patch run successfully? (any warnings or errors?)
#4 by EricP56 - February 20th, 2008 at 05:39
I tried this, and TCP is loaded by Asterisk. That’s great. But when I add transport=tcp in the PEER settings for a trunk, the trunk stops working. Anybody else run into this?
#5 by Syed - August 12th, 2008 at 15:37
I’m using Asterisk 1.4.xx, will this patch work with newer version?
#6 by Bricky - September 9th, 2008 at 23:47
No, this is a patch for the 1.2 branch only. There is a patch for the 1.4 branch though, have a look here.
It’s probably worth mentioning that the (beta) 1.6 branch now has a completely re-written sip stack, with (somewhat buggy) tcp support too.
Note: anyone looking for production-quality sip tcp support is probably better off to stay away from asterisk altogether. Preferable alternatives are openser and freeswitch.