Secure SIP Trunk: TLS and SRTP on Twilio and Telnyx

Tom Reed
Read time: 6 minutes
Secure SIP Trunk: TLS and SRTP on Twilio and Telnyx

Tom Reed · Updated 5 December 2026

A secure SIP trunk uses TLS to protect signalling and can use SRTP to protect media on the carrier leg. This post covers that leg only: the path between SessionPBX and your Twilio or Telnyx trunk. Two points matter from the start. TLS alone doesn't mean the media is encrypted, and a successful registration doesn't prove SRTP is on.

The SessionPBX position, in the wording agreed with the development team, is this: TLS signalling with Twilio and Telnyx; SRTP media encryption is available but not yet qualified. This guide does not claim end-to-end encryption, and it does not claim SRTP is on for every call. The other party's endpoint must support SRTP too.

What do TLS and SRTP do on a SIP trunk?

They protect different parts of the call, so you need to treat them as two settings, not one:

LayerWhat it protectsOn this carrier leg
TLSSIP signalling, including the keys used to set up SRTPTransport on port 5061
SRTPThe media (the audio)A separate media-encryption setting

TLS encrypts the SIP messages. SRTP encrypts the media. Selecting TLS alone does not require encrypted media. For the concepts behind the two, see SRTP versus RTP. The phones themselves are a different leg, covered in SIP TLS and SRTP on mobile softphones.

Aisle of data-center cabinets with rows of server lights

How do you set TLS on a Twilio trunk?

On the Twilio side, incoming calls reach SessionPBX through an origination URI that uses TLS on port 5061. The SessionTalk Twilio guide shows the form: a `sip:` URI with `;transport=tls`, for example `sip:uk.sip.sessiontalk.io:5061;transport=tls`, pointing at the SessionPBX region for your workspace.

That URI covers signalling. For media encryption on a Twilio trunk, use Twilio's own Secure Trunking documentation. Do not take a TLS origination URI, on its own, as proof that SRTP is in use.

The wider Twilio trunk setup, including the termination host and access list, is in our Twilio SIP trunk guide.

How do you set TLS and SRTP on a Telnyx trunk?

For Telnyx, the SessionTalk Telnyx guide uses TLS on port 5061 and has a section on enabling mandatory SRTP.

In SessionPBX, set the trunk transport to TLS and the port to 5061. In Telnyx, open the SIP connection's inbound settings and enable SRTP / Encrypted Media. Then, if you are requiring encrypted media, set SRTP encryption on the SessionPBX trunk to required, so unencrypted calls on that trunk are rejected.

An outbound phone must offer SRTP. SessionPBX does not convert a plain phone offer into an encrypted trunk offer, and answering devices must also support the secure media profile. Enabling inbound encrypted media in Telnyx does not, on its own, create an SRTP offer for calls that SessionPBX sends out. The SRTP media encryption guide has the SessionPBX-side steps.

The rest of the Telnyx connection, including authentication and the outbound voice profile, is in our Telnyx SIP trunk guide.

Man wearing a headset and thinking during a call in an office

Why isn't TLS enough on its own?

A trunk can register and still send media unencrypted. Two checks follow from the live SRTP guide:

  • TLS alone doesn't require encrypted media. The signalling can be protected while the audio is still plain RTP.
  • A successful registration doesn't prove SRTP is on. Registration can succeed while media negotiation fails, or while media stays unencrypted.

That is why a registration test is not the verification step. You need an answered call, in both directions, and a check that the carrier leg actually negotiated SRTP.

This work sits on the hosted PBX in front of your Twilio or Telnyx trunk. The apps have to take part as well: if a member's endpoint does not offer or accept SRTP, the carrier leg cannot invent it.

What should you check before you rely on it?

  • The Twilio origination URI uses TLS on port 5061, in the `sip:` plus `;transport=tls` form
  • Telnyx signalling uses TLS on port 5061
  • If you require SRTP on Telnyx, inbound encrypted media is enabled on the connection and the SessionPBX trunk is set to require SRTP
  • For Twilio media settings, you have followed Twilio's own Secure Trunking documentation, not only the TLS URI
  • Endpoints that need SRTP, including SessionTalk softphones for iOS, Android and desktop, are set to offer or require it
  • You have tested an answered inbound call and an answered outbound call, not only a registration
  • A phone's own encryption indicator is not treated as proof that the carrier leg is encrypted

FAQ

What is a secure SIP trunk?

It is a SIP trunk that protects signalling with TLS and can protect media with SRTP. On Twilio and Telnyx, that is the carrier leg into SessionPBX. The two settings are separate, and both ends of the media path must support SRTP before you can require it.

Does TLS on its own encrypt the call audio?

No. TLS encrypts SIP signalling, including the keys used to set up SRTP. It does not, on its own, require encrypted media. You still need SRTP on the carrier and on the endpoints if the audio itself must be protected.

Does a successful registration mean SRTP is on?

No. Registration can succeed while media negotiation fails, or while media stays unencrypted. Confirm SRTP on an answered call in both directions, not on the registration alone.

How do I turn this on for Twilio?

Point the Twilio origination URI at your SessionPBX region over TLS on port 5061. For media encryption, follow Twilio's own Secure Trunking documentation. A TLS URI by itself is not proof that SRTP is in use.

How do I turn this on for Telnyx?

Set the SessionPBX trunk to TLS on port 5061, enable SRTP / Encrypted Media on the Telnyx connection, and, if you are requiring it, set the SessionPBX trunk to require SRTP. Configure the phones as well, because SessionPBX will not convert a plain offer into an encrypted one.

Is SRTP used on every call?

No, and this post does not claim that it is. TLS signalling with Twilio and Telnyx; SRTP media encryption is available but not yet qualified. The other party's endpoint must support SRTP too, and requiring it will fail a call that cannot negotiate it, rather than silently sending plain media.

Sources

Facts follow the SessionTalk SRTP, Twilio and Telnyx guides, Twilio's Secure Trunking documentation, and the wording agreed with the development team on 1 December 2026. We re-read the live pages on 5 December 2026.

Set up the trunk on a hosted PBX

Put the carrier leg in front of a hosted PBX. Set up a hosted PBX on your Twilio or Telnyx trunk, and give people the apps for iOS, Android and desktop.

Related Articles

More from the SessionTalk blog