Skip to Content
SessionPBX

Enable SRTP media encryption

SessionPBX supports SDES-SRTP for media on inbound and outbound SIP trunk calls. SRTP is optional by default; select Required on a trunk when calls using it must offer compatible encrypted media.

SRTP encrypts media. TLS encrypts SIP signalling, including the keys used to establish SDES-SRTP. Use both for a protected connection. Selecting TLS alone does not require encrypted media, and successful registration does not prove that a call uses SRTP.

Require SRTP on a trunk

  1. Open Call Routing → SIP trunks, then Edit the trunk.
  2. Set Transport to TLS and enter the carrier’s TLS port. Telnyx uses 5061. Keep the carrier hostname and existing authentication details.
  3. Configure the carrier and the phones to use compatible SDES-SRTP. See the Telnyx instructions and extension settings below.
  4. Set SRTP encryption to Required — reject unencrypted calls.
  5. If you use Additional gateways, configure each with TLS and its correct port too.
  6. Select Save changes, confirm registration where required, and test an answered call in both directions.

The setting is also available in the Connection fields when adding a trunk.

SRTP encryptionBehaviour
Optional — use when offeredPermits plain RTP and uses supported SRTP when offered. This is the default for existing and new trunks. It does not guarantee that calls are encrypted.
Required — reject unencrypted callsRequires a compatible SDES-SRTP offer for incoming and outgoing calls on this trunk. Plain RTP, unsupported encryption and INVITEs without a media offer are rejected. The requirement also applies to media renegotiation, such as hold and resume.

Required does not turn a plain-RTP phone offer into an encrypted trunk offer. Outbound callers must offer compatible SRTP, and answering devices must support the negotiated secure media profile. Configure the phones as well as the carrier before requiring SRTP. Calls that cannot meet the requirement fail instead of falling back to plain RTP.

Changes apply to new calls. An established call that already requires SRTP keeps that requirement until it ends. The trunk setting does not change your carrier account or phone settings for you.

If SRTP encryption is absent on a self-hosted system, update to a release that includes the trunk setting and enforcement before relying on this policy.

Supported negotiation and cipher suite

ItemSupported value
Key negotiationSDES using SDP a=crypto attributes
Secure media profileRTP/SAVP
SRTP cipher suiteAES_CM_128_HMAC_SHA1_80
Key material128-bit AES key and 112-bit salt, exchanged automatically

AES-GCM, AES-256, DTLS-SRTP, MKI and explicit key-lifetime parameters are not supported on this SIP media path. If a carrier offers several suites, it must include AES_CM_128_HMAC_SHA1_80. No manual SRTP key entry or per-trunk cipher selection is needed.

Can SRTP use SIP over UDP?

Yes, SRTP negotiation can operate with UDP signalling. However, SDES carries media keys in the SIP messages, so unencrypted UDP signalling exposes those keys. Use TLS for signalling as well as SRTP for media. Username/password digest authentication does not encrypt SIP messages or the keys they contain. See Telnyx’s TLS and SRTP guide .

SRTP media still uses UDP when SIP signalling uses TLS. For a self-hosted node, allow the carrier’s TLS signalling port and the configured UDP media ports to and from its published networks. Keep trusted CA certificates current and certificate verification enabled.

Require SRTP between extensions

Extension-to-extension calls are not guaranteed to use SRTP by default. SessionPBX softphone provisioning currently sets SRTP to Optional. A trunk’s SRTP setting does not apply to internal calls.

For phones whose SIP account settings are editable:

  1. Open the SIP account’s audio or media-encryption settings.
  2. Choose SRTP Required, Mandatory or Compulsory, depending on the phone.
  3. Use TLS for SIP signalling, with certificate verification enabled.
  4. Apply this to both extensions and test an answered call, hold and resume.

A phone set to require SRTP should reject calls that cannot negotiate it. A manual phone change is not a centrally enforced workspace policy and may be overwritten when the phone is reprovisioned.

There is currently no per-extension Require SRTP switch in the SessionPBX portal and no global node switch that requires it for all extensions. Centrally requiring SRTP for provisioned softphones needs a provisioning-policy change; contact support if managed account settings cannot be edited. Yealink provisioning can apply a tenant-wide required-SRTP policy, but this is not a portal switch and does not change softphone provisioning.

Verify encryption and troubleshoot failures

  • Test an inbound and outbound call with two-way audio, then hold and resume each call.
  • Confirm that the carrier leg negotiates RTP/SAVP and AES_CM_128_HMAC_SHA1_80. A phone’s encryption indicator alone does not prove that the carrier leg is encrypted.
  • With Required selected, a controlled test that offers only plain RTP must fail. The SIP edge returns 488 SRTP Required; the phone may display a general call-failed message.
  • If calls fail after requiring SRTP, check the phones’ media settings, the carrier’s inbound encryption setting and the offered cipher. Registration can succeed while media negotiation fails.
  • If registration fails after switching to TLS, check the hostname, TLS port, certificate trust and credentials.
  • A size of packet larger than MTU error with UDP is a signalling-size failure. Use TLS to carry the larger authenticated INVITE while retaining media encryption.

For support, provide the call time and timezone, direction and affected extension. Do not include passwords or raw SDP crypto keys. See Troubleshooting.

Last updated on