Company news

There’s been a lot of talk about the new SIP stack that is being worked on for Asterisk. The SIP stack is tightly connected to the RTP media subsystem and that’s a part of Asterisk I’ve spent a lot of time with lately. Here’s a few items I’ve been working on and hope to get into Asterisk 12:

Pinefool – Packet loss concealment and more

This branch improves audio handling. If configured  it adds packet loss concealment which improves recordings quite a lot
when there’s packet loss in the network. This is a very simple form of packet loss concealment, which I call the “Poor Man’s PLC”. If there is packet loss, Asterisk will just copy the previously received audio frame to conceal it. Asterisk already has a more advanced Packet Loss Concealment function, that’s hard to activate when you just forward packets in the RTP layer without any transcoding.

This patch also fixes some issues with packet reordering and loss. Previously Asterisk was masqing it, so two endpoints talking G.729 couldn’t fix the packet loss in their code. With Pinefool, Asterisk will keep the properties of the inbound stream on the outbound stream. A lost packet in the incoming stream will cause a lost packet in the outbound stream. Packets arriving out of order will still be out of order on the outbound stream, making it possible for the receiving end point, which in most cases has a jitter buffer with packet loss concealment, to sort out the mess and produce high-quality audio. I have to acknowledge a lot of help in brainstorms over a lot of chat sessions from Martin Festr Vit, the developer of

Benefit: Improved audio in lossy networks, better quality recordings

Pinefrog – Improved RTCP and call quality records (CQR)

The Pinefrog branch adds reporting of RTCP for streams that have it. By saving data about each call leg in database or outputting it on the manager port, a third-party application can monitor the health of SIP trunks and possibly calculate MOS score on calls. With an intelligent application, the data could also be used to disable trunks that doesn’t work as expected or select codecs based on network quality.

The CQR, Call Quality Records, are stored in any database supported by the ARA, Asterisk Realtime Architecture. This code has been in production in a large set of different sites, from carriers to call centers, for many years in the 1.4 branch.

Benefit: Being able to manage QoS and make automatic decisions based on this input in 3rd party apps

Pinequeue – background audio processing for queues

This patch implements a new audio backend for queues. Previously agents had to wait for a prompt to be played
for a caller in the queue before the phone gave a ring. With Pinequeue audio is handled in the background
and we will interrupt any prompts played as soon as an agent answers the call.

Benefit: No agents waiting to answer customers that in fact is waiting for a free agent.

Rana – Adjust the DTMF Duration and keep it under control

Fixes a lot of problems with DTMF passed through Asterisk. The duration wasn’t handled properly, which resulted in large differences between the incoming DTMF tone and the tone sent on the outbound call leg.

Benefit: 200 ms DTMF will not become 500 ms or even worse.

Roibus – Implements support of comfort noise (inbound only)

With this patch, Asterisk will negotiate and support comfort noise support on incoming media. Comfort noise goes hand in hand with silence suppression in a device. If a device recognizes silence, it stops sending audio frames and instead instructs the other end to generate replacement audio called “comfort noise”.

This patch is not yet complete. Asterisk will not send cng on the outbound stream yet. Regardless, the patch is already saving a lot of bandwidth and is a requirement for Microsoft Lync trunks too. Primarily it is a bandwidth saving issue. Previously Asterisk did not support it so for a 64 K codec we always send 64k plus over head. Coming work will add support for silence suppression in Asterisk, so that Asterisk can make a decision on whether to send actual audio or suppress it. This will add overhead in your Asterisk server, as a DSP will have to be applied to the audio stream to listen in for silence. In many cases this is worthwhile, as the bandwidth saving generates so many benefits.

Benefit: Some VoIP bandwidth calculation web sites estimates that full (two-way) silence suppression and CNG saves between 30-40% of the bandwidth for a call.

Current work: Implementing full DNS SRV-based failover and load balancing in Asterisk

Currently I’m working with improving the failover and load balancing when using DNS srv records. RFC 3263 describes how this should work in SIP. The Asterisk SIP stack has limited support – just grabbing the first alternative, not failing over. With the help of a set of dialplan functions, you can organize failover for the first INVITE in a call, but no failover during the call. This will have to be fixed.

The pinefrog, darjeeling, pinequeue, rana and roibus branches are in production in at least two large carriers and in some of our call centers. Pinefool is pretty new, we’re testing it in a few sites now. They are written for Asterisk 1.4 or Asterisk 1.8 with ports to many versions. Together with the Digium development team, I am working to make this code part of Asterisk 12.

The combination of pinefool, pinefrog, roibus and rana will improve your media handling vastly.

Check your bug tracker and sales records to see if you haven’t got requests for these kind of
features! If you have then download the branches from my subversion tree and try them out! 


PS. Every branch has a README file for the branch in the main directory. Don’t forget to read it. Thanks!

I’ve been working with SIP for over 10 years, and the starting point was the SIP Express Router by That server has evolved, the project has both forked and merged back and is now named Kamailio. It’s the SIP server I use for enhanced security, for load balancing, for scalability, for all kinds of fixes of broken SIP implementations and much more. This is also the focus of my SIP training classes.

kamailio-4-0Major Kamailio upgrade

Kamailio is soon about to release a major new release, with over 15 new modules, with extended support of IMS, with web sockets and much more. This is the first release where I have contributed actual code. Previously, I’ve focused on making sure that the documentation is covering everything, is readable and correct. For version 4.0, I have done the same, touched almost all module documentation files.

Lear more about Kamailio in a short presentation!

Here’s a quick introduction to Kamailio – the Open Source SIP server – and how it compares to an IP Pbx like Asterisk or FreeSwitch. :: Learn more about IPv6 every FridayI’ve started a separate blog to inspire people to learn more about IPv6 and start their own labs. It’s called and publishes a short article about IPv6 every Friday. I don’t know how the idea got started – I think it was just this Tweet that got a lot of responses.

IPv6 Friday beings

The main problem with IPv6: Knowledge and experience

The main problem with IPv6 today is the lack of knowledge and experience among all the network engineers and system developers out there. In Sweden, we have been running a few very open meetings about IPv6 to discuss and map what to do. Almost all discussions ends up with the question: How can we get companies to invest in IPv6 training on all levels? How do we get the technical people to start playing with IPv6? I don’t have the answer, but for myself, I’ve learned a lot by publishing these articles. Learning new stuff is always fun. As a parallel project, I’m moving a lot of my own servers and services to dual stack (or in some cases, single stack IPv6) servers. It takes time, I make mistakes and I discover a lot of issues in various pieces of software.

Follow me and spend 30 minutes on IPv6 every Friday!

Spend 30 minutes with IPv6 every Friday!Please join the ride, follow the flow and spend at least 30 minutes on IPv6 every Friday. Learn more, lab and join the discussion. In addition to the blog, there’s a Twitter account, Facebook page and a Google plus page. If you have ideas or want to contribute, just contact me.

IPv6 is the future of the Internet. It’s required for the Internet to grow. It’s required for the Internet to be for everyone on the planet. It’s needed for true peer-to-peer applications. We do need it to stop spending time on NAT traversal in SIP and focus on more important issues – like how SIP can become competitive to Skype and FaceTime and the architecture and requirements for a global open Internet-based federation for realtime communication. 30 minutes a week isn’t too much of your valuable time. It’s an investment for the future that will help both yourself in your personal career and the organization your work for. See you next Friday!


After each SIPit, Robert J Sparks writes a summary that includes the results of a survey done during SIPit and reports from the multiparty tests. These are all very interesting and show where the SIP developers are in relationship to the IETF work.

The SIPit26 summary shows  an uptake in SIP implementations that support TLS. It also reveals that we’re going to make the automated self-tests that has been created during SIPit available on line. We’ve created self-tests for TLS, Early media and IPv6. Hopefully there will be more tests added to this suite. Thanks to Nils Ohlmeier and Daniel Constatin Mierla for helping me with these!

The next SIPit is not determined yet – SIP forum is still looking for a host, primarily in Australia or New Zeeland. If you want  to know more about what it means to be a host, please don’t hesitate to contact me. SIPit test events are important for the whole business. Read the report and you’ll understand why.

In a surprising move, Digium in partnership with Edvina today released a new channel driver for Asterisk, chan_tweet. The driver connects seamlessly to several microblogging platforms, including Twitter, Facebook, and GSM text/SMS. The main feature of this new module is to add audio and video capabilities to microblogging, making the popular microblogging networks a new platform for VoIP and IP realtime communication.

– “I have seen that the microblogging solutions building on the social network infrastructure have had enourmous unexploited capabilities”, says Mill Biller at Digium, “I’ve used it for a long time both personally and for the company and we realized early that by adding IAX2 support, we could now take these platforms one giant leap forward by adding realtime multimedia. I can now spend evenings chit-chatting in audio and HD-resolution video with all my audience around the world instead of sending short text messages. It’s truly awsome!”

Digium contracted Edvina in Sweden, a well-known company in the Asterisk community and long-term Digium business partner, to build this solution. Edvina has many years of experience in building large-scale IAX2 networks, as well as doing development on the IAX2 support in Asterisk.

– “IAX2 recently was published in an IETF RFC and we’re pushing it heavily in all VoIP forums.” says Olle Johansson of Edvina, “We’re hoping that the IAX2FORUM will get a lot of new members that are willing to adopt this technology for their intranets, microblogging services and VoIP infrastructures. In the coming month, we will present more information about new partners with more than 100K users that are going to switch from old technologies, like Hype, SIP and H.323. All of these protocols failed, either because they where proprietary or simply became too complex. SIP currently has more than 5.000 pages of documents describing all the features of the protocol and there’s no single implementation of all of these to test with. Considering the protocol being over 10 years old, this is a sad story.”- “We’ve done our best to fix the Asterisk SIP channel support for customers, but the customer base has been shrinking as more and more converted their networks to IAX2 and now, there’s simply no one interested in us doing that work. We’ve stated over and over again that the SIP channel in Asterisk is broken and no one can prove us right or wrong, because the protocol is just too complex.”

The Microblogmedia platform

The Microblogmedia(TM) platform, developed by Digium and Edvina, let’s users use any microblogging network to set up multimedia sessions. By compressing an IAX2 call setup event in the microblog message, web browsers and clients will connect automatically peer-2-peer if possible, or through the MicroBlogMediaRelay network that supports seamless NAT and firewall traversal by using automatic IPv6 tunnels.Asterisk 1.6.3, released later this month, will support this feature in the IAX2, H.323 and maybe in the old SIP channel (that is now marked deprecated). There is work on adding this feature to ISDN calls, by using messages in the D-channel for tunneling the IAX2 call setup messages. Digium’s VoxSwitch will support this feature in the next release, planned for q3 2009.

Ending the Hype project

In the same press release, Sock Stevens, product manager at Digium finally acknowledged that the Hype channel driver that was launched at Astricon 2008 will not be released after all.

– “We found only one partner to test interoperability with, and that’s not enough to make sure the channel driver being compatible with the protocol. And the protocol wasn’t published in any RFC at all, or any other document. So we finally gave up. We’re now dedicating resources for the new chan_tweet project and enhancing presence support in our IAX2 solution. With the installed base of IAX2 and the new MicroBlogMedia platform, this will be an even more impressive solution, reaching millions of IAX2 users in the enterprise as well as public sector and homes.”

Technichal factoids

  • chan_tweet is the result of the project labelled “Codename orangepeel” amongst the development team and builds on the new “Pinemango” architecture. This is the first channel driver not connecting directly to the Asterisk core, but to the Pinemango API over Adversion, the Ruby framework developed by Phil Jaysip.
  • The MicroBlogMediaRelay IAX2 platform is an open distributed network that builds on IPv6 and a facebook application, thus using the enormous bandwidth provided for free by the Facebook(TM) platform
  • chan_tweet will be released with the core module in Open Source, but with a license exception for plugin developers to add proprietary modules, like the Wireless Village plugin provided by the 3GPP project and the Unistim Microblog Solution by Nertol Networks.

For more information, please do not contact Digium sales.

To be released: 2009-04-01