STUN Support for Asterisk

I’m putting my money where my mouth is and funding development of STUN support for the Asterisk open-source PBX. I’m not a regular contributor to Asterisk and I’m quite a bit outside the Asterisk inner-circle, so we’ll see if this code ever makes it back into the Asterisk CVS.

Karl Brose is writing the code and he is making good progress, although a recent hospital stay has caused a slight setback.

UPDATE: December 2004. I’ve lost touch with Karl and I simply have not had time to complete the work. I have a working snapshot of patches to an earlier CVS release of Asterisk. I have even been too busy to clean up and publish the patches. If anyone would be willing to volunteer to help, drop me an email at mrblog AT mrblog dot org.

13 comments for “STUN Support for Asterisk

  1. David,

    I offer a combination of "hooray" and "eh" to the effort. To the hooray side, I’m glad to see somebody taking this step as solid SIP support in Asterisk is a must.

    On the Eh side, I still see SIP as a great idea who’s time will never come. Too many extensions and patches have to be put into place in order for it to work in the real world. With all of the different RFCs adding, changing, etc. SIP looks like a Bill by the time it makes its way out of congress — hopelessly mired in pork.

    I hope to see you and Mark Spencer debate the issue (SIP vs. IAX2, etc.) at Astricon.


  2. Steve, thanks for the encouragement.

    I actually agree that the SIP RFCs read like tax code, but the fact is we have them. They’re there and that part is now done and it works well enough to build on and is very capable (far beyond Voice apps).

    It’s a little late to declare that the SIP dog won’t hunt. That cart has already left. Nearly every VoIP service introduced in the last 18-24 months is SIP based. There are now dozens of SIP-based services up and operational, and more coming every week it seems. Likewise, you can’t swing a dead cat without hitting a SIP enabled product or business plan.

    On the issue of debating with Mark Spencer, I look forward to that as well. However, I disagree with positioning SIP against IAX. I am not anti-IAX whereas it seems like most IAX supporters are very anti-SIP. I think there are places for IAX but not as a 100% replacement for SIP. I see IAX solving more specific, more scoped problems, perhaps within organizations, while I see SIP at the borders as the more global interoperable standard. I’m kind of surprised how so many IAX supporters are so vehemently opposed to SIP. Can’t we all just get along?

  3. I look forward to having STUN support in Asterisk, which should let me finally get rid of Bellsouth. Is there an update to the project? I have been looking around but have not been able to find anything newer than your announcement.

  4. Thanks for the link, Tom. I enjoy reading Internet Telephony Magazine.

    Emil, we are making progress on the project. One thing that is concerning me a bit is that adding STUN support for RTP required a significant redesign of Asterisk chan_sip and so at this point I’m very concerned about how we can merge back into the official/core Asterisk RCS. For now, it looks like it’s going to be a totally separate chan_sip, which I’m a little disappointed about. We hope to release a version for outside testing and evaluation within the next couple of weeks.

  5. I am surprised you say that there is a place for IAX within organisations while you place SIP at the borders.

    It would seem you got it precisely upside down because it is at the edge where IAX’ strengths are.

    The cost of supporting SIP through NAT is significant and it can be cut down to zero when using IAX to deliver VoIP to the edge.

    At present we are in the early-to-mid-90s equivalent of VoIP to the internet and mobile phone booms. Business is growing no matter what and cost doesn’t matter because you are still beating the cost models of conventional systems.

    However, the party cannot last forever. At some point the chicken will come home to roost and cost will matter once again. At that point businesses will be interested in anything that can do away with all the overheads SIP carries along as baggage.

    IAX is very well positioned to fill the spot and as the example of going from H.323 to SIP shows, the industry will let go of today’s favourite love child in a hearbeat for any new found love.

  6. David,

    Would you be willing to submit your Asterisk-STUN patches to It’s really a waste of time and efforts if the bitrot got to them. By putting them on at least there is a chance of other developers picking it up where Karl left off.


  7. I’m happy to publish the code whereever. The problem is I don’t have the time to do it. If you would be willing to volunteer to clean it up, or publish as is, I’ll send it to you.

  8. I’m very interested in seeing this code, since I’m trying to get exactly this scenario going. Problem is that my DSL gateway is not very SIP friendly, and STUN seems to be the only way to go for me. Is there any usable/testable code available somewhere?

  9. One workaround for ip-number problem is to use a dynamic dns service such as dyndns and point aterisk to this adress. I have a router that updates dyndns everytime the ip changes at boot time. (Netgear)

Comments are closed.