People often ask us how to set up a QoS (Quality of Service) policy for VoIP (Voice over IP, that is telephony over the internet), so that callers get the best possible audio quality.
The reason they ask is that audio quality on VoIP calls in severe cases on very busy networks can become so distorted that calls can’t be completed.
When you use the internal softphone in Zylinc’s ZyDesk applications (that is Zylinc Contact Center, Service Center, etc), you can prevent that by having a QoS policy in AD (Active Directory). The policy makes sure that VoIP network packets get a high priority, so that they don’t risk getting delayed or lost because of interference from other network packets with lower priorities.
You can set up a VoIP QoS policy for both of the two protocols that VoIP uses:
- SIP (Session Initiation Protocol, used for establishing calls)
- RTP (Real-time Transfer Protocol, used for sending VoIP packets once the calls are up and running)
You set up the policies with something called DSCP values. DSCP stands for Differentiated Services Code Point. As the name implies, it’s a technique for treating network packets differently. In our case, we want VoIP-related packets to have a high priority.
According to industry best practices, you should set SIP traffic to a DSCP value of 24 (also known as Class Selector 3 or CS3), and you should set RTP traffic to a DSCP value of 46 (also known as Expedited Forwarding or EF).
Here’s how to do it:
Prerequisites
Remember that in this article, we focus on QoS on the internal softphone in ZyDesk. If you use another type of softphone, you can very likely set up a QoS policy for that softphone as well, but in this scenario it’s the internal ZyDesk softphone that we deal with.
You need to be able to log in as a domain administrator.
You need to use Group Policy Management. On some servers, you may need to install Group Policy Management Console Tools before you can access Group Policy Management. If you need to install the tools, and you’re in doubt about how to do it, do a quick Google search for install group policy management console, and you’ll get instructions for different Windows versions.
I tried out the following scenario on Windows Server 2019. The procedure is roughly similar on other Windows Server versions. My colleague just tried it on Windows Server 2012, and the main difference was how to access Group Policy Management. On 2019, Group Policy Management is on the Server Manager Dashboard, in the Tools menu.
Procedure
First, set up a QoS policy for RTP:
- On a domain controller, log in as a domain administrator, and go to Group Policy Management
- In the left part of the Group Policy Management window, right-click your domain (you may have to expand a forest first), and select Create a GPO in this domain, and Link it here…
- In Name, give the GPO (Group Policy Object) the name
VoIP RTP
, and click OK - In the left part of the Group Policy Management window, under the domain, right-click the new GPO
VoIP RTP
that you created in the previous step, and select Edit… - In the new window, Group Policy Management Editor, expand Computer Configuration > Policies > Windows Settings
- Right-click Policy-based QoS, and select Create new policy…
- In Policy name, enter
VoIP RTP
- In Specify DSCP Value, enter
46
and click Next - Select Only applications with this executable name, enter
%programfiles(x86)%\Zylinc\ZyDesk\ZyDesk.exe
in the field, and click Next - Make sure that both Any source IP address and Any destination IP address are selected, and click Next
- In Select the protocol this QoS policy applies to, select UDP (yes, RTP runs via UDP)
- Select From this source port number or range, and enter
4000:4063
in the field - Select To any destination port
- Click Finish
Now we’re ready to set up a QoS policy for SIP:
- Go back to the Group Policy Management window
- Like before, right-click your domain, and select Create a GPO in this domain, and Link it here…
- In Name, give the GPO (Group Policy Object) the name
VoIP SIP
, and click OK. - In the left part of the Group Policy Management window, under the domain, right-click the new GPO
VoIP SIP
that you created in the previous step, and select Edit… - In the new window, Group Policy Management Editor, expand Computer Configuration > Policies > Windows Settings
- Right-click Policy-based QoS, and select Create new policy…
- In Policy name, enter
VoIP SIP
- In Specify DSCP Value, enter
24
and click Next - Select Only applications with this executable name, enter
%programfiles(x86)%\Zylinc\ZyDesk\ZyDesk.exe
in the field, and click Next - Make sure that both Any source IP address and Any destination IP address are selected, and click Next
- In Select the protocol this QoS policy applies to, select TCP and UDP
- Select From any source port
- Select To this destination port number or range, and enter
5060
in the field - Click Finish
Your two new QoS policies will take effect the next time that computers on the domain refresh their group policy settings. That’ll typically happen when the computers restart.
If you don’t want to wait for that, you can force the update out: Open a command prompt with administrator rights and run the command gpupdate /force
On a client computer, you can then test if the policies are active:
In a command prompt with administrator rights, run the command gpresult /Scope Computer /v
Under Applied Group Policy Objects (you typically need to scroll up a bit to view it), you should be able to see the names of your RTP and SIP policies, like in this example:
…
Applied Group Policy Objects
-----------------------------
Default Domain Controllers Policy
Default Domain Policy
VoIP RTP
VoIP SIP
…
Morten Müller is Documentation & Localization Manager at Zylinc’s HQ in Denmark.