Mutual TLS on SIP trunks
In ordinary TLS only the server proves who it is. In mutual TLS the server also asks the connecting side for a certificate during the handshake, checks it against the CAs it trusts, and refuses the connection if none arrives or the certificate fails. On a SIP trunk that turns the TLS layer into access control: only peers holding a certificate from an expected CA can send SIP at all.
Because SIP connections are opened in both directions, each SIP server is a TLS server for the calls it receives and a client for the calls it makes. A trunk can therefore need a client certificate in one direction and not the other, and a server can take inbound calls fine while its outbound connections to a mutual TLS peer fail.
Error messages you may see
tlsv13 alert certificate requiredssl/tls alert handshake failureremote error: tls: certificate requiredremote error: tls: bad certificate
Common causes
- The server is set to require a client certificate, and the connecting side has none configured.
- The client presents a certificate, but its CA is not in the server's list of trusted CAs.
- The client's certificate has expired, or lacks the client authentication usage the server expects.
- Only one direction of the trunk was set up for client certificates, so calls work one way only.
How to fix it
- Confirm whether the server requires a client certificate or only asks for one, since many platforms make it optional.
- Install a client certificate on the connecting side from a CA the server trusts, and point the client TLS settings of its SIP stack at it.
- Load the peer's root certificates into the trusted list of whichever side checks client certificates.
- Test each direction of the trunk separately, because each one uses a different certificate.
Platform notes
- Microsoft Teams Direct Routing: Mutual TLS is optional. When it is enabled, Microsoft says to install all the required Microsoft Trusted Root certificates on the SBC so that it can verify the SIP proxy.
- Genesys Cloud BYOC: BYOC Cloud trunks use one-way, server-side TLS, and Genesys states that mutual TLS is not supported.
- Asterisk (PJSIP): A TLS transport has require_client_cert and verify_client for inbound connections, with ca_list_file naming the CAs whose client certificates it accepts.
- Kamailio: require_certificate makes Kamailio demand a certificate from clients that connect to its TLS port, and it is off by default.
How the free check shows it
When your server asks for a client certificate, the free check says so under the certificate rows. Our test agent presents none, so the server may end the handshake right after sending its own certificate, and the result then also reports a TLS handshake failure. The rows still describe the certificate your server sent.
Questions
Why does the handshake fail right after the server sends its certificate?
With TLS 1.2 the server rejects the missing client certificate during the handshake. With TLS 1.3 the client can believe the handshake is done, and the refusal arrives with the first data, so the error appears when SIP is first sent.
Is mutual TLS the same as a sips: URI?
No. A sips: URI asks for TLS on every hop of the path, while mutual TLS is about whether both ends of one connection show a certificate. Either can be used without the other.