Embedded VoIP for Cortex-M: Choosing the Right SIP Stack

Voice communication is no longer limited to PCs, smartphones and traditional IP phones. Today, manufacturers are adding voice communication to intercoms, door stations, network speakers, paging systems, public address endpoints, emergency communication equipment, industrial devices and IoT products.

For many of these products, the underlying hardware is not a Linux computer. It may be a Cortex-M microcontroller with limited memory, processing resources and power.

Adding voice communication to an embedded product requires much more than adding a SIP client. A complete embedded VoIP implementation needs to address SIP signalling, SDP session negotiation, RTP media transport, voice codecs, jitter management, packet-loss concealment, DTMF, authentication and security, while also integrating with the product’s existing RTOS, TCP/IP stack and audio subsystem.

Consilient Technologies has recently upgraded its embedded VoIP technology with CT-VAJRA, an embedded SIP/VoIP stack designed for Cortex-M microcontrollers and network audio products. The stack is built around bounded memory, modular integration and real-time voice communication.

What Is an Embedded SIP Stack?

SIP (Session Initiation Protocol) is used to establish, manage and terminate communication sessions. In an embedded VoIP product, a SIP stack typically handles functions such as:

  • SIP registration
  • Incoming and outgoing calls
  • Call establishment and termination
  • Authentication
  • SIP proxy and registrar interaction
  • SDP offer/answer
  • Codec negotiation
  • RTP media sessions
  • DTMF
  • Secure signalling and media

CT-VAJRA implements an RFC 3261 SIP user agent and supports common SIP methods including REGISTER, INVITE, ACK, BYE, CANCEL, OPTIONS and INFO. It also supports SDP offer/answer for media negotiation.

Why Is VoIP on a Microcontroller Different?

A SIP stack running on a desktop or server can assume the availability of comparatively large amounts of memory and processing power. A microcontroller-based product cannot make the same assumptions.

An embedded VoIP implementation must consider memory, CPU utilisation, deterministic behaviour, RTOS integration, network integration and audio integration. Memory may already be required by the application, networking, RTOS, audio buffers and other product functions. Voice processing also operates continuously in real time, so codec processing, packet handling and security must coexist with the application’s other tasks.

For these reasons, selecting an embedded VoIP SDK is not simply about counting the number of SIP features. The architecture of the software and how it integrates with the product can be equally important.

What Should You Look for in an Embedded VoIP Stack?

Evaluation criterionWhy it matters
SIP functionalityInteroperability with SIP infrastructure
Codec supportAudio compatibility and bandwidth considerations
RTP / SRTPReal-time media transport and security
TLSSecure SIP signalling
Memory modelPredictability on resource-constrained MCUs
RTOS dependencyPortability and integration effort
Network abstractionAbility to use different TCP/IP stacks
Audio abstractionAbility to retain the existing audio/DSP path
Multi-line supportProduct scalability
Vendor supportIntegration and maintenance risk
Porting capabilityAbility to support target MCU/RTOS combinations
Licensing modelImpact on product economics

1. SIP functionality

The stack should support the SIP functionality required by the product and be interoperable with the SIP infrastructure the product needs to communicate with.

CT-VAJRA supports up to four concurrent SIP lines/accounts sharing a signalling connection, with UDP, TCP and TLS 1.2 transport options. It also provides digest authentication, registration management, proxy support and keep-alive functionality.

2. Voice codec support

Codec selection affects interoperability, bandwidth and voice quality.

CT-VAJRA currently supports G.711 μ-law, G.711 A-law and G.722 wideband. The stack provides a 16-bit, 16 kHz PCM interface and includes packet-loss concealment for the supported codecs.

For an OEM developing an IP speaker, intercom, paging endpoint or door station, codec compatibility with the target SIP infrastructure is an important selection criterion.

3. RTP and media handling

SIP establishes the session, but the actual voice communication is carried through the media path. An embedded VoIP stack therefore needs to handle RTP, media packet sequencing, jitter, packet loss, DTMF and codec processing.

CT-VAJRA provides RTP media transport, a configurable jitter buffer, RFC 4733 DTMF send/receive and packet-loss concealment for G.711 and G.722.

Security Is Now an Embedded VoIP Requirement

For network-connected products, voice communication should not be considered separately from security. A modern, secure embedded VoIP solution needs protection for both signalling and media:

  • SIP signalling → TLS 1.2
  • Voice media → SRTP

CT-VAJRA uses mbedTLS and supports certificate verification and defined cryptographic configurations. SRTP uses SDES keying, with a fresh key for each call.

Security should nevertheless be evaluated in the context of the complete product. The final security architecture also depends on the MCU, hardware entropy source, firmware update mechanism, network architecture and the application’s own security controls.

Deterministic Memory Matters on an MCU

One of the biggest differences between desktop/server VoIP software and embedded VoIP software is the importance of predictable resource usage. For a product manufacturer, knowing how much memory a software component can require is important because the MCU must also accommodate application firmware, RTOS, TCP/IP stack, network buffers, audio buffers, DSP algorithms, device drivers, security components and product-specific functionality.

CT-VAJRA uses two application-supplied memory arenas — a SIP arena and a media arena — rather than relying on malloc within the library. The library can report the required size and the high-water mark reached during operation, giving product developers a clearer boundary between the VoIP software’s resource requirements and the rest of the embedded application.

Integrating a SIP Stack with Your Existing Audio Architecture

An embedded product may already have MEMS microphones, audio codecs, I2S or TDM interfaces, DSP processing, acoustic echo cancellation, noise suppression, beamforming, amplifiers and speaker drivers. A VoIP stack should ideally integrate with this existing architecture rather than attempting to replace it.

CT-VAJRA uses a PCM buffer-exchange interface and does not include an audio driver inside the library. This allows the product to retain its own codec, DSP or TDM/audio path — particularly useful when integrating embedded VoIP with existing voice-quality processing.

Voice Quality Is More Than Just the Codec

A codec determines how speech is represented, but the quality experienced by the user also depends on the acoustic and signal-processing environment. For products such as speakerphones, intercoms, door stations and network speakers, developers may need to address acoustic echo cancellation, noise reduction, automatic gain control, howling control, equalisation, delay alignment and packet-loss concealment.

CT-VAJRA provides an optional Voice Quality Enhancement module with wideband acoustic echo cancellation. Additional VQE capabilities — including noise reduction, AGC, howling control and equalisation — are available for project-specific integration. This creates an architecture in which SIP/VoIP functionality and voice-quality processing can be combined according to the requirements of the product.

Build, Buy or Integrate an Embedded SIP Stack?

For an OEM, one of the most important decisions is whether to develop the VoIP stack internally, adopt an open-source implementation, or license a commercial embedded SIP SDK.

Developing internally provides maximum control, but it also means taking responsibility for SIP implementation, RTP/media handling, codec integration, interoperability, security, error handling, MCU optimisation, testing and long-term maintenance. The development effort does not end when the first SIP call works — maintaining interoperability as the product evolves can become a continuing engineering responsibility.

Using open-source software can provide a useful starting point, but an OEM still needs to evaluate MCU compatibility, RAM and Flash requirements, RTOS integration, licensing, security maintenance, interoperability, porting effort and product support. The cost of software acquisition is therefore only one part of the total development cost.

Using a commercial embedded VoIP SDK provides an alternative in which the underlying communication infrastructure is supplied as a reusable software component. The product team can then concentrate more of its development effort on the differentiated parts of the product — hardware, application software, audio processing, user experience and product-specific functionality.

Considering a commercial SDK for your product?

Talk to Consilient Technologies about how CT-VAJRA fits your MCU, RTOS and audio architecture.

CT-VAJRA: Designed for Embedded Product Integration

CT-VAJRA is structured as a library with a single C/C++ header and a defined host interface. The integration model includes:

  • One CTVoIP.h API header
  • C and C++ support
  • 25 API functions
  • Eight host callbacks
  • Two host tasks
  • A replaceable network-port layer
  • Application-supplied SIP and media memory arenas
  • Audio buffer exchange
  • Build-time feature selection

The library itself does not call RTOS primitives, allowing the host application to control the relationship between the VoIP software and the product’s operating environment.

Where Can Embedded VoIP Be Used?

  • IP Intercoms — voice communication between an embedded device and a SIP endpoint, PBX or other SIP infrastructure
  • Door Stations — SIP-enabled door stations can combine voice communication with access-control and security functionality
  • Network Speakers — SIP provides a standard communication mechanism for network-connected speakers and paging endpoints
  • Paging and PA Systems — embedded SIP can connect individual audio endpoints to IP-based communication infrastructure
  • Emergency Communication Devices — network-connected emergency endpoints can use SIP-based voice communication as part of a larger emergency communication system
  • Industrial and IoT Devices — manufacturers can add voice communication to specialised network-connected equipment without requiring a general-purpose Linux processor

Platform and Integration Options

The current verified reference platform is an STM32F769NI Cortex-M7 at 200 MHz, using FreeRTOS, lwIP and mbedTLS.

The architecture also identifies Cortex-M7 and Cortex-M33 class devices, including STM32H7 and STM32H5, as porting targets. These should be treated as porting targets rather than hardware-verified implementations until they have been tested on the corresponding hardware.

Questions to Ask Before Selecting an Embedded VoIP Vendor

Before selecting an embedded SIP stack, an engineering or product team should ask:

  1. Which SIP methods are supported?
  2. Which codecs are supported?
  3. Does the stack support RTP and SRTP?
  4. Is TLS supported for SIP signalling?
  5. How is memory allocated?
  6. Does the library use dynamic memory?
  7. Which RTOS platforms are supported?
  8. Which TCP/IP stacks are supported?
  9. Can the stack integrate with an existing audio/DSP architecture?
  10. Which MCU families have actually been tested?
  11. How is SIP interoperability verified?
  12. Can the vendor port the stack to the target hardware?
  13. Is source-code access available if required?
  14. What licensing models are available?
  15. What level of integration and long-term support does the vendor provide?

CT-VAJRA Evaluation and Integration

CT-VAJRA is currently demonstrated on the STM32F769I-DISCO discovery kit. The demonstration firmware can be connected to a customer’s SIP server to place and receive calls and demonstrate features including multiple SIP lines, G.711/G.722 voice, TLS signalling, SRTP media and RFC 4733 DTMF.

Consilient Technologies also provides integration services covering MCU, RTOS and TCP/IP porting, along with product-specific customisation and support. The licensing model can be structured around the required product and feature set.

Building Your Next Embedded Voice Product?

Adding VoIP to an embedded product involves more than implementing SIP. The solution needs to fit the product’s MCU, memory architecture, RTOS, network stack, audio pipeline, security requirements and long-term product strategy.

CT-VAJRA provides a modular embedded SIP/VoIP architecture for Cortex-M-based network audio products, with support for SIP signalling, RTP media, G.711/G.722 codecs, packet-loss concealment, DTMF, TLS, SRTP and optional voice-quality enhancement.

If your product requires SIP calling on a Cortex-M or other resource-constrained embedded platform, Consilient Technologies can help with SIP stack integration, platform porting, voice processing and product-specific customization.

Leave a Reply

Your email address will not be published. Required fields are marked *