SIP ALG

Quality Issues?

What is SIP ALG and why you should turn it off?

If you are struggling with one way audio, missed calls or VoIP callings failing, read our handy guide which explains the most common culprit of these issues, SIP ALG.

White wifi router with two antennas on a black surface against a plain white background.

What is SIP ALG

SIP ALG (Session Initiation Protocol Application Layer Gateway) is a technology found in most broadband routers and is usually enabled as a default setting.

The aim of SIP ALG is to help users initiate SIP calls more reliably. Essentially, SIP ALG is a network address translation (NAT) tool that converts private IP addresses and ports into public ones.

As an independent firmware program, SIP ALG aims to prevent firewall-related issues on routers. It inspects and modifies the SDP (Session Description Protocol) portion of data packets to ensure they are sent correctly. Since VoIP converts audio data (voice) into packets sent over the internet, this should theoretically maintain call quality.

However, SIP ALG often ends up hindering SIP call quality due to the complex nature of SIP and the sensitivity of data packets. This is why many SIP trunking providers, including ourselves, recommend disabling this feature on your router for best results.

How SIP interacts with the protocol

To grasp why SIP ALG poses issues for modern SIP phone systems, consider the five-step process involved in making a SIP call. SIP facilitates the opening and closing of data connections, but a SIP call involves several intermediary steps. Here are the five key stages:

  1. The Invitation Stage: This is when you initiate a call by reaching out to another party. The invite starts from your end.

  2. The Invitation Response Stage: Upon establishing the connection, a response is sent back to the caller.

  3. The Answering Stage: This stage acknowledges the incoming call, not the call itself. It begins at the recipient's end.

  4. The Confirmation Stage: This is the final acknowledgment of the call connection, sent from the caller's side.

  5. The Call Stage: After these four steps, the actual call takes place, establishing a two-way connection.

Although this process might seem complex and data-intensive, it occurs within seconds. The issue arises because the five-step connection process increases the likelihood of packet loss when ALG modifies the data during transmission.

Why should SIP ALG be disabled?

Whilst on an active SIP or VoIP Call, the ALG's modification of data packets can be problematic, especially given its poor implementation on most commercial routers. While ALG aims to enhance connection clarity, its erratic packet modifications often result in the opposite effect.

Every time the system confirms and acknowledges a connection attempt, the ALG alters the SIP packets being transmitted. This is due to the conversion from private to public IP addresses and ports being handled by scripting. Scripting can be risky—sometimes, crucial parts of the message are lost during translation. This can impact VoIP calls in several ways:

  • Lost Connections: Entire calls can be dropped due to this router service. When data is lost and unrecoverable, disconnections are common.

  • Reduction in Call Quality: Packet loss during internet-based calls can cause static, sound lapses, or echoing. Modifying the call data degrades transmission or reception quality.

  • One-Way Audio: If you can hear the other party but they can't hear you, it's typically due to poor firewall settings or ALG modifying packets, resulting in audio loss on one end.

  • Failed Registrations: Multiple acknowledgments are required during a call. If any fail, the call won't connect, leading to a failed registration, often caused by SIP ALG operating in the background.

With SIP calls, there's a higher chance of incorrect data packet modifications, adversely affecting call quality. Fortunately, disabling the router service is usually straightforward via the router's web interface. If this feature isn't available on your device, consider upgrading to a new router.

How to disable SIP ALG on your router

Accessing your router’s interface is generally straightforward. Most routers have the IP address for the interface printed on a label, along with the default login credentials, allowing you to change settings via a browser. Typically, manufacturers set the default login as “admin” for the username and “password” for the password, although some routers may not require a password. For commercial routers, it’s advisable to change these default credentials to something more secure.

However, not all router brands make it easy to disable certain features. Here are some common methods for the most popular router manufacturers. Note that Cisco routers have a more complex process, requiring command line access to modify settings.

  • The default LAN IP for Draytek routers is 192.168.1.1

    • Click on NAT

    • Click on ALG

    • Untick the Enable ALG box

    • Click OK

    • Reboot your Draytek Router

  • The default LAN IP for TP Link routers is 192.168.1.1

    • Click on Advanced Setup

    • Click on NAT

    • Click on ALG

    • Untick the box labelled SIP ALG

    • Click Save or Apply

    • Reboot your TP Link Router

  • The default LAN IP for Netgear routers is 192.168.0.1

    • Click on Advanced

    • Click WAN Setup

    • Check the box called Disable SIP ALG

    • Click Apply

    • Reboot your Netgear

Don’t struggle with SIP

If you are having trouble with SIP ALG and VoIP Calls then RJ Cortel will be happy to help you. Having been established since 2001, we have worked with various systems and networks and helped our clients resolve troublesome issues.

We also provide VoIP platforms, SIP Channels and Managed Firewalls, ensuring that these issues will never happen again. Feel free to reach out to our team who will be happy to assist you.