What Is SIP ALG, and Why Does It Break VoIP Calls?

Quick answer. SIP ALG (Session Initiation Protocol Application Layer Gateway) is a feature in router and firewall firmware that inspects SIP signaling passing through it and rewrites addresses in an attempt to help calls traverse NAT. In practice, most implementations rewrite headers they shouldn’t, mangle the ones they do touch, or silently drop messages mid-dialog. The result is the classic home-worker symptom set: one-way audio, calls that drop at exactly 32 seconds, and registrations that work while calls fail.

If you support VoIP for a living, SIP ALG is the single most common cause of “it works in the office but not from home” you will ever troubleshoot. This page explains what the feature is actually trying to do, why it fails, how to recognize it, and how to get rid of it — on any router.

What SIP ALG is supposed to do

A SIP endpoint behind NAT has a problem: the IP addresses and ports it stamps inside its own signaling (in the Via, Contact, and SDP headers) are private LAN addresses like 10.0.0.14. The far end tries to reply to an address that doesn’t exist on the public internet, and the call dies before it starts.

SIP ALG is the router’s attempt to fix that. When it sees SIP traffic on its well-known ports, it:

  1. Rewrites the private addresses in Via and Contact to the router’s public IP, so the far end replies to something reachable.
  2. Opens pinholes in the NAT/firewall for the media (RTP) ports advertised in the call’s SDP, so audio flows without manual port forwarding.

It’s a reasonable idea on paper. SIP traversing NAT is a real problem. The issue is the execution.

Why it breaks calls instead of fixing them

It rewrites what it doesn’t understand

SIP has grown far beyond what consumer-router firmware teams test against. ALGs routinely:

  • Rewrite Via and Contact incorrectly — wrong port, wrong transport, or a mangled IP — so replies and in-dialog messages (ACK, BYE, re-INVITE) never reach the endpoint.
  • Leave SDP carrying the private IP for RTP while rewriting the signaling, so media goes to a dead address → one-way or no audio.
  • Corrupt message bodies when SIP runs over TLS (they can’t read it, but some try anyway) or when messages exceed a single UDP datagram and get fragmented.

The 32-second signature

The most recognizable ALG failure: a call connects, audio flows, and the call drops at exactly 32 seconds, every time.

The mechanism is in RFC 3261. When your SBC or endpoint sends a 200 OK, it starts Timer H (64×T1 = 32 seconds) waiting for the ACK that confirms the call. If the router’s ALG rewriting corrupts or drops that ACK, the timer expires and the call is torn down at precisely 32 seconds. A drop at exactly 32s isn’t a flaky network — it’s a protocol timeout, and it points straight at whatever sits in the signaling path. Our three router-specific walkthroughs (linked below) all show this trace.

Firmware toggles that don’t toggle

The final insult: on many routers the “disable SIP ALG” setting exists but doesn’t fully work, or only covers some of the inspection paths. You check the box, reboot, and calls still drop. That’s why verifying behaviorally — not trusting the admin page — matters; see how to test for SIP ALG.

The symptoms checklist

You’re almost certainly looking at SIP ALG if you can tick several of these:

  • Calls drop at exactly 32 seconds (Timer H expiry after a mangled ACK)
  • One-way audio — signaling completed but RTP went to a rewritten, dead address
  • Registration succeeds but calls fail (the ALG only touches certain methods)
  • Failures only behind one specific router or ISP — same phone, same server, works elsewhere
  • Problems appear on 5060/5061 but vanish on port 5062 (ALGs inspect the well-known ports only)
  • Fixed by putting the phone in the router’s DMZ (a big hint the ALG is the culprit — and a bad long-term fix)

How to get rid of it

In order of preference:

  1. Disable it in the router admin. Look for “SIP ALG”, “SIP passthrough”, or ALG settings under firewall/advanced. On business gateways this often needs the device-label admin account, not the user account. Reboot after saving.
  2. If the toggle is missing or ineffective, move signaling to port 5062. SIP ALG inspection applies to 5060 and 5061. A SIP client or SBC edge listening and sending on 5062 passes through untouched — NAT handles it as ordinary UDP/TCP traffic. This works even on firmware where “disabled” ALG keeps rewriting.
  3. Take the router out of the signaling path. Site-to-site VPN, or a proper SBC as the NAT traversal point instead of letting a $79 gateway do session-edge work it was never built for.

Router-specific walkthroughs we’ve written

Before you change anything, confirm the diagnosis: how to test for SIP ALG — including the 32-second call test, a capture diff, and a free online ALG scanner that compares your signaling on 5060 against 5062.

The managed answer

If you run VoIP for clients, you will hit SIP ALG again — every new home worker with a fresh ISP router is a new lottery ticket. VoipFlow exists partly for this: it’s a white-labeled cloud SBC for MSPs that runs tenant signaling on port 5062 precisely so ISP ALG rewriting never engages, with per-tenant isolation, flat-rate pricing, and certificate automation included. If you’d like to stop burning truck rolls on $79 routers, the 14-day sandbox is free — no credit card, no sales follow-up unless you ask.