How To Configure QoS For VoIP On Ubiquiti UniFi and EdgeRouter: Prioritization, Ports, and SIP ALG

When deploying VoIP on Ubiquiti gear, even small misconfigurations can lead to jitter, choppy audio, or one-way calls that drive support tickets through the roof. For MSPs managing multiple customer sites — especially those reselling Viirtue’s white-label VoIP — network policy at the edge is where reliability starts.

TL;DR – Configure QoS For VoIP

To deliver reliable VoIP on Ubiquiti gateways, do four things:

  1. Prioritize voice using QoS and DSCP EF 46 for RTP. (Cisco)

  2. Use Smart Queues or shapers to control bufferbloat and contention at the WAN edge. (Ubiquiti Help Center)

  3. Open only the ports you actually need and lock them down by source when hosting an on‑prem PBX. Use UniFi’s Port Forwarding in Network 9.x. (Ubiquiti Help Center)

  4. Disable SIP ALG on UniFi and EdgeRouter. It breaks SIP signaling in many real‑world deployments. (Kixie Support)

When deploying VoIP on Ubiquiti gear, even small misconfigurations can lead to jitter, choppy audio, or one-way calls that drive support tickets through the roof. For MSPs managing multiple customer sites — especially those reselling Viirtue’s white-label VoIP — network policy at the edge is where reliability starts.

This guide walks you through how to configure QoS for VoIP on Ubiquiti UniFi and EdgeRouter, step-by-step. You’ll learn how to:

  • Prioritize voice traffic using DSCP EF (46) for RTP packets

  • Use Smart Queues to control bufferbloat and improve stability

  • Disable SIP ALG, which often breaks SIP signaling

  • And open only the ports your PBX or phones actually need

Whether you’re troubleshooting call quality or standardizing rollout templates for new clients, this configuration helps ensure every call on your Ubiquiti network sounds as professional as your brand.

Why This Matters for MSPs on Viirtue

Voice quality drives end‑user satisfaction and churn. For MSPs reselling Viirtue’s wholesale VoIP, network policy at the customer edge is where call quality is made or lost.

The configuration below standardizes deployments so your crew spends less time firefighting jitter, one‑way audio, and failed registrations, and more time growing MRR.

Before You Start: Quick Checklist to Configure QoS For VoIP

  • Confirm circuit speeds with an off‑peak, wired test. You will set QoS caps just below the true line rate.

  • Confirm your voice endpoints mark RTP as DSCP EF 46. If not, plan to remark at the gateway or on switch egress. (Cisco)

  • Inventory whether this is hosted phones only or an on‑prem PBX that needs inbound port forwards.

  • Note that enabling certain QoS features can reduce peak throughput and disable hardware offload on some models. UniFi’s QoS rules document this trade‑off, and EdgeRouter QoS also cannot be offloaded. Plan capacity accordingly. (Ubiquiti Help Center)

Part 1: Prioritize Voice on UniFi Gateways

Option A: Use QoS rules in UniFi Network 9.x

  1. Go to Settings.

  2. In UniFi Network 9.4: Policy Table → Create New Policy → QoS. In 9.3: Policy Engine → QoS → Configure. Choose Prioritize. Scope the rule to your voice VLAN, IP group for phones, or destination app category. (Ubiquiti Help Center)

  3. Match your voice traffic. You can target DSCP EF, specific ports, or VoIP app categories.

  4. Save. Note: Enabling QoS rules may reduce maximum throughput, especially on multi‑gig circuits. (Ubiquiti Help Center)

Option B: Smart Queues to fight bufferbloat

Smart Queues apply fq_codel at the WAN edge and are useful on lower‑bandwidth links. Ubiquiti recommends this primarily for ISP speeds under about 300 Mbps. Set Downrate and Uprate a bit below your tested line rate. (Ubiquiti Help Center)

Path: Settings → Internet → [WAN] → Smart Queues in the current UniFi Network, or follow the Smart Queues doc for version specifics. (Ubiquiti Help Center)

Switch‑level DSCP trust and prioritization

If you run separate voice VLANs, you can enforce or trust DSCP at the switch: Ports → [Select Port] → Manual → Enable QoS, then match or remark DSCP and assign queue priority for EF. This helps keep upstream queues clean even before traffic hits the gateway. (Ubiquiti Help Center)

Part 2: Prioritize voice on EdgeRouter (EdgeOS)

Easiest: Smart Queue on the WAN

In the Web UI: QoS → Smart Queue. Choose the WAN interface and set Upload and Download close to real throughput. This reduces bufferbloat and contention. (Ubiquiti Help Center)

Granular: Shape and prioritize DSCP EF (RTP) with CLI

If your phones mark RTP as DSCP EF 46, you can guarantee minimum bandwidth and priority for that class.

				
					configure
# Example shaper with a class for voice EF
set traffic-policy shaper VOICE bandwidth 100mbit
set traffic-policy shaper VOICE default bandwidth 75%
set traffic-policy shaper VOICE class 10 bandwidth 25%
set traffic-policy shaper VOICE class 10 match RTP ip dscp 46
set interfaces ethernet eth0 traffic-policy out VOICE
commit; save
				
			

EdgeOS cannot offload traffic that has QoS applied, so plan for the CPU to do the work. (Ubiquiti Help Center)

Part 3: Disable SIP ALG on Ubiquiti

SIP ALG often rewrites SIP headers in ways that break registration, call setup, or media pinholes. Turn it off.

UniFi gateways, including UDM/UXG/Cloud Gateway

In recent UniFi Network builds, SIP ALG is generally off by default. To verify and disable if needed: Settings → Routing → NAT → Firewall Connection Tracking and toggle SIP off. Some vendor guides document this exact path on current firmware. (Intermedia Support)

EdgeRouter (EdgeOS)

  • GUI: System → Conntrack → Modules → SIP → Disable. (Kixie Support)

  • CLI:

				
					configure
set system conntrack modules sip disable
commit; save
				
			

Legacy USG controllers

If you are on older controllers, the SIP and H.323 toggles live under Routing & Firewall → Firewall → Settings. Set both to Off. (Kixie Support)

Part 4: Open Only the Ports You Need

Hosted phones only

Most deployments do not require inbound port forwards for hosted phones. Allow outbound SIP signaling and RTP, and restrict by destination where possible.

  • SIP: 5060 UDP or TCP for cleartext, 5061 TCP for TLS. (IETF Datatracker)

  • RTP: Many PBXs and SBCs use UDP 10000‑20000 by default, though exact ranges vary by platform. Verify with your provider or PBX. (Sangoma Support)

On‑prem PBX that must receive inbound SIP

Create precise port forwards and restrict source IPs to your provider’s SIP IP ranges.

  • UniFi Network 9.x path: 9.4 uses Settings → Policy Engine → Port Forwarding. 9.3 uses Settings → Policy Table → Create New Policy → Port Forwarding. Follow the prompts to specify WAN, destination IP, port, and protocol. The doc also includes common troubleshooting like double NAT checks. (Ubiquiti Help Center)

Security tip for MSPs: when you must expose SIP 5060 or 5061, restrict by source and log to a SIEM. If possible, prefer TLS 5061 and SRTP, and consider a separate public IP for voice to limit attack surface.

Recommended Baseline for MSP Rollouts

  1. Segmentation: Put phones on a dedicated voice VLAN. Trust or remark DSCP EF 46 for RTP at the switch edge. (Ubiquiti Help Center)

  2. Gateway QoS

    • UniFi: Create a QoS rule that prioritizes your voice VLAN or phone IP group. Consider Smart Queues on sub‑300 Mbps circuits. (Ubiquiti Help Center)

    • EdgeRouter: Use Smart Queue for quick wins, or a shaper matching DSCP EF for fine control. (Ubiquiti Help Center)

  1. Disable SIP ALG: Verify it is off on UniFi and EdgeRouter. (Intermedia Support)

  2. Ports: Avoid blanket forwards if you host a PBX; forward only the specific ports required and restrict the sources. Use UniFi’s Port Forwarding workflow in Network 9.x. (Ubiquiti Help Center)

  3. Capacity planning: Expect reduced peak throughput when QoS rules are active and when hardware offload is disabled. Size gateways accordingly. (Ubiquiti Help Center)

Troubleshooting Fast Path

  • Choppy or robotic audio: Check WAN saturation and bufferbloat first. Set Smart Queue rates slightly below measured line rates, then test MOS again. (Ubiquiti Help Center)

  • One‑way audio: Confirm SIP ALG is off. Verify NAT pinholes for RTP if using an on‑prem PBX and that forwards point to the correct host and range. (Kixie Support)

  • Calls fail to establish: Validate signaling reaches the PBX on 5060 or 5061, and that firewall rules are not dropping provider IPs. Reference your provider’s exact port and IP requirements. (IETF Datatracker)

Final Thoughts: How To Configure QoS For VoIP

Optimizing QoS on Ubiquiti UniFi and EdgeRouter isn’t just about tweaking settings — it’s about protecting call quality, customer experience, and your reputation as an MSP. By prioritizing voice with DSCP EF, managing bandwidth through Smart Queues, disabling SIP ALG, and restricting unnecessary ports, you create a consistent, support-friendly environment that keeps VoIP stable across every deployment.

When paired with Viirtue’s wholesale-first VoIP platform, these network policies give you a foundation for high-quality service and lower churn. Every call sounds clearer, every site behaves predictably, and your team spends less time firefighting and more time growing MRR.

For more technical best practices and configuration examples, visit viirtue.com.

FAQ: How To Configure QoS For VoIP

What DSCP should I use for voice RTP?

EF 46 is the long‑standing recommendation for real‑time voice. (Cisco)

Smart Queues uses fq_codel to control bufferbloat at the WAN edge. You can also build explicit QoS rules to prioritize voice. Use both strategically, depending on bandwidth and hardware. (Ubiquiti Help Center)

Yes. UniFi documents that enabling QoS rules can reduce throughput and disable hardware offload on some models. EdgeRouter QoS also cannot be offloaded. Plan capacity accordingly. (Ubiquiti Help Center)

Not for hosted phones in most cases. You usually open inbound ports only when you host a PBX that must receive unsolicited SIP requests from the internet. If you do, use UniFi’s Port Forwarding and restrict sources. (Ubiquiti Help Center)

Deploy a Fully-Featured Class 5 Softswitch under your own branding

Start Selling VoIP Today

AI Solutions

VoIP & Fax

Viirtue’s free, full-service tool for MSPs.
Free for all Viirtue partners, ViiBE makes quoting and billing seamless, so you can grow your business efficiently while serving your clients better.