The caller answers, both people talk, and then the line goes dead. Not at random: users swear it happens at the same point every time. When VoIP calls drop after 30 seconds, or after exactly a quarter or half hour, or only when someone parks a caller on hold, the cause is almost never bandwidth or a bad handset. It is a protocol timer firing, and the drop time tells you which one.

SIP has three timers that commonly end established calls on a schedule. Each leaves a different fingerprint in a packet capture and needs a different fix, so time five or six failed calls from the call records first.

Which timer matches your drop time?

  • About 30 to 32 seconds after answer. The 200 OK that answered the call never received its ACK. This is RFC 3261 transaction timing, and the cause is almost always addressing: NAT, a private IP in a Contact header, or an ACK sent to the wrong place.
  • At a fixed longer interval, such as 15, 30 or 60 minutes. A SIP session timer (RFC 4028) expired because a session refresh failed or was never sent.
  • While on hold or muted, after a set number of seconds of silence. A media inactivity timeout on the PBX or the far end saw no RTP and hung up.

Why does a call die at about 32 seconds?

A SIP call is set up with a three-way handshake: INVITE, then a 200 OK when the call is answered, then an ACK from the caller confirming it received the 200 OK. RFC 3261, section 13.3.1.4, tells the side that answered to keep retransmitting the 200 OK until the ACK arrives. The interval starts at T1 and doubles for each retransmission until it reaches T2. Appendix A of the RFC sets the defaults: T1 is 500 ms, described as the round-trip time estimate, and T2 is 4 seconds.

The same section sets the deadline. If the server retransmits the 2xx response for 64*T1 seconds without receiving an ACK, the session should be ended, and the RFC says this is accomplished with a BYE. With the default T1 of 500 ms, 64*T1 is 32 seconds. The RFC's timer table lists the same 64*T1 value as Timer H, the wait time for ACK receipt.

That explains the symptom. Audio works, because SDP was already exchanged in the INVITE and the 200 OK, but the answering side is still waiting for an ACK, and after 32 seconds it sends BYE. Twilio documents this precisely as error 32022, ACK not received from your SIP endpoint: Twilio sent a 200 OK for an inbound SIP call and did not receive an ACK from your SIP endpoint within 32 seconds, and then terminated the call.

Where the ACK goes missing

RFC 3261, section 13.2.2.4, has the caller's user agent generate an ACK for each 2xx and pass it to the transport layer directly, not through a client transaction. Its destination comes from the dialog: the Contact header in the 200 OK and any Record-Route headers. If either of those carries an address the ACK cannot reach, the ACK is lost. Twilio's error page lists the causes it sees:

  • NAT configuration preventing the ACK from reaching Twilio.
  • A firewall blocking SIP signaling.
  • The endpoint sending the ACK to the wrong IP address, or building it with an incorrect Request-URI or Route headers.
  • SIP infrastructure rewriting Twilio's IP addresses in the ACK or related headers.
  • Packet loss between the network and Twilio.

Twilio's trunking troubleshooting guide covers the mirror case, for calls coming into your PBX: if the PBX puts a private address in its Contact header, the ACK never reaches your SIP infrastructure, so the call times out and is torn down. Its advice is to use publicly routable IP addresses in the Contact header and to send the ACK to the IP address in the Contact header of the far end's 200 OK.

Why does a call die at 15 or 30 minutes?

RFC 4028 adds session timers so that a call whose BYE was lost does not stay up forever on a proxy or SBC. The caller proposes an interval in a Session-Expires header. The RFC sets the absolute minimum at 90 seconds and recommends 1800 seconds, 30 minutes. A Min-SE header carries the lowest value an element accepts; if the request asks for less, the answer is 422 Session Interval Too Small, which must contain a Min-SE header.

The refresher parameter, either uac or uas, says which side keeps the session alive. The RFC recommends that the refresh be sent once half the session interval has elapsed, as a re-INVITE or an UPDATE, and recommends UPDATE when the peer is known to support it. If the refresh times out or gets a 408 or 481 response, the side that sent it sends BYE. If no refresh arrives at all, the other side should send BYE slightly before the session expires; the RFC recommends doing so the minimum of 32 seconds and one third of the interval early.

Put numbers on that. With the recommended 1800 seconds, a refresh is due at 15 minutes. A refresh that times out or gets a 408 or 481 ends the call at about 15 minutes. A refresh that is never sent ends it just before 30 minutes, at roughly 29 minutes and 28 seconds, because the non-refresher hangs up 32 seconds early. A 3600 second interval moves the same pattern to 30 and 60 minutes.

The usual refresh failures

  • The far end does not accept UPDATE. Cisco's CUBE session refresh guide offers, as fixes, disabling UPDATE for session refresh with a SIP profile, or setting session refresh to INVITE instead of UPDATE on CUCM 10.x and later.
  • One side does not support timers at all. Twilio's troubleshooting guide states that Twilio does not support session timers and removes the Supported: Timer header, that a PBX should then ignore the Session-Expires value but many do not, and that a 422 Session Timer Too Small failure can follow. Its workaround is to set the PBX Session-Expires to a usual default such as 1800 or 3600.
  • Both sides think the other is the refresher. The 200 OK states the refresher. If neither side then sends anything at the halfway mark, the session expires.

In Asterisk with PJSIP, the endpoint options are timers (default yes), timers_min_se (default 90) and timers_sess_expires (default 1800). Cisco's guide gives CUBE's Min-SE default as 1800 seconds and notes that CUCM sends 1800 by default, which can be raised to 86400.

Why does a call die on hold or mute?

A PBX can be set to hang up a call that has gone quiet at the media level, on the theory that the other side has vanished. In Asterisk's PJSIP endpoint settings, rtp_timeout is the maximum number of seconds without receiving RTP while off hold before the call is terminated, and rtp_timeout_hold is the same limit while on hold. Both default to 0, which disables them, so a drop here means someone set a value.

RFC 3264 describes hold: a stream that was sendrecv is placed on hold by marking it sendonly, and a stream that was recvonly is placed on hold by marking it inactive. A held party may legitimately send no audio for minutes. If the hold signaling did not reach the PBX, or a device stops sending RTP during silence, an inactivity timer reads that as a dead call. The fixes are to raise or clear the timeout, or to send keepalives: Asterisk's rtp_keepalive sets the number of seconds between RTP comfort noise keepalive packets.

What to look for in the capture or log

Capture at the PBX or SBC, on the WAN-facing side if possible, and reproduce one drop. In Wireshark, Telephony then VoIP Calls lists every detected call, and Flow Sequence draws the selected call's messages as a ladder. Then check:

  • A row of identical 200 OKs, roughly 0.5, 1, 2 and then 4 seconds apart, followed by BYE at about 32 seconds: the ACK is missing. Compare the Contact and Record-Route of that 200 OK with the address the ACK was sent to, if one was sent at all.
  • Session-Expires and refresher in the INVITE and 200 OK, then whatever happens at half the interval: a re-INVITE or UPDATE that times out, gets a 408, 481 or 422, or never appears at all.
  • RTP that stops before the BYE, with the BYE coming from the PBX: an inactivity timer.

Worked example: outbound calls that die at 32 seconds

A 60 person office moves its PBX behind a new firewall. Inbound calls are fine. Every outbound call to a customer connects, both sides talk, and the call drops at about half a minute. The trunk provider's portal shows error 32022 on each one.

The capture on the PBX's LAN interface shows the INVITE leaving, a 200 OK coming back from the provider, and then the same 200 OK arriving four more times. The PBX does send an ACK, but to the provider's internal address copied from a header the firewall rewrote, and the provider keeps retransmitting until it sends BYE at 32 seconds. Twilio's guidance names this exact pattern: do not replace the provider's IP addresses in the ACK, and rewrite only your own addresses when NAT handling is required.

The admin turns off the firewall's SIP header rewriting, so the PBX alone handles NAT, and sets the PBX to advertise the public address in its Contact. On an Asterisk PJSIP system that means the transport's external_signaling_address, external_media_address and local_net, with rewrite_contact and rtp_symmetric considered for remote phones; Asterisk documents rewrite_contact as allowing the Contact header to be rewritten with the source IP address and port, default no. The next capture shows one 200 OK, one ACK, and a call that lasts as long as the people on it want.

Where this goes wrong

  • Raising T1 or Timer H to hide the problem. A longer timer only moves the drop. The ACK is still not arriving.
  • Two devices doing NAT fixes. A firewall's SIP helper and a PBX that also rewrites addresses can each be right alone and wrong together.
  • Turning session timers off everywhere. They exist to clear calls whose BYE was lost. Fix the refresh method or the refresher instead.
  • Setting rtp_timeout without hold in mind. A value that cleans up dead calls in seconds will also cut off a customer waiting on hold.

The decision rule

Time the drop before you touch anything. About 32 seconds means the ACK is lost: fix the Contact, Record-Route and NAT path until one 200 OK gets one ACK. Half or all of a round interval means a session refresh failed: read Session-Expires and the refresher in the 200 OK, then fix the refresh method or the interval. A drop only on hold or mute means an RTP inactivity timer: raise it, clear it, or send keepalives. If the drop time matches none of these, stop looking at SIP timers and look at the network.