Troubleshooting · · The Wafflr team

Why a call drops after 32 seconds: the missing ACK explained

A clock face in the live pocket of a three by three waffle grid

If a call drops after 32 seconds, with a normal conversation up to that point and then a sudden hang-up, the cause is almost always an ACK that never arrived. One side answered the call with a 200 OK, the acknowledgement did not come back, and 32 seconds later the side that answered gave up and ended the call. The fix is to find out why the ACK is getting lost, and it is nearly always an addressing problem: a private IP address in a SIP header, a firewall that allows only part of your carrier's address range, or a router that rewrites SIP messages.

It can happen on inbound calls, on outbound calls or on one trunk only, and it looks like a random hang-up. It is not random. The 32 seconds is a timer written into the SIP standard, which is why the figure is so consistent, and why it points to one place to look.

Why a call drops after 32 seconds

Setting up a SIP call is a three-step exchange. The caller sends an INVITE, the called side answers with a 200 OK, and the caller sends back an ACK to confirm that the answer arrived. The ACK matters because the 200 OK can be lost on the way, so the answering side repeats it until it hears the ACK, whether the signalling runs over UDP, TCP or TLS.

RFC 3261 sets the schedule. The first repeat comes after T1, which is 500 milliseconds by default. The gap then doubles each time until it reaches T2, which is 4 seconds, and stays there. If the answering side has repeated the 200 OK for 64 times T1 without receiving an ACK, it stops, and the standard says the session should be ended with a BYE. Sixty-four times 500 milliseconds is 32 seconds.

CallerAnswering side

  1. Caller to answering side: INVITE
  2. Answering side to caller: 200 OK, the call is answered0 s
  3. Caller to answering side, lost on the way: ACK, which never arrives
  4. Answering side to caller: 200 OK again0.5 s
  5. Answering side to caller: 200 OK again, every 4 seconds7.5 s
  6. Answering side to caller: BYE, the call ends32 s
A call that drops after 32 seconds. The answering side repeats its 200 OK until an ACK arrives, then gives up and ends the call.
Time since the first 200 OK What the answering side does
0 s Sends the 200 OK
0.5, 1.5, 3.5 and 7.5 s Sends it again, after gaps of 0.5, 1, 2 and 4 seconds
11.5 s to 31.5 s, every 4 s Sends it again
32 s Gives up and sends a BYE

These times assume the default T1. A system that sets T1 to one second would wait 64 seconds, so check the value on your own equipment before relying on 32.

The side that sends the BYE is the side that sent the 200 OK. If your phone system hangs up, the ACK did not reach your phone system. If your carrier hangs up, your phone system's ACK did not reach the carrier. That one fact tells you which way to look.

How to see it in a capture

Capture the SIP traffic on the phone system, or as close to it as you can, while you make a test call and let it drop. On Linux this records everything on the usual SIP port:

tcpdump -i any -nn -s 0 -w call.pcap port 5060

Open the file in Wireshark and choose Telephony, then VoIP Calls, then Flow Sequence. A terminal tool such as sngrep shows the same flow live. If your signalling is encrypted with TLS, a capture shows only scrambled packets, so switch on the phone system's own SIP logging instead.

Look for the same 200 OK, with the same Call-ID and CSeq, repeated at the gaps in the table, followed by a BYE about 32 seconds after the first one. Then ask whether the ACK appears at all:

  • On an outbound call, the ACK should leave your phone system moments after the 200 OK arrives. If it never leaves, the problem is inside the phone system or its settings. If it leaves and the carrier never sees it, the loss is somewhere between you and the carrier.
  • On an inbound call, the ACK should arrive moments after your phone system sends the 200 OK. If it does not, capture again on the firewall's outside port. An ACK that is there and missing inside points at the firewall. One that is missing outside as well points at the carrier or the route to you.

Why the ACK goes missing

The ACK for a 200 OK is different from most SIP messages. It does not follow the INVITE's path back as a reply. It is a new request that the caller sends to the address in the Contact header of the 200 OK, through any proxies listed in its Record-Route headers. So an INVITE and a 200 OK can cross the network perfectly well and the ACK can still go to the wrong place.

These are the causes to check, in the order that costs least:

  1. A private address in the Contact header. A phone system or phone behind NAT advertises its own inside address, such as 192.168.1.10, and the other side sends the ACK there. Give the phone system its public address or host name, and tell it which networks are local, in its NAT or external address settings, so that it advertises an address the carrier can reach.
  2. A router that rewrites SIP. A SIP ALG on the router changes addresses inside SIP messages. When it changes some headers and not others, the ACK is addressed to something that does not exist. Switch the ALG off and test the call again. It is the quickest single test on this list.
  3. A firewall that allows too little. Carriers can send signalling from more than one address, so the INVITE may come from one and the ACK from another. Allow the carrier's whole published signalling range, not the single address you saw in one capture, and check whether it uses UDP, TCP or both.
  4. A proxy or session border controller that does not record its route. If a device in the path should add itself to Record-Route and does not, or adds a private address, the ACK skips it or never arrives.
  5. A transport mismatch. The Contact header says the phone system listens on TCP or TLS while the firewall passes only UDP, or the other way round.

Fix one cause at a time and make a test call after each, so that you know which change worked.

Questions people ask about this fault

What does "SIP ACK not received" mean?

It is the wording some carriers use for this fault. Twilio, for example, documents it as error 32022, "ACK not received from your SIP endpoint". The cause is on the path between you and the carrier, not with the person you called.

Why do my calls drop after 30 seconds, not 32?

Counting by ear gains or loses a second or two, and the 32 seconds start when the call is answered, not when you dialled. If calls really end at exactly 30 seconds, or at 60 or 90, look at other timers. A firewall or NAT mapping may be expiring, a media timeout may be ending the call because no audio has arrived for a set time (a one way audio fault can end a call this way), or a session timer may be failing. Session timers cannot explain 30 seconds, because RFC 4028 sets their minimum at 90 seconds.

Can the audio work both ways until the call drops?

Yes, and that is the signature of this fault. Audio does not wait for the ACK, so both people can usually hear each other right up to the BYE.

What other administrators report

Administrators on the 3CX and Asterisk community forums have started threads about the same symptom, with titles such as "Some Call drop after 32S", "SIT TRUNK incoming Call terminates after 32 seconds" and "Call hanging after 32 seconds". Each is one person's system, so treat them as examples of the symptom and not as statements about either product.

In Wafflr

Wafflr is a phone system in development, and it has not launched. Its console has a Diagnostics page for faults like this one. An administrator starts a capture, optionally keeping only the messages that contain an extension, a number or a Call-ID, and the page lists every SIP message the system sends or receives, with the time of each in milliseconds from the first, and draws the call as a ladder diagram with a column for each party. The capture is off until someone starts it, it stops itself after a set time, it keeps a limited number of messages, and starting or stopping it is written to the audit trail with the administrator's name. The order and timing of the messages are on the page instead of in a separate tool.

What to do next

Capture one failing call, look at the gaps between the 200 OKs, and decide whether the ACK left, arrived or never existed. That tells you within minutes which side to investigate. The guide on calls that drop after 30 seconds sets the checks out as a list, and the Wafflr blog collects the other faults and fixes we write up.