// SIP REFERENCE

SIP TLS (secure SIP) explained

SIP TLS, often called secure SIP, wraps SIP signalling in the same encryption that protects web traffic. This guide covers what it protects, which ports it uses, how a connection is set up, what a server certificate must get right, and how to test a PBX, SBC, proxy or SIP provider.

What is SIP TLS?

SIP over TLS encrypts the signalling between two SIP endpoints: who is calling whom, the account credentials, and the SDP that sets up the media. It runs over TCP, and the server proves its identity with a certificate, the SIP SSL/TLS certificate, the way a website does.

Without TLS, anyone on the path can read phone numbers, routing headers and, when SDES is used, the keys that encrypt the audio. TLS also lets each side check that it reached the server it meant to reach, which plain SIP has no way to do.

sips: URIs and transport=tls

There are two ways to ask for TLS in SIP. A URI such as sip:sbc.example.com;transport=tls asks for TLS on the next hop only. A sips: URI, defined in RFC 3261, asks for TLS on each hop until the request reaches the domain responsible for that URI.

Most carrier trunks and SBC interconnects use the first form, because each operator only controls its own hop.

Which port does SIP TLS use?

The registered port for SIP over TLS is 5061, where plain SIP uses 5060. It is a default, not a rule: a server can listen for TLS on any port, some services pick another one (Webex Calling uses 5062), and many SBCs let each interface choose its own.

When DNS is used to find the server, an SRV record under _sips._tcp names the host and port for TLS, so the port in use may not be the one you assume. The free check accepts any port from 5060 to 5099.

How a SIP TLS connection is set up

A SIP TLS connection is set up in a fixed order, and knowing that order makes most failures easy to place.

  1. The client opens a TCP connection to the server's address and port.
  2. It sends a ClientHello listing its TLS versions and cipher suites, with the server's name in the SNI extension so that a server hosting several names can pick a certificate.
  3. The server replies with its chosen version and cipher, its certificate and the intermediate certificates, and may ask for a client certificate in return.
  4. The client checks the certificate's dates, name and chain, and both sides derive the session keys.
  5. Only then is the first SIP request, such as an INVITE, REGISTER or OPTIONS, sent over the encrypted connection.

The connection then stays open and is reused for later requests in both directions, so one handshake can carry hours of calls. That is also why a renewed certificate can take a while to be noticed: peers keep the old connection until it closes.

What a SIP server certificate must get right

A strict peer checks six things before sending any SIP; each row links the guide for a failed check. With DNS SRV, the name to check is the SIP domain, not the SRV target: see SIP DNS and TLS.

CheckWhat passesWhy it mattersGuide
Dates Today falls between the start and end dates Outside that window every verifying peer refuses the connection Expired certificate
Name The FQDN the peer dials is one of the SANs It proves the certificate belongs to this server and not to another host Name mismatch
Chain The server sends its intermediate certificates Most SIP stacks will not fetch a missing intermediate on their own Incomplete chain
Trust The chain ends at a root the peer trusts Carriers and cloud platforms accept only the CAs on their own lists Self-signed or untrusted
TLS version TLS 1.2 or 1.3 TLS 1.0 and 1.1 are deprecated and switched off in current software Old TLS version
Key RSA of 2048 bits or more, or ECDSA, with a SHA-256 signature Short keys and SHA-1 signatures are refused by current TLS libraries Weak key or SHA-1

SIP TLS and SRTP

TLS protects the signalling, not the voice. The audio travels as RTP in separate packets, and encrypting it is the job of SRTP. A call can use TLS without SRTP, which hides who is calling but leaves the audio readable, or SRTP without TLS, which is weaker than it looks.

The reason is key exchange. With SDES, the usual method on SIP trunks, the SRTP keys are written into the SDP in an a=crypto line, so they are only as safe as the TLS connection that carries them. DTLS-SRTP, which WebRTC uses, negotiates its keys in the media path instead. See how PingVo tests calls end to end.

Mutual TLS

In mutual TLS the server also asks the client for a certificate, and refuses peers that cannot show one from a CA it trusts. Some carriers, and Microsoft Teams Direct Routing as an option, use it to limit who may connect. See mutual TLS on SIP trunks.

Microsoft Teams Direct Routing and carriers

Teams Direct Routing connects to your SBC by its FQDN over TLS 1.2 or higher. The FQDN must be the certificate's common name or one of its SANs, a wildcard may cover one level only, and the certificate must chain to a CA in the Microsoft Trusted Root Program. Self-signed certificates are not accepted.

Cloud contact centers and carriers that offer TLS trunks set similar rules, and some are stricter: Genesys Cloud BYOC supports TLS 1.2 and expects the full chain in every handshake.

Our free check trusts the public root store our agent ships with, the same kind of list web browsers use. That list overlaps with Microsoft's and with carriers' without matching them, so a pass is a strong sign, not a guarantee.

How to test SIP TLS

The quickest test is the free SIP OPTIONS and TLS check. It opens one TLS connection from outside your network, reports the certificate's dates, name, chain, TLS version and key, then sends a single OPTIONS over the same connection. From a shell, OpenSSL shows the whole handshake:

openssl s_client -connect sbc.example.com:5061 -servername sbc.example.com -showcerts
  • Certificate chain lists every certificate the server sent, numbered from 0, and a single entry means the intermediate is missing.
  • Verify return code: 0 (ok) means the chain reached a trusted root; any other number names the problem, such as 20 for an issuer it could not find.
  • Protocol and Cipher show the TLS version and cipher suite the two sides agreed on.
  • Adding -noservername shows which certificate the server picks for a client that sends no SNI.
Check your server's certificate from outside. Run a free SIP TLS check

Common SIP TLS problems

Each problem has its own guide with the errors peers log, the usual causes and the fixes in order.

  • Expired certificate: The certificate is past its end date, or its start date has not arrived yet.
  • Name mismatch: The name a peer dials is not one of the names in the certificate.
  • Incomplete chain: The server sends its certificate without the intermediate that links it to a root.
  • Self-signed or untrusted: The certificate is self-signed or comes from a CA that peers do not trust.
  • Old TLS version: The server negotiates TLS 1.0 or 1.1, which current peers refuse.
  • Weak key or SHA-1: The certificate has an RSA key under 2048 bits or a SHA-1 signature.
  • Mutual TLS: The server asks the connecting side for a client certificate of its own.
  • Handshake failed: No TLS session could be set up, so no SIP was sent at all.

Certificate monitoring

A check from outside is a snapshot. PingVo monitoring reads the certificate on your TLS Routes at least once an hour, alerts you 30, 14 and 7 days before it expires, and can also alert on name, chain, trust and weak TLS problems as they appear.

SIP TLS questions

Which port does SIP TLS use?

Port 5061 over TCP by default, but a server's configuration or DNS SRV record can name another. The free check accepts ports from 5060 to 5099.

Does SIP TLS encrypt the audio?

No. TLS covers the SIP messages only. The audio is encrypted separately with SRTP, and with SDES its keys are exchanged inside the SDP that TLS protects.

Why does my SBC have a valid certificate but Teams still rejects it?

Teams checks things this page cannot see: that the CA is in Microsoft's Trusted Root Certificate Program, that the SBC's FQDN is configured in your tenant, and that the SBC sends the full chain. An incomplete chain, or a certificate name that differs from the configured FQDN, is the most common cause.

Do you store my certificate?

We keep the certificate details shown on the result, such as its names, issuer, dates and fingerprint, with the check for 30 days to prevent abuse. We do not keep the certificate file, and a check never sees a private key.

Hear about a certificate problem before your callers do

PingVo reads your SIP servers' certificates at least once an hour and warns you 30, 14 and 7 days before one expires, alongside line checks and real test calls.

Start free trial

14 days · full Pro features · no credit card