RTP Payload Format for Global System for Mobile Communications Half Rate (GSM-HR)
Extracted elements (28)
SID frames are recommended every 160 ms for IP transport as a compromise: the GSM radio downlink sends SID every 20 ms (too frequent and wasteful over IP), while the 480 ms uplink interval is too sparse for acceptable comfort noise quality.
The media subtype is named 'audio/GSM-HR-08' rather than 'audio/GSM-HR' to avoid potential conflict with early draft versions of the GSM-HR payload format (circa 1999–2000) that are not bit-compatible with this specification.
The GSM-HR-specific redundancy scheme (sliding window of frames) works only when both original and redundant representations are GSM-HR frames. When other media coding schemes are needed for redundancy, RFC 2198 audio redundancy coding must be used instead.
This payload format (audio/GSM-HR-08) is not compatible with early draft GSM-HR RTP payload types from 1999–2000. RFC 3551 itself did not include any GSM-HR payload format specification, leaving a gap that this document fills.
A given frame MUST NOT be encoded with different voicing modes in different packets, ensuring consistency across all redundant copies.
A media sender using this payload format is RECOMMENDED to always include the 'max-red' parameter in SDP to simplify receiver handling; if no redundancy will be used, 'max-red' SHOULD be set to 0.
A receiver MUST be prepared to receive any speech frame multiple times due to redundant transmission. A given frame MUST NOT be encoded as a speech frame in one packet and as a SID or No_Data frame in another packet.
An application implementing this payload format MUST understand all payload parameters defined in this specification, and any mapping to a signaling protocol MUST support all parameters.
Any unknown media type parameter in an SDP offer SHALL be removed in the answer, ensuring that future parameter additions do not break interoperability.
If the receiver finds a mismatch between the size of a received payload and the size indicated by the ToC, the receiver SHOULD discard the packet; decoding from erroneous ToC data could severely degrade audio quality.
In multicast declarative SDP, the 'max-red' value SHALL be answered using the same value as declared in the offer. Transmissions MUST NOT use more redundancy than what has been declared.
In SDP, the RTP clock rate in 'a=rtpmap' MUST be 8000, and the number of channels MUST either be explicitly set to 1 or omitted (defaulting to 1).
Reserved bits in the ToC element MUST be set to zero by the sender and MUST be ignored by the receiver, preserving forward compatibility.
The 'maxptime' SDP parameter MUST be handled in the same way as 'ptime' per RFC 3264. The SDP offerer and answerer MUST generate GSM-HR packets as described by the offered parameters.
The payload size rules in Section 3.2 of RFC 5405 (Unicast UDP Usage Guidelines) SHOULD be followed when determining the maximum number of frames per RTP packet.
The RTP marker bit (M) SHALL be set to 1 whenever the first frame in the packet is the first frame in a talkspurt; it SHALL be set to 0 for all other packets.
The RTP timestamp clock frequency SHALL be 8000 Hz, matching the GSM-HR sampling rate. The timestamp is also used to recover the correct decoding order of frames.
The sender SHOULD generate and send SID frames every 160 ms (every 8th frame) during silent periods when operating outside the GSM radio network.
An optional GSM-HR-specific redundancy scheme aggregates previously transmitted frames with new ones using a sliding window. Multiple RTP packets may cover overlapping time intervals; the receiver uses timestamps to identify and apply redundant copies.
GSM-HR codec produces 20 ms frames at 8000 Hz (160 samples per frame). Each speech frame compresses to 112 bits (5.6 kbit/s). SID frames are transmitted at the end of a talkspurt and periodically during pauses to support comfort noise generation.
The complete payload consists of a ToC section followed by a speech data section. Each ToC element is one octet and corresponds to one speech, SID, or No_Data frame. The timestamp for ToC element N is (RTP timestamp + (N-1)*160) mod 2^32.
The optional 'max-red' media type parameter specifies the maximum duration in milliseconds between primary and redundant transmissions of a frame. Allowed values are integers 0–65535; omission implies no limitation on redundancy.
This document registers the media type 'audio/GSM-HR-08' in the IANA media types registry for RTP transport of GSM Half Rate speech. The '-08' suffix distinguishes it from earlier incompatible draft formats.
RTP packets using this payload format require confidentiality, integrity protection, and source authentication. SRTP (RFC 3711) is the recommended security mechanism; IPsec and TLS are identified as alternatives depending on the application and transport.
The GSM-HR RTP payload format does not exhibit significant non-uniformity in receiver-side computational complexity for packet processing, making denial-of-service attacks via pathological data unlikely. The payload contains no active content.
A Good SID frame occupies 14 octets: the first 33 bits carry SID parameters and the remaining 79 bits are all set to '1'. A No_Data frame carries zero octets of payload data.
A Good Speech frame carries 112 GSM-HR speech bits (b1–b112) packed MSB-first into 14 octets; b1 maps to bit 0 of octet 1 and b112 maps to bit 7 of octet 14.
The ToC element is one octet: bit 0 is the Follow flag (F; 1 = more ToC elements follow), bits 1–3 are the Frame Type (FT), and bits 4–7 are reserved (R). FT values: 000 = Good Speech, 010 = Good SID, 111 = No_Data; all other values are reserved.