Enable SSH in GUI: https://unifi.ubnt.com
SSH into router
Run the following commands
configure
set traffic-policy shaper downstream description downstream-policy
set traffic-policy shaper downstream bandwidth 80mbps
set traffic-policy shaper downstream class 10 description rtp
set traffic-policy shaper downstream class 10 bandwidth 25%
set traffic-policy shaper downstream class 10 ceiling 100%
set traffic-policy shaper downstream class 10 priority 7
set traffic-policy shaper downstream class 10 match voip-rtp ip dscp 46
set traffic-policy shaper downstream class 10 match voip-rtp-ipv6 ipv6 dscp 46
set traffic policy shaper downstream class 10 burst 2.5k
set traffic-policy shaper downstream class 20 description sip
set traffic-policy shaper downstream class 20 bandwidth 15%
set traffic-policy shaper downstream class 20 ceiling 100%
set traffic-policy shaper downstream class 20 priority 7
set traffic policy shaper downstream class 20 burst 2.5k
set traffic-policy shaper downstream class 20 match voip-sip ip dscp 26
set traffic-policy shaper downstream class 20 match voip-sip-ipv6 ipv6 dscp 26
set traffic-policy shaper downstream class 10 burst 15k
set traffic-policy shaper downstream default bandwidth 60%
set traffic-policy shaper downstream default ceiling 100%
set traffic-policy shaper upstream description upstream-policy
set traffic-policy shaper upstream bandwidth 30mbps
set traffic-policy shaper upstream class 10 description rtp
set traffic-policy shaper upstream class 10 bandwidth 50%
set traffic-policy shaper upstream class 10 ceiling 100%
set traffic-policy shaper upstream class 10 priority 7
set traffic-policy shaper upstream class 10 burst 2.5k
set traffic-policy shaper upstream class 10 match voip-rtp ip dscp 46
set traffic-policy shaper upstream class 10 match voip-rtp-ipv6 ipv6 dscp 46
set traffic-policy shaper upstream class 20 description sip
set traffic-policy shaper upstream class 20 bandwidth 10%
set traffic-policy shaper upstream class 20 ceiling 100%
set traffic-policy shaper upstream class 20 priority 7
set traffic-policy shaper upstream class 20 burst 2.5k
set traffic-policy shaper upstream class 20 match voip-sip ip dscp 26
set traffic-policy shaper upstream default bandwidth 40%
set traffic-policy shaper upstream default ceiling 100%
set traffic-policy shaper upstream default burst 15k
set interfaces ethernet eth2 traffic-policy out upstream
set interfaces ethernet eth0 traffic-policy out downstream
commit ; save
exit
RingCentral is flagging SIP packets with 26. If your phone is using 24, change it.
References;
https://help.ubnt.com/hc/en-us/articles/205198380-EdgeRouter-Quality-of-Service-for-Voice-Over-IP-QoS-for-VoIP-
https://community.ubnt.com/t5/EdgeRouter/QoS-for-VoIP-Port-Priority-policies/td-p/1599025
https://community.ubnt.com/t5/EdgeRouter/QOS-by-ip-range/td-p/518069
https://community.ubnt.com/t5/EdgeRouter/EdgeOS-QOS-for-Port-and-VOIP/td-p/1337155
https://help.aircall.io/hc/en-gb/articles/115003395069-Setting-up-QoS-on-the-Ubiquiti-EdgeRouter-Pro-for-Aircall
https://blog.gruby.com/2015/08/25/setting-up-qos-on-the-edge-router-lite/