SIP ALG (Session Initiation Protocol Application Layer Gateway) is a feature in many routers and firewalls that reads VoIP call signaling as it passes through and rewrites the private IP addresses and ports written inside it, so that calls can cross network address translation (NAT). It was designed to help phones work behind a router, but when its changes clash with how the phone provider already handles NAT, the usual results are one-way audio, calls that drop at the same point every time and phones that stop receiving calls, which is why many VoIP providers ask customers to turn it off.
The feature is switched on by default on many devices and is rarely labeled in a way that explains what it does. If your office phones run over the internet, as any VoIP handset or hosted phone system does, it is one of the first settings worth checking when calls misbehave in ways that sound like a network problem but are not caused by a slow connection.
Why SIP has trouble with NAT
Almost every office uses private addresses inside its network. The firewall or carrier gateway translates them to a public address on the way out, and translates replies back on the way in. For web browsing and most cloud apps this works without anyone noticing, because NAT only has to rewrite the address on the outside of each packet.
SIP, the protocol most business phones use to set up calls, is different in two ways:
- Addresses travel inside the message. When a phone starts or answers a call, its SIP message includes a description of where it wants to receive audio: an IP address and a port. Behind NAT, that is a private address the far end cannot reach.
- Audio travels separately. The voice itself moves in a separate stream (RTP) on ports agreed during call setup. A firewall that only tracks the signaling connection does not know those ports exist, so it may block the audio coming back.
Without some kind of fix, the call connects and both phones show it as active, but audio from one side is sent to an address that does not exist on the internet. The caller hears the other party, and the other party hears silence.
What an ALG does
An application layer gateway is a helper inside a firewall that understands one specific protocol and adjusts traffic for it. A SIP ALG watches for SIP messages, swaps the private addresses inside them for the public address, and opens temporary openings, often called pinholes, for the audio ports it sees agreed in each call. When the phone system has no NAT handling of its own, this can make calls work that otherwise would not.
Vendors use different names for the feature, such as SIP helper, SIP inspection or SIP fixup, and some firewalls have more than one SIP-related setting. The name on the screen matters less than what the setting does to the messages.
Why SIP ALG often breaks calls
Most hosted phone providers solved the NAT problem on their own side years ago. Phones register outward to the provider and keep that connection open, and the provider's servers or session border controller send audio back to the address the packets actually came from, whatever the phone wrote inside its messages. When an ALG also rewrites those messages, two fixes collide. Common causes of trouble:
- The ALG rewrites some addresses in a message and misses others, so the two ends disagree about where audio should go.
- It closes a pinhole sooner than the phone expects, so inbound calls stop arriving until the phone registers again.
- It mishandles messages sent in the middle of a call, such as hold, resume and transfer.
- Two devices in a row, such as a carrier gateway and your own firewall, both run an ALG and both rewrite the same message.
- It does not recognize SIP on a non-standard port, or when signaling is encrypted with TLS it cannot read the messages at all, so its behavior becomes hard to predict.
| Symptom | How SIP ALG can cause it | Other common causes |
|---|---|---|
| One-way or no audio | Audio address rewritten wrongly, or the return path never opened | Firewall rules, double NAT |
| Calls drop at the same point every time, often around 30 seconds in | A signaling reply is altered or lost, so the call is never confirmed | Firewall session timeouts |
| Phones can dial out but not receive calls | The opening used for registration is closed early or rewritten | Registration interval longer than the firewall's timeout |
| Hold, resume or transfer fails | Mid-call messages rewritten inconsistently | Provider or phone settings |
| Phones flip between registered and unregistered | Registration messages altered or timed out | Unstable connection, power over Ethernet problems |
Choppy or robotic audio is usually a different problem: packet loss, jitter or a full upload. Our guide to VoIP call quality troubleshooting matches each symptom to its likely cause.
Should you turn SIP ALG off?
Often, yes. Many VoIP providers recommend turning it off and allowing the specific addresses and ports their platform uses instead. That said, the right setting depends on the provider and on the firewall. A few setups still rely on the ALG, for example older phone systems with no NAT handling of their own, and some business firewalls have a more complete SIP feature that a provider may ask you to keep. Ask your provider for its guidance for your exact device, and get it in writing before install day.
Turning SIP ALG off does not open your network. The firewall still blocks unsolicited inbound traffic; it simply stops editing phone signaling. Two practical notes: changes often take effect only after the firewall clears existing sessions or the phones register again, and a firmware update or factory reset can turn the feature back on. Our small business firewall guide covers how to keep firewall settings documented and backed up.
How to check whether SIP ALG is the problem
- Match the symptom against the table above. If audio is choppy rather than missing, look at the connection first.
- List every device that translates addresses between the phones and the internet: the carrier's gateway, your own firewall and anything else in the path. If a connection sits behind carrier-grade NAT, there is another translation layer you cannot configure, which is worth knowing when calls fail only on that line.
- Check the SIP setting on each device. If the gateway belongs to the carrier, ask the carrier rather than changing it yourself.
- Change one device at a time, following the provider's guidance, then restart the phones or let them register again.
- Test properly: inbound and outbound calls, hold, transfer, a call longer than five minutes, and calls from both wired phones and Wi-Fi softphones.
- Write the setting down in your network notes, so the next firmware update or replacement firewall does not quietly undo it.
SIP ALG vs a session border controller
Both deal with SIP crossing a network edge, but they are built for very different jobs.
| SIP ALG | Session border controller | |
|---|---|---|
| What it is | A feature inside a general-purpose router or firewall | A dedicated device or service built for voice |
| How it handles NAT | Rewrites messages as they pass, using built-in rules | Terminates each call and rebuilds it by configured rules |
| Control | Usually on or off, with few options | Detailed settings per trunk or provider |
| Security role | Little beyond the firewall's normal filtering | Limits who can reach the phone system and blocks toll fraud attempts |
| Typical use | Small offices with simple setups | On-site phone systems connected through SIP trunking, and larger deployments |
Where an SBC or a phone system with its own NAT handling is in place, an ALG in front of it is more likely to interfere than to help.
What to ask your phone provider before install
- Should SIP ALG be on or off on our firewall, and on the carrier's gateway?
- Which addresses and ports do your phones use for signaling and for audio?
- Do you encrypt signaling and audio, and does that change your firewall guidance?
- How often do phones re-register, and what idle timeout should the firewall use for them?
- Does your service work on a backup connection that uses carrier-grade NAT?
The answers vary between hosted phone systems, where phones register straight to the provider, and UCaaS and SIP voice services that connect to an existing phone system.
How FiberX helps
When FiberX quotes phone service, we ask each provider for its firewall guidance, including the SIP ALG setting and the addresses and ports to allow, and we check how the carrier's equipment on the internet circuit will be set up, so the phones and the connection are planned together. We get quotes from several carriers, and the carrier pays us, so there is no markup. Request a quote, or call or text 478-758-8091.