Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
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 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.
| 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.
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.