Archive for the 'Mobile VoIP' Category

PJSIP 0.9 is Released: Audio Latency, TURN implementation, IPv6, G.722, and More

Finally, after months of delay, PJSIP version 0.9.0 is released. This has been the longest gap (8 months) between releases, and consequently it has the most modifications in it (there have been 100+ tickets done on this release).

Some of the new features in this release:

  • many improvements in the audio, to reduce audio latency, to have better compatibility with more target platforms (Windows Vista issues have been fixed, as well as sporadic error reports for ALSA), and to maintain the audio quality against impairments such as clock drifts, bursty sound device, and of course, packet loss. Compared to version 0.8, I think we’ve improved audio latency by few hundred milliseconds.
  • support for TURN-07 in PJNATH, either as standalone client/server library, standalone client/server application (for testing purposes), or integrated with ICE-19. Just as we were the first to release open source ICE library, I think this is also the first open source TURN implementation out there. Unfortunately we haven’t had time to update it to TURN-08 as this draft was released late during our QA phase, but we’ll update it as soon as possible.
  • fixed the ICE offer/answer rules.
  • support for IPv6.
  • support for Secure RTP (SRTP)
  • better support for Windows Mobile target. We have new and more usable sample application (PocketPJ) and GSM and Speex codec should now be available for this target.
  • better support for Symbian S60 target. There is a more thorough Symbian tutorial available, and GSM and Speex codec should now be available for this target too.
  • implementation of G.722 codec.
  • support for RTCP Extended Report (XR)
  • and many more.

For more information, start from PJSIP download page. Get it while it’s hot!

Doing it in Stereo

While PJMEDIA have supported stereo audio since day one, it had come with few limitations, for example this capability was not exported in PJSUA-LIB API, and once stereo mode is set, everything must be set to stereo too. These have been fixed in the latest SVN now. There is a new configuration field in pjsua_media_config to set the number of channels configuration for both the sound device and the conference bridge (the default is one of course), and more importantly, the conference bridge can now allow media ports with different channel count setting to be registered to it.

As an example of the new capability, application can instantiate both the sound device and the bridge in stereo. If the call is established with a stereo codec (for stereo we only have L16 codec for now), then transmission will be stereo, and if the call is established with the usual mono codec (G.711, G.722, Speex, etc. And oh yes, we do have G.722 now!), then the bridge will correctly perform the stereo – mono conversion, mixing the audio channels as necessary.

Having said all that, you may ask, why? Why bother with stereo at all?

You’re right, stereo is uncommon in VoIP. But nowadays SIP is used in broader industries than just VoIP. For example, the European Broadcasting Union (EBU) is currently looking to standardize Audio Contribution over IP (N/ACIP) which is based on standard based protocols such as SIP and RTP, and stereo encoding comes as one of the mandatory requirements. Also on different industry, we’re currently looking to integrate PJSIP as a VoIP platform in Virtual World games, in the open source VoIP for Virtual World project. This project is still in its very early stage, as it’s been published literally just couple of weeks ago. Here I guess stereo will play quite an important role, because of the positional audio requirement. And still there are more use cases for stereo, for example in SIP to radio gateways where people do want to transmit different audio in the left and right channel. The last use case probably is niche, but people do ask for that.

So in conclusion, stereo does have a use case. And I’m glad that we have a pretty smooth support for that.

And how can we enable stereo in the application? Well just set pjsua_media_config.channel_count to 2, and that’s just about it! More advanced scenarios are possible of course, but at least it’s very easy to get started with it.

PJSIP on Symbian Phone Works

[pjsip] PJSIP on Symbian Phone Works!:

This announcement is a bit late than planned (I promised to finish the Symbian port before Jan 2008), but we thought we’d give this a more thorough testing before announcing it, hence the delay.

In summary, PJSIP works and tested on Symbian S60 3rd Ed phone. Everything should work, including all SIP features, sound, STUN, and ICE. And we’ve made a tutorial on how to build and debug PJSIP on target device.

There have been some major changes along the way:

  • Carbide is now the preferred IDE rather than CodeWarrior. This is because CW has been deprecated by Nokia anyway.
  • Support for DSO is no longer enabled by default. It’s still supported, but you’d have to edit the MMP files slightly to build DSO outputs.

So what’s left to be done is for someone to create a nice open source Symbian softphone GUI on top of it. 😉

For more info:

Making VoIP on Nintendo DS a reality: new open source SIP client available

SvSIP, a new VoIP client for Nintendo DS is making quite a stir! To name a few, Tom Keating, Engadget and Gizmodo also picked it up.

Congratulations are certainly in order for Samuel Vinson, for porting pjsip to Nintendo DS. I am going to try it out myself, as soon as I reconfigure my wi-fi back to WEP. (Update: Here’s my post on using pjsip on Nintendo DS)

And instead of a screen-shot, I’m going to give you one better: a complete video guide! (video created by therealbiglou) It demonstrates how to set it up, with final thoughts: “sound quality is very good”. The negatives include “low speaker volume” and “hard interface to follow”.

We’ll work with Samuel to tweak the volume The volume can now be controlled through a configuration setting, and regarding the interface… yeah I guess dumping a log file on screen is a million miles away from an iPhone! Oops I mentioned the i-word, I’m sure people will think it’s there for keyword stuffing.

But seriously, some comments on digg already saying it’s an “iPhone killer”. What do you think?

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, 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!

How to start embedded SIP development on Blackfin uClinux

In the process of porting pjsip to Blackfin, you will need an appropriate embedded development board, software tools, and development host.

Embedded development board

  • There’s some choice of development boards, but for simplicity I suggest using the STAMP boards with its audio card.
  • You will need:
    • BF537-STAMP (available at Digi-Key)
    • AD1836A Audio Daughter Board (available at Digi-Key)
      • Again for simplicity, just order both the board and audio card from Digi-Key, even though technically you can contact your local distributor for Analog Devices. Certainly for people living in USA, it’s a no-brainer. I tried several places listed in the local distributor for UK, none have stock and certainly the audio card was hard to find. So I ordered from Digi-Key anyway, it was shipped within 24 hours. But I made the mistake of choosing Global Express Mail, it’s slooow and in the UK handled by ParcelForce. Enough said.
      • Be aware of customs, taxes, and the cost of collecting such taxes. For the UK, HMRC demanded about £55, and ParcelForce added £13.50 collection fee.
    • A straight-thru serial cable that ends in DB9 (9-pin) male. 180px-9_pin_d-sub_connector_male_closeup.jpg The other end depends on the serial port you have on your development host PC, usually you will need a 9-pin female plug. So look for a straight-thru (not null modem) 9-pin male to 9-pin female. In the UK I can recommend CableStar. Clear and fair pricing with fast delivery.
    • A network patch cable:
      • If you connect your Blackfin STAMP board directly to your development PC then you need a cross-over cable. Here’s one example on CableStar.
      • If you connect the board to a hub, then just a normal patch cable.

Software tools

  • All related embedded development tools can be downloaded from Blackfin Linux.
  • You will need:
    • A set of compilers, linkers called the Toolchain.
    • uClinux distribution
    • U-boot bootloader
  • I will detail the experience of setting up the development host with the tools above in another post.
  • Since I use Windows, I will also need coLinux as a host.

Development host

  • PC running Windows with coLinux. The docs/forum seems to suggest there is a Windows port of the tools, but the releases pages of the tools seems to be Linux only.
  • Available serial port. Modern PCs does not have this, so you may have to buy a USB-to-Serial adapter/dongle. Any make will do, I bought mine from eBay.
  • Available Ethernet LAN port if you want to connect the development board directly to your PC, which I recommend as it makes things a bit easier.

That’s all for now. In the next post I will connect them altogether, and hopefully have a running system.

Until then, if you have any suggestions or questions, just leave a comment!

Can you help find a mobile WiFi chipset/SMT with GPL or open source drivers?

I’ve been tracking OpenMoko for a while and noticed this call for help for wifi support.

Readers of embedded SIP SDK like pjsip and pjmedia are usually clued up on sourcing issues like these, so maybe any one of you can help?

Maybe Matt can help as he knows everybody in the open source world!


Mobile SIP service on Symbian gets $24.5m

Recently Vecosys mentioned social mobile network trends in 2007. The mobile trend continues as Truphone announces £12.5 million of venture capital funding. Truphone is creating quite a buzz, with a favorable mention on GigaOM. They got national UK TV coverage as a result.

So is this the start of a good year for the SIP industry, to offset Skype’s (non-SIP) dominance on the desktop? Or do you think Truphone is just another VoIP provider doomed to struggle for real revenue as some people have commented of Vonage or Skype?

I welcome your comments!

UPDATE: Om Malik thinks the investment is laced with a dash of irrationality.