Do SIP trunks give good audio quality?

SIP Audio QualityWe’ve started doing regular google+ hangouts with our reseller community and one of our partners dropped in yesterday to give me a grilling on our recommendations over SIP vs ISDN trunks.

His question went something like this “My colleague has just been on one of your training courses and he came away with the impression that we should be using ISDN rather than SIP trunks over broadband if we care about call quality. Is this true?

Like all complex questions, the answer to this is a definite “maybe” so needs a bit of explanation.

Lets deal with call quality first…

Depending on the codec used, SIP trunks can deliver the same, or better inherent call quality (audio bandwidth) than ISDN. The actual call quality will only be as good as the network that the call is delivered over. The end to end underlying network needs a 0% packet loss at all times and low jitter. If either of these conditions are not satisfied then audio breakup and/or quality degradation will occur.

Some folks have other ideas on this and I’ve often heard figures like 1% or less packet loss quoted for good quality audio but this is demonstrable nonsense. SIP connections chop the analogue audio stream up into typically 20 millisecond segments and put each of these into its own packet – that’s 50 packets per second. If you have a 0.5% packet loss rate then one of these samples will be lost every 4 seconds which means there will be an audio drop out or blip 15 times a minute at half the oft quoted 1% max packet drop rate. Is that good enough for your customers? (it certainly isn’t for mine). I can just about see how less than a 0.1% packet loss rate could be seen as acceptable, that’s one blip every 20 seconds or three a minute but that is still nowhere near “ISDN quality”.

So do broadband circuits deliver these kinds of characteristics? The shortest answer I can come up with for this is “sometimes”.

The longer answer needs a bit of an explanation about the technology. ADSL broadband was invented to provide cheap download connectivity that was able to leverage existing variable quality telephone lines using as much of the interference free spectrum as is available on an individual line. That’s why the bit rate that you get on a particular line usually varies from the maximum. Most other link technologies say “provided the connection path has these electrical characteristics, the link will work reliably”, ADSL says “the protocol used adapts to the line, trading off speed against reliability on a dynamic basis to give the best download speed available with acceptable reliability”.

This is all great for us as consumers, it means that we can get fantastic broadband speeds for web-browsing and downloading without paying loads of money to have expensive fibre installed to our premisses. Because this has created a mass-market, Broadband circuits only cost a few pounds a month and everybody is happy.

Which brings on the next part of the problem. If an exchange has 50,000 broadband subscribers and they each have a 20Mbit/s broadband then in theory a terabit of Internet download connectivity would be required to guarantee to meet demand. This would be uneconomic and largely unnecessary so providers of consumer broadband don’t work this way. In reality, Internet televised football matches excepted, not all of the subscribers will be using all of their bandwidth at the same time so contention is used to reduce the backhaul cost between the exchange and the rest of the Internet. This means only putting in enough bandwidth from the exchange for a certain percentage of all connections to be used at the same time and sharing this bandwidth out so that at busy times packets are dropped to slow all of the connections down a bit. Most of the time that is OK as nothing like full bandwidth is in use on all connections simultaneously, but that is why even if you have a 20Mbit/s connection you get nothing like that download rate at 8pm on a Friday evening. When everyone else starts using their Internet heavily, some percentage of all packets, including yours, are being dropped to throttle back your connection on a contended service.

If you need 0% packet loss for VoIP then contended network connections are a problem as these can semi-randomly generate packet loss dependent on factors such as time of day and other users on the same exchange.

It is possible to purchase uncontended xDSL connections (usually SDSL), but because these are more expensive to provide and also have a much smaller market these are generally much more expensive. You do however need an uncontended connection if you want to guarantee SIP audio quality.

Next, what about reliability…

We’ve already discussed how rate adaptive (ADSL & VDSL) link layers use the available interference free spectrum on a circuit and adapt to provide the best available bandwidth on a link.

Unfortunately line characteristics do change over time and factors such as slight degradation of connection points, humidity and temperature changes, the number and kinds of other broadband service being provided on pairs in the same bundle and electrical interference can all impact on the fragile broadband signal on an individual pair. This is fine as in general error detection and correction will kick in to repair packets and eventually dynamically reduce the data rate on the line to avoid the frequencies where problems are being experienced. More profound changes in the line quality particularly corrosion in splice points and repeated random electrical interference can have a more dramatic effect and cause frequent line drops or a radical reduction in data rate. These are particularly difficult for the line provider to diagnose as the line will often have acceptable DC and audio frequency characteristics even when failing in this way such that is passes standard line tests. In order to defend against huge numbers of expensive maintenance investigations for “my broadband is going slowly” on what is basically a low cost consumer product, the bar is set quite high in terms of the level of line degradation that is considered to be a fault, and the time to investigate SLA on consumer broadband circuits is several days because of the difficulty in resolving these complex issues on low cost of the circuits.

More expensive business grade circuits with a fixed data rate and line characteristics which are specified so that a line is clearly either in-spec for the data rate or faulty do exist and indeed it is possible to purchase a better fault response SLA on these lines. As above these circuits are more expensive than commodity consumer or business broadband.

Summary…

Broadband can be reliable enough to run SIP trunks or remote handsets with the same or better call quality and nearly as good a reliability as ISDN, but these need to be premium uncontended circuits with an enhanced fault package.

You can run trunks or hosted telephony over consumer grade broadband, but the results will be variable. For 95% plus of the time the quality will be fine on most circuits but depending on the circuit, local exchange and a range of other factors outside your control there will be times when the call quality isn’t “ISDN grade”.

What do I do? My home broadband is on a BT 20C Network exchange so the range of cost effective DSL options is limited to contended 8Mb/s BT Wholesale offerings from whichever retail provider I use for my broadband. I have a remote SIP phone on my desk for when I work from home and, whilst this will never give me business grade call quality in this environment, it is great for internal communication. I wouldn’t put an entire small business on SIP in this kind of environment though as it could never deliver guaranteed call quality.

At my office we have both a 100Mbit fibre Ethernet bearer with appropriate QoS in both directions and an ISDN30. We use them interchangeably for voice as they both give approximately the same call quality and nearly the same reliability. I can easily envisage a day when we would drop the ISDN30 provided we had a second similarly reliable diverse data connection, as SIP gives us the same quality with greater flexibility in this environment.

So what is your experience with SIP over xDSL, am I being too much of technical purist or does this line up with what you see in real life? I’d love to hear more data points from folks who are delivering reliable SIP services over ADSL with more info about the environments where you feel that this works as well as ISDN.

About Rob Pickering

Rob is a reformed software engineer who has spent much of his life developing computer networking applications and infrastructure. His career started in the 1980s with hands on development of the Internet TCP/IP protocol stack through a spell as a development manager at 3Com in the 1990s before founding ipcortex where he is currently our CEO.
This entry was posted in technical and tagged , , , , . Bookmark the permalink.

2 Responses to Do SIP trunks give good audio quality?

  1. Hi Rob,

    Found the article on “Do SIP Trunks give good audio quality” very interesting and informative.
    Could you elaborate on the effect of packet loss on the call set up process and the effect of the jitter on SIP trunks.

  2. Rob says:

    Hi Miguel,
    I took a while to spot this comment on this post (it’s quite an old one) anyway, to your two questions:

    1) Effect of packet loss on the call setup process – SIP has retry timers which ensure that a lost transaction is retried multiple times on an exponential backoff. Occasionally this may be observable as a slight (100s of milliseconds range) delay to a transaction whilst a retry timer expires and a packet is resent but any packet loss that is enough to cause really noticeable problems in this process would render the audio stream entirely unusable! SIP signalling problems would be the least of your issues. The only time that you may have an issue with signalling but not audio is if you are using a traffic prioritisation scheme on a congested network that gives good characteristics to the RTP audio stream but lossy call control on SIP.

    2) The effect of jitter depends on the level of jitter buffer deployed at both ends of the link and whether this is adaptive. Basically a packet that arrives too late to be useable or out of order (jitter), may as well be lost as far as the receiver is concerned so a periodic very high latency is the same as a periodic lost packet for audio quality purposes. To work around this, some equipment and protocols (notably Skype) employ an adaptive jitter buffer which holds the packets in a receive buffer for a period of time which exceeds the longest latency ever seen, that way a delayed packet can be received and the full stream reassembled without any observable audio problems. The cost of this workaround is that the caller experiences extended audio delay on calls, which is in itself a problem. The depth or even presence of an extended or adaptive jitter buffer is generally limited in telco grade equipment due to scalability issues of employing huge buffers on every audio stream.

Leave a Reply