SRTP Methods
Reference for the SRTP method bitmask controlling SDES and DTLS-SRTP key exchange, SDP profile mapping, and cipher suite specifications.
The SRTP method setting controls which encryption key exchange mechanisms are included in the SDP offer. This is configured per media track and determines how encryption keys are exchanged with the remote endpoint.
Method Bitmask
| Value | Name | Key Exchange | SDP Profile | a=crypto | a=fingerprint |
|---|---|---|---|---|---|
| 0 | Legacy | SDES | RTP/SAVP | Yes | No |
| 1 | SDES Only | SDES (RFC 4568) | RTP/SAVP | Yes | No |
| 2 | DTLS Only | DTLS (RFC 5764) | UDP/TLS/RTP/SAVP | No | Yes |
| 3 | Dual Offer | SDES + DTLS | UDP/TLS/RTP/SAVP | Yes | Yes |
Value 0 — Legacy
Identical to SDES Only (value 1). Exists for backward compatibility with configurations created before DTLS support was added.
Value 1 — SDES Only
SRTP keys are exchanged as a=crypto attributes in the SDP body (RFC 4568). The RTP profile is RTP/SAVP (or RTP/SAVPF with AVPF feedback). Keys are visible to any entity that can read the SDP.
Value 2 — DTLS Only
The SDP includes an a=fingerprint attribute with the SHA-256 hash of the endpoint's auto-generated certificate. The RTP profile is UDP/TLS/RTP/SAVP (or UDP/TLS/RTP/SAVPF). A DTLS handshake runs on the media port after SDP negotiation, and SRTP keys are derived from the handshake result. Keys are never exposed in signaling.
Value 3 — Dual Offer
Both a=crypto lines and a=fingerprint are included in the SDP. The profile is UDP/TLS/RTP/SAVP. The answering endpoint chooses whichever method it supports — if it responds with a=fingerprint, DTLS is used; if it responds with a=crypto, SDES is used.
Profile Mapping
The full RTP profile depends on both the SRTP method and whether AVPF feedback is enabled:
| SRTP Method | Without AVPF | With AVPF |
|---|---|---|
| Disabled | RTP/AVP | RTP/AVPF |
| 0 (Legacy) | RTP/SAVP | RTP/SAVPF |
| 1 (SDES) | RTP/SAVP | RTP/SAVPF |
| 2 (DTLS) | UDP/TLS/RTP/SAVP | UDP/TLS/RTP/SAVPF |
| 3 (Dual) | UDP/TLS/RTP/SAVP | UDP/TLS/RTP/SAVPF |
SRTP Policy Interaction
The SRTP method controls how keys are exchanged. The SRTP policy controls whether encryption is mandatory:
| Policy | Effect on SRTP Method |
|---|---|
| Disabled | No encryption regardless of method. a=crypto and a=fingerprint are omitted. Profile stays RTP/AVP. |
| Offered | Encryption attempted but not required. Falls back to unencrypted if the remote does not support the offered method. |
| Required | Encryption mandatory. Call fails if the remote cannot negotiate the offered method. |
Cipher Suites (SDES)
When SDES is active (methods 0, 1, or 3), the following cipher suites may be offered:
| Suite | Algorithm | Key Length | Auth Tag | RFC |
|---|---|---|---|---|
AES_CM_128_HMAC_SHA1_80 | AES-128 Counter Mode | 128 bits | 80-bit HMAC-SHA1 | RFC 3711 |
AES_CM_128_HMAC_SHA1_32 | AES-128 Counter Mode | 128 bits | 32-bit HMAC-SHA1 | RFC 3711 |
AEAD_AES_128_GCM | AES-128 GCM | 128 bits | GCM integrated | RFC 7714 |
The default is to offer all three suites. The answering endpoint selects the one it supports.
DTLS Parameters
When DTLS is active (methods 2 or 3):
| Parameter | Value |
|---|---|
| Certificate algorithm | ECDSA P-256 |
| Certificate type | Self-signed |
| Certificate validity | 24 hours |
| Fingerprint hash | SHA-256 |
| DTLS version | 1.2 |
| Key derivation | RFC 5764 SRTP Extension for DTLS |
Related Pages
- SDES-SRTP — Configuration guide for SDP-based key exchange
- DTLS-SRTP — Configuration guide for DTLS handshake-based encryption
- Media Security Overview — Comparison of all encryption modes
- Supported Codecs — RTP profile usage in codec negotiation
Supported Codecs
Audio and video codecs supported by CallMeter for SIP testing, including specifications, RTP profiles, and guidance on codec selection for different testing scenarios.
SIP Session Timers
Reference for SIP session timer configuration (RFC 4028) including refresh intervals, refresher role, Min-SE negotiation, and expiry behavior.