CallMeter Docs

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

ValueNameKey ExchangeSDP Profilea=cryptoa=fingerprint
0LegacySDESRTP/SAVPYesNo
1SDES OnlySDES (RFC 4568)RTP/SAVPYesNo
2DTLS OnlyDTLS (RFC 5764)UDP/TLS/RTP/SAVPNoYes
3Dual OfferSDES + DTLSUDP/TLS/RTP/SAVPYesYes

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 MethodWithout AVPFWith AVPF
DisabledRTP/AVPRTP/AVPF
0 (Legacy)RTP/SAVPRTP/SAVPF
1 (SDES)RTP/SAVPRTP/SAVPF
2 (DTLS)UDP/TLS/RTP/SAVPUDP/TLS/RTP/SAVPF
3 (Dual)UDP/TLS/RTP/SAVPUDP/TLS/RTP/SAVPF

SRTP Policy Interaction

The SRTP method controls how keys are exchanged. The SRTP policy controls whether encryption is mandatory:

PolicyEffect on SRTP Method
DisabledNo encryption regardless of method. a=crypto and a=fingerprint are omitted. Profile stays RTP/AVP.
OfferedEncryption attempted but not required. Falls back to unencrypted if the remote does not support the offered method.
RequiredEncryption 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:

SuiteAlgorithmKey LengthAuth TagRFC
AES_CM_128_HMAC_SHA1_80AES-128 Counter Mode128 bits80-bit HMAC-SHA1RFC 3711
AES_CM_128_HMAC_SHA1_32AES-128 Counter Mode128 bits32-bit HMAC-SHA1RFC 3711
AEAD_AES_128_GCMAES-128 GCM128 bitsGCM integratedRFC 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):

ParameterValue
Certificate algorithmECDSA P-256
Certificate typeSelf-signed
Certificate validity24 hours
Fingerprint hashSHA-256
DTLS version1.2
Key derivationRFC 5764 SRTP Extension for DTLS

On this page