// SIP TLS

Expired SIP TLS certificate

A certificate is only valid between two dates, its notBefore and notAfter fields. When a SIP client connects over TLS it compares those dates with its own clock, and if the current time falls outside that window it closes the connection. This applies to any SIP server that presents a certificate, whether it is a PBX, an SBC, a proxy or a provider's edge.

Expiry is unforgiving because it hits every peer at the same moment. Trunks that were fine a minute earlier refuse to connect, phones that register over TLS drop off at their next refresh, and new calls fail before a single SIP message is exchanged. The mirror case, a certificate that is not yet valid, usually points to a wrong clock or a certificate installed before its start date.

Error messages you may see

  • certificate has expired
  • certificate is not yet valid
  • x509: certificate has expired or is not yet valid
  • remote error: tls: expired certificate

Common causes

  • The renewal date was tracked by hand, and a one-year certificate ran out while nobody was watching.
  • An automated renewal wrote the new certificate to disk, but the SIP service never reloaded it and still presents the old one.
  • Only one node of a cluster or HA pair got the new certificate, so calls fail whenever DNS or a load balancer sends a peer to the other node.
  • An intermediate certificate in the installed bundle expired before the server certificate did, which peers report as an expiry one level up the chain.
  • The clock on the server or on the peer is wrong, often because NTP is blocked, so a valid certificate looks expired or not yet valid.

How to fix it

  1. Read the dates the server actually presents over the network, rather than those of the file you think it loads.
  2. Renew the certificate with your CA and install it together with its current intermediate, not the server certificate alone.
  3. Reload the TLS listener of the SIP service, then close long-lived TLS connections so peers reconnect and see the new certificate.
  4. Repeat the installation on every server behind the same name, and check each one by its own address.
  5. Turn on NTP on the SIP server and confirm its clock before installing a certificate whose start date is close.

Platform notes

  • Microsoft Teams Direct Routing: After renewing the SBC certificate, Microsoft says to remove the TLS connections opened with the old one and re-establish them, for example by restarting the SBC in a quiet period.
  • Kamailio: The tls.reload RPC command re-reads tls.cfg but not modparam() settings, and connections already open keep the old certificate until they close.

How the free check shows it

The Dates row of the free check fails with "Expired on" or "Not valid until" and the date, and warns once 30 days or fewer are left. On a monitored TLS Route, PingVo reads the certificate at least once an hour and by default alerts you 30, 14 and 7 days before it expires, and again if it does.

See what your server presents. Run a free SIP TLS check

Questions

Why did every trunk fail at the same moment?

Each peer checks the same end date against its own clock. Once that date passes, every new TLS connection is refused at once, which can look like a network outage until someone reads the certificate.

I installed the new certificate. Why do peers still see the old one?

The service may not have reloaded it, another server behind the same name may still have the old file, or a peer is reusing a TLS connection opened before the change.

Does an expired certificate cut calls that are already up?

Usually not. The certificate is checked when a connection opens, so calls on an existing connection carry on while new ones fail.

Related problems

Know a line is down before your callers do

Line checks, real test calls and IVR verification for your call-center numbers, with alerts that say whose side failed.

Start free trial

14 days · full Pro features · no credit card