What Is SIP ALG (SIP Application Layer Gateway)?

Also called: SIP Application Level Gateway

Related problems: Callers can't hear us, or we can't hear them; Calls drop after about 30 seconds or a few minutes; Desk phones keep losing registration with the phone service; Voice provider says to turn off a firewall setting we've never heard of

A SIP Application Layer Gateway (SIP ALG) is a feature in many firewalls and routers that reads Session Initiation Protocol (SIP) call signaling as it passes through and rewrites the IP addresses and ports written inside it. The goal is to help VoIP calls work through network address translation (NAT). In practice its behavior varies widely by firewall and router, and many voice providers recommend turning it off, because a SIP ALG that rewrites messages the provider already handles is a common cause of one-way audio, dropped calls and phones that won’t stay registered.

At a glance

  • SIP ALG is a firewall or router feature, not a separate device or service.
  • It inspects SIP messages and rewrites embedded addresses and ports so they match the translated public address.
  • Implementations differ by vendor and firmware; some help, and many interfere with hosted phone services.
  • Many hosted phone and SIP trunk providers recommend disabling it and handle NAT traversal on their side instead.
  • It is often enabled by default, so it is worth checking whenever a firewall or router is replaced.

What problem it solves

NAT lets many devices on a private network share a public IP address. It rewrites the address in each packet’s header, which works for most traffic. SIP is different: phones write their own IP address and the port they want to receive audio on inside the signaling messages themselves. Behind NAT, that embedded address is a private one the outside world can’t reach. The provider sends audio to an address that doesn’t work, and the result is one-way audio or silent calls.

SIP ALG was created to fix this at the network edge. The firewall looks inside SIP messages, swaps the private addresses for the public ones, and opens the matching ports for the audio stream, so a phone that knows nothing about NAT can still place calls.

The catch is that most modern hosted phone systems and SIP trunk services already solve NAT another way: the phones send keep-alive traffic, and the provider’s servers or session border controllers learn the real public address from the packets they receive. When the firewall also rewrites the messages, the two methods can conflict. Some ALGs rewrite fields they shouldn’t, mishandle encrypted or non-standard ports, or close audio ports too early, and the buyer sees intermittent problems that are hard to trace.

How it works

Inspection. The firewall watches traffic on the ports SIP commonly uses (often 5060 for unencrypted SIP) and parses the messages that set up, change and end calls.

Rewriting. In each message it replaces private addresses and ports in the headers and in the session description that tells the other side where to send audio. It may also change contact and via headers used for registration and replies.

Pinholes for media. Because it now knows which ports the call’s audio will use, the firewall opens temporary openings for that media and closes them when the call ends.

Where it breaks. Problems usually come from mismatches: the ALG rewrites something the provider expected unchanged, it doesn’t understand a newer or vendor-specific message format, it can’t read encrypted SIP (so it does nothing, or interferes with the connection), or its timers close ports or translations while the call is still up. Results include one-way audio, calls that drop after a fixed time, transfers that fail, and phones that unregister.

Most hosted voice providers publish firewall guidance for common makes and models, usually covering the SIP ALG setting, the ports and address ranges to allow, and NAT timeout values.

When it matters for buyers

  • When moving to hosted voice or SIP trunks. Check the SIP ALG setting at every site as part of the rollout, before users report problems.
  • When replacing a firewall or router. A new device or ISP-supplied gateway may enable SIP ALG by default, and calls that worked last week stop working.
  • When troubleshooting intermittent call problems. One-way audio, dropped calls and registration failures are classic symptoms worth ruling out early.
  • When choosing who owns the edge. If an MSP manages your firewalls and a separate provider runs your phones, agree who sets and documents the voice-related firewall settings.
  • When deciding whether you need an SBC. For larger or more complex voice deployments, a session border controller is often the more controlled way to handle NAT and security for SIP.

Our SIP trunking overview covers how providers connect business phone systems to the public phone network.

Questions to ask vendors

  • Do you recommend SIP ALG on or off for our firewall make and model, and do you publish configuration guides?
  • How does your service handle NAT traversal, and does it rely on keep-alives, an SBC or something else?
  • Do you support encrypted SIP and media, and how does that interact with our firewall’s SIP inspection?
  • Which ports and IP ranges must we allow, and what NAT or UDP timeout values do you recommend?
  • If calls fail after a firewall change, who troubleshoots: you, our MSP or the firewall vendor?
  • Does the ISP-supplied router at any of our sites have a SIP ALG we can’t disable, and can it be put in bridge mode?

How it differs from a session border controller (SBC)

Both deal with SIP at a network boundary, but they are built for different jobs. A SIP ALG is a feature inside a general-purpose firewall or router that rewrites SIP messages so calls can pass through NAT, with little else in the way of voice controls. A session border controller is a dedicated voice element, a device, virtual appliance or cloud service, that terminates SIP on each side, manages the media, normalizes differences between voice systems, enforces call policies and helps protect against voice-specific abuse such as toll fraud. Providers that use SBCs on their side often recommend disabling SIP ALG on the customer’s firewall so the SBC sees the traffic unchanged.

Frequently Asked Questions

Should I turn SIP ALG off?
Often, yes, but check with your voice provider first. Many hosted phone and SIP trunk providers recommend disabling it because their own systems already handle NAT, and a second layer of rewriting can break calls. Some providers and some well-implemented ALGs work fine together, so follow your provider's published firewall guidance for your specific make and model.
How do I know if SIP ALG is causing my call problems?
Typical signs are one-way or no audio, calls that drop at a regular interval, phones that lose registration, and problems that started after a firewall replacement or firmware update. The usual test is to disable SIP ALG on a test basis, restart the phones or firewall sessions, and compare call behavior. Your provider can often confirm from its side by looking at the signaling it receives.
Where is the SIP ALG setting?
It varies by vendor. Some firewalls and routers label it SIP ALG, others call it a SIP helper, SIP inspection or a voice protocol setting, and some have no switch in the web interface and need a command-line change. Some consumer and ISP-supplied routers enable it by default with no way to turn it off, which is one reason businesses replace them.
Is SIP ALG a security feature?
Not mainly. It exists to help VoIP traffic cross NAT. Some firewalls combine it with SIP inspection that can block malformed messages, but it is not a substitute for a session border controller, strong phone passwords or provider-side fraud controls.

You Don’t Need Another Sales Call. You Need an Answer.

30 minutes. No pitch. Just an honest conversation about where you are, what you need, and whether working together makes sense.

We use your details to set up and prepare for the call, and send the newsletter only if you ask for it. Privacy policy.