Archive for the 'NAT traversal' Category

PJSIP 1.8.10 released with SIP outbound support

PJSIP 1.8.10 is released! As we’re currently busy with other development (namely, video for the upcoming 2.0; more on that later), we didn’t plan to put new features into this release indeed.

But still one new feature is worth mentioning. During our SIPit27 visit, we discovered that there are three proxy implementations that support SIP outbound extension (RFC 5626). We’ve always wanted to implement SIP outbound, because it’s very useful for NAT traversal, and the lack of support in the server side was the only thing that held us back. So this convinced us to write the extension on site, in time for successful participation in SIP outbound multiparty test on the event.

So that is the highlight of this release, namely SIP outbound support and one week worth of heavy QA at SIPit 27. Enjoy!

PJNATH ICE Heap Memory Usage Analyzed and Optimized

A new article was posted in PJSIP wiki: PJNATH ICE Heap Usage Analysis and Optimization, that shows how to optimize ICE heap memory usage, from around 76 KB of peak heap usage per call (or 25 KB after the call settles down), down to just 21 KB of peak heap usage per call (or 15 KB after the call settles down). And this was with STUN, ICE, and TURN enabled.

Version 1.3 is released with support for ICE regular nomination

Version 1.3 is out (finally!). No major feature was planned for this release, however there are few useful enhancements such as support for ICE regular nomination, SIP transport automatically switch to TCP when request is too large, and periodic 1 minute retransmission of provisional responses to prevent dialog from being destroyed by proxies, as well as many bug fixes.

Version 1.0.3 is also out, which contains bug fixes from both 1.2 and 1.3.

Get it while it’s hot from http://www.pjsip.org/download.htm

Version 1.2 with support for Siren codecs

Version 1.2 has been released, among other things it contains:

  • G.722.1(C) aka Siren7 and Siren14 codecs
  • support for building Windows Mobile targets with Visual Studio 2005 (no more upgrading from embedded Visual C++)
  • updated PJNATH for the latest STUN RFC and TURN draft.

0.7.0-rc2 is available

This is a major development since 0.5.10 series, with the new PJNATH library to support ICE, support for Symbian platform, and new third party libraries arrangement.

Please find the tarball and more info in the Download Page.

Open source SIP stack, media, STUN, and ICE for Symbian OS

Just yesterday I finished back porting the Symbian branch to the trunk, and I think it’s good to go.

It’s been a roller-coaster way, supporting Symbian. It’s not the most developer friendly OS to port your programs to (see Readers Write about Symbian, OS X, and the iPhone), but we knew that, and I felt that this should make a good challenge for PJLIB, to see if it lives to its extreme portability claim. So we first started the port on May 2006, created a Symbian branch based on 0.5.5.6, and estimated that the work will need couple of months work. It wasn’t long before we realized we needed more time, and we revised the target to September 2006. But we still missed the target anyway.

Only about two months later, on Nov 2006, where we really had all of the libraries ported (only sound device is missing). But by this time, this branch was lagging waay behind the trunk, so it will take significant efforts (and commitments) to bring the port into the trunk.

But finally we had gathered enough “motivations” to do this, few days back, and it’s here.

Symbian target is officially supported in the trunk. All libraries have been ported. All seems to be running fine. No more panics. No memory leaks. All is good to go. Sound device is still missing, unfortunately.

So what do we have for the Symbian port again? For those new to PJSIP projects, here’s all of them:

  • pjlib, our platform abstraction hero.
  • pjlib-util, an auxiliary library containing parts needed by upper layer libraries (things like text scanning, XML, DNS SRV resolution, and various encryption algorithm),
  • pjnath, a NAT helper library containing the latest STUN, TURN, and ICE,
  • pjmedia, the media stack,
  • pjsip, pjsip-ua, pjsip-simple, libraries containing the bunch of SIP features,
  • pjsua-lib, a library combining SIP, media, and DNS SRV/STUN/ICE into high level API, and
  • symbian_ua, a simple console based SIP user agent for Symbian, based on pjsua-lib.

Some screenshot? Sure:

SIP User Agent on Symbian Emulator

Screenshot of symbian_ua on S60 Emulator

It’s been fun programming on Symbian. Learning curve has been steep. The tools are not perfect. But now I think I’m relatively more comfortable with it, and it becomes just another target for coding.

For more information about using the Symbian port, please see Porting PJ to Symbian OS. The porting effort itself is tracked on this Symbian-Porting Trac page.

Have fun yourself!

The Lazy Product Manager’s Way to Release VoIP Products

If you are a product manager wondering how to get into the VoIP market quickly before it moves to Telecom 6.0 or so, Jimmy Atkinson has helpfully provided a comprehensive list of 74 Open Source VoIP Apps & Resources. It’s all nicely categorized, with more than adequate descriptions.

You can just feel the raise you are going to get because it is just made it so easy to assemble and launch your product. Your boss will be amazed at your in-depth knowledge. Your development team will worship you as the Open Source God.

And yes, pjsip is listed as no. 31, by the way, in the category of SIP Protocol Stacks and Libraries. Actually to be a bit pedantic pjmedia should appear as well under RTP Protocol Stacks. And maybe pjnath, the new library for firewall traversal using ICE, listed under Development Stacks. But I digress. Go ahead, with 74 choices like that, is there any other reason NOT to go open source?

Introducing pjnath – Open Source ICE, STUN, and TURN for NAT Traversal

During the past few weeks, I’ve been busy with implementing ICE (Interactive Connectivity Establishment, with the latest draft as of now is draft-ietf-mmusic-ice-15.txt), and I think now at least I have something that’s quite usable and stable to use.

There’s Something about ICE..

For those who are new to ICE, ICE is probably the most comprehensive method for traversing NAT, for multimedia communications. It provides a method to find the best route to use by both endpoints, and it solves various problems with NAT, such as when both endpoints are behind the same NAT box and no hairpin is available, and when both endpoints are behind symmetric NATs (which in this case, a relay will be used). Please see draft-ietf-mmusic-ice-15.txt for more information.

It’s one heck of a protocol though! First of all, ICE doesn’t run on itself, and instead it uses STUN protocol (Session Traversal Utilities for NAT, with the latest draft is draft-ietf-behave-rfc3489bis-06) for doing the connectivity checks. And for relaying, it uses TURN (Obtaining Relay Addresses from Simple Traversal Underneath NAT, with the latest draft is draft-ietf-behave-turn-03). Combined, they amount to 103+61+44=208 worth of pages of protocol specification to follow! I guess that’s probably why the “Simple” word was removed from the STUN acronym. 😉

Anyway, I think the timing is good to support these protocols now. ICE has just got WGLC-ed (Work Group Last Call) a week ago, and STUN draft is also maturing (TURN is a bit farther behind). In fact, the timing is perfect, as we can also contribute to finding bugs in the specs before they got RFC-ed (this is not to say that we’re expert in any kind!). Had we implemented these sooner, we would have been caught with the changes in the protocol, as many projects seem to have found themselves with.

PJNATH – NAT Traversal Helper Library

So here they are, PJNATH – Open Source NAT Traversal Helper supporting STUN, TURN, and ICE (clicking the link will get you to the documentation).

PJNATH is a new library within PJ projects, along side PJLIB, PJSIP, PJMEDIA, etc., and it consists of these:

In the future, maybe we can also put other NAT traversal methods such as UPnP or SOCKS in this library as well.

To accommodate ICE, PJMEDIA and PJSUA libraries have been updated too:

  • In PJMEDIA, we have a new media transport called pjmedia_ice_transport,
  • In PJSUA-LIB, the STUN settings have been moved from transport setting to global settings, and added option to enable ICE in the media settings.

And pjsua, the SIP UA console application, has been updated too. To enable ICE media transport, just add –use-ice in the command line argument, and pjsua will negotiate ICE in the offer/answer (it will fallback to normal media transport if ICE is not available in remote agent, of course).

So Does It Work?

Yes! (or, erm.. I think so!)

I’ve tried with running two pjsua’s behind the same NAT that doesn’t do hairpin, and the local address pair is used. And trying two pjsua’s behind different NATs, the public address pair is used. So it looks like it’s working!

More over, I’ve been testing it since last week, and quite few bugs have been found and fixed. And negotiation is pretty quick, around 100 ms with two endpoints on different ADSL line, even though the SDP answer was delayed in the proxy (ICE is able to start the checks early even when SDP answer hasn’t been received by caller).

But one of the major difficulties with testing ICE these days is practically there is no other freely available ICE implementation out there (I mean, ICE-14/15 compliant ones), so although ICE implementation in PJNATH does seem to work, and it follows ICE-15 closely, we couldn’t be sure that it is compliant until it talks with other implementation. So if any of you know one, please do let me know!


Interested to try them out?

PJNATH is part of 0.6 release and is not available in the stable branch (0.5.10). And unfortunately we haven’t released tarball for 0.6 yet, so for now just grab yourself a SVN client and pull the source from the trunk!