Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼


Designing a VoIP Media Phone Framework

An Example: Wideband PCM and Narrowband codec

In this scenario the data would be downsampled before it passes through the PCM inbound pipeline and transmitted in Narrowband format.

Another benefit of this design is that a software block can easily be replaced with a hardware accelerator. Acoustic echo cancellation (AEC) is an example of this. AEC is CPU-intensive and in most solutions it is implemented in hardware. However, IA is powerful enough, in most cases, to allow AEC to be implemented in software. With AEC implemented as a modular block, reference solutions without AEC hardware acceleration can use the software block while those solutions that have AEC acceleration can simply remove the AEC block from the list of blocks that the data is passed through. One major benefit of having a software AEC solution is that the AEC code can be easily tweaked to meet the needs of individual platforms. See "Performance Results" for performance figures of a software AEC solution employing IA. In this scenario AEC would be hosted on an endpoint for handsfree operation so the CPU cycle requirements are manageable. AEC would not be implemented on an IP PBX as latency issues would impact performance.

Voice Quality

For good-quality audio in IP voice telecoms, the packet processing must occur in real time. If packets arrive or are processed too late, the audio quality is adversely affected. As Linux is not a real-time operating system, it is possible that the audio processing, which is a real time task, may be adversely affected if the thread that the audio processing is running on gets starved of CPU cycles. This may occur if some higher-priority thread gets executed or if some kernel space code is executed. It also may occur if the system is sized such that the headroom of CPU cycle availability is compromised. It is possible to maximize the thread priorities of the real-time processing (audio processing) threads, so that no other user space threads should pre-empt them. However, it is not as straightforward to prevent kernel space code from interfering with audio real-time processing.

Running a pre-emptible kernel should improve performance. Also, disabling any processes that may periodically run in the background, and are not needed for the IP phone application, should reduce the possibilities of interference with audio processing (for example, yum updates, any daemons). Some Linux applications (for example, secure copy (scp)) can cause problems if being executed while audio processing is occurring. Use of these applications should be avoided when IP phone is in use.

Also, if running a large IP PBX-type application, as the number of channels increase, the interrupts from the NIC card need to be evenly distributed between all CPU cores to not adversely affect one CPU core. If all NIC interrupts are sent to one CPU core, as the number of channels increases, the number of interrupts increases; therefore, the interrupt handling would start to starve any user space real-time threads of CPU cycles, leading to degradation in voice quality.

One solution to this problem would be to use one CPU core to handle the NIC interrupts, and to ensure than no real-time data processing threads are running on this core.

Intel Performance Primitives

Intel's Integrated Performance Primitives (IPPs) is a software library optimized for use on IA CPUs. There are many different speech, audio, and video codecs implemented as sample code (source available), packaged with the IPPs. These codecs have been optimized, unlike the standard ITU-T sample implementations of the codecs. Both narrowband and wideband codecs are available, such as: G.711, G.726, G.729ab, G.722, G.729.1, AMR-WB, etc.Video codecs are also available. There are versions available for IA-32, Intel Atom processor (low-power IA-32), andIA-64.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.