IEC 29341-20-14: UPnP Telephony Media Service

ISO/IEC 29341-20-14 — Telephony — Media Service Standard for Universal Plug and Play

Introduction to UPnP Telephony Media Service

The ISO/IEC 29341-20-14 standard specifies the UPnP Telephony Media service, which manages the media aspects of telephony sessions in a UPnP network. While the Call service handles signaling and call state management, the Media service focuses on media stream control — including audio/video codec negotiation, media quality monitoring, stream redirection between devices, and integration with the broader UPnP AV architecture for media rendering and recording.

The Media service bridges the gap between telephony and entertainment AV systems. It allows a call’s audio stream to be redirected from a handset to a home theater system, or a video stream to be displayed on a smart TV — enabling seamless telephony experiences across the entire home.

Media Stream Architecture

The Media service models each telephony media stream as a distinct entity with its own state variables. The MediaStreamList variable enumerates active streams, each characterized by stream ID, media type (audio, video, text), codec in use, transport parameters (RTP ports, IP addresses), and stream direction (send, receive, send-receive). Stream quality metrics — packet loss rate, jitter, round-trip delay, and mean opinion score (MOS) — are exposed through the StreamQuality variable for real-time monitoring.

A key architectural feature is the MediaRedirect capability, which allows a telephony media stream to be transferred from one rendering device to another mid-call. When a user walks from the living room to the home office, the Media service can seamlessly redirect the active audio stream from the smart speaker to the office handset without interrupting the call. This is accomplished through a combination of SIP re-INVITE and UPnP AV transport control.

Implementing media redirection requires careful synchronization between the UPnP Telephony Media service and the underlying SIP stack. The media handoff must complete within the SIP session timeout window (typically 500 ms for RTP) to avoid perceptible audio gaps. Implementers should pre-negotiate common codecs between source and target rendering devices.

Key Actions and Media Control

Action Description Required Arguments
GetMediaStreamInfo Get detailed information about a media stream StreamID
SetMediaStreamQuality Adjust codec parameters or bitrate for a stream StreamID, QualityParams
RedirectMediaStream Redirect a stream to a different rendering device StreamID, TargetDeviceUDN
AddMediaToConference Add a media stream to a conference bridge StreamID, ConferenceID
RecordMediaStream Start or stop recording of a media stream StreamID, RecordingURI
MuteMediaStream Mute or unmute a media stream StreamID, MuteStatus
GetSupportedCodecs Retrieve the list of codecs supported by the device MediaType

The Media service is designed to be codec-agnostic. The GetSupportedCodecs action returns a prioritized list of codecs that the device can handle, and the service negotiates the best common codec with the remote endpoint during call setup. This allows devices with different codec support levels to communicate optimally — a high-end desk phone with Opus support can negotiate wideband audio, while a legacy device falls back to G.711.

The media recording feature (RecordMediaStream) opens interesting possibilities for voicemail systems, call recording for compliance, and automated transcription services. The service can record streams to a local file, a network storage URI, or directly stream to a UPnP Media Server for integration with content management workflows.

Engineering Design Insights

Quality of Service (QoS) is a crucial consideration for telephony media. The standard recommends that the Media service interface with the network layer to request appropriate QoS markings (DSCP EF for audio, AF41 for video) on media packets. Implementations should monitor jitter buffers and adapt playout delay dynamically based on network conditions. The StreamQuality state variable provides the feedback loop necessary for adaptive codec bitrate selection.

Hardware acceleration for media processing can significantly improve performance. Many system-on-chip (SoC) devices include dedicated DSP blocks for audio processing (echo cancellation, noise reduction, AGC) and hardware video codecs. The Media service should expose hardware acceleration capabilities through its capability descriptors, allowing control points to optimize media processing paths accordingly.

Media stream security cannot be overlooked. All media streams should be encrypted using SRTP (Secure RTP) as mandated by the standard for compliance with modern security requirements. Failure to encrypt media streams exposes call content to eavesdropping on the local network. Implementations must also support key exchange mechanisms such as ZRTP or SDES for secure media session establishment.

Frequently Asked Questions

Q: Can the Media service handle multiple simultaneous streams per call?
A: Yes. A single call can have multiple media streams — for example, an audio stream for voice and a video stream for camera feed. Each stream is independently controllable through its StreamID.
Q: How does the service handle codec renegotiation mid-call?
A: Codec renegotiation is triggered by the SetMediaStreamQuality action. The service initiates a SIP re-INVITE with updated SDP parameters. If the remote endpoint agrees on the new codec parameters, the stream transitions to the new codec without call interruption.
Q: Is it possible to record only one direction of a call?
A: Yes. The RecordMediaStream action accepts stream direction parameters. You can record only the local talker, only the remote talker, or the mixed audio — useful for compliance recording scenarios where selective recording is required.
Q: Does the Media service support text-based telephony media (T.140)?
A: Yes. The service supports real-time text (RTT) media type for accessibility and emergency communication use cases, conforming to ITU-T T.140 recommendation.

Leave a Reply

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