Setting up QOS for VoIP on a UniFi Security Gateway

Setting up QOS for VoIP on a UniFi Security Gateway

Activating the Smart Queue

UniFi Security Gateway offers a Smart Queue option based on Fair Queuing and Codel which prioritizes traffic and reduces delays when the router/bandwidth becomes overloaded. Activating this option will give priority to all traffic coming in and out of Aircall over other applications on the network.

However, please note that activating the Smart Queue may reduce the maximum throughput. It is then strongly recommended to monitor the available speed with and without Smart QoS enabled.

    • Go to your UniFi controller and select the Settings
    • Select Networks in the blue tab


  • In your network list, select the WAN network that you will be using for your VoIP service
  • Scroll down to the Common Settings section and click on enable smart queues


  • Perform the speed test build into the UniFi interface by selecting pre-populate (or by using any other speed test)
  • Click on Enable Smart Queues and the fields "Up Rate" and "Down Rate" will appear. Click on Pre-populate to automatically set 80% of the Up and Down bandwidth.
  • Click Save *Please note that this may restart your USG so we recommend that you perform this outside of business hours.

The QoS is now configured on the Security Gateway.

Opening Ports

In order to make sure that traffic won't be blocked at the port level its necessary to open a specific set of ports:

Access your UniFi dashboard and navigate to Settings Routing & Firewall Firewall LAN IN

Click on "+ Create a new rule" and set the settings to:

  • Enabled: On
  • Before predefined rules
  • Action: Accept
  • Protocol: TCP and UDP
  • Leave the default settings in Advanced
  • Source type: Address/port Group

Address group: create a new group named VoIP with the type being Address and add the list of corresponding IPs to your VoIP Provider.  

Port group: create a new group named VoIP_port and select Port in the Type option. Add the following ports

      • TCP: 443, 5349, 10194
      • UDP & TCP : 3478 + from 10000 to 20000


  • Destination type: Address/port group
    • Address group: VoIP
    • Port group: VoIP_port



Finally, make sure to save these settings.

UniFi Access Points and Switches

By default, The UniFi access points and switches will automatically maps DSCP value to Wi-Fi Multimedia (WMM) priority. Voice is then automatically given highest priority on these devices on no further changes are needed.

    • Related Articles

    • Ubiquiti Unifi UAP-Pro 5GHz Channels Supported

        Ubiquiti Unifi UAP-Pro ? What 5GHz Channels Are Supported? I recently was asked by a customer to assist with planning a Ubiquiti UniFi installation in a large church auditorium. The customer wanted to be able to support the maximum number of users ...
    • How to Upgrade a UniFi Controller on Linux

        I have used the Ubiquiti UniFi product since it first came out and have watched the evolution with excitement because I believe the AP/Controller concept is the future of indoor wireless. Ubiquiti has done it in their usual fashion by making ...
    • Build a WISP

        Article courtesy of Contents 1 Introduction 2 Legal and commercial requirements 3 BaseStation 4 Minimum requirements: 5 A CALEA compliant system (in the U.S.) 6 STEP BY STEP 7 AP  Wireless Page 8 Clients 9 CPE- Wireless Page 10 CPE- ...
    • Telrad Public to customer setup using breezeview

        Telrad Public to customer setup using breezeview In BreezeView to enable the next field you have to hit TAB key on keyboard to get out of name field and it will unlock the rest of the fields. 1. Go to the EPC and expand the Service Authorization ...
    • Grandstream P-Codes

      P-Code Retrieval One of the most common ways to generate a P-Code Template is to configure the phone using the webUI and exporting the phones configuration, which can be found under Maintance > Upgrade and provisioning. If you are unsure of a P-Code ...