Howto:Set Type of Service (ToS) DiffServ DSCP Values for innovaphone Windows Applications (SoftwarePhone, myPBX Video)

From innovaphone wiki
Jump to navigation Jump to search

Applies To

This information applies to all innovaphone Windows Applications sending the RTP Data (this is currently the SoftwarePhone (audio), myPBX launcher (video) and myApps (audio, video))

More Information

Problem Details

In contrast to the innovaphone devices, that allows you to specify the IP v4 TOS header field value used for voice and signalling IP packets, the MS Windows based applications like SoftwarePhone, myPBX or myApps do not have any possibility to set ToS Values on the RTP packets due to restriction of the Microsoft Windows operating system.

Instead to set the ToS Value in the Application the Policy-based Quality of Service (QoS) provided by the MS Windows operating system can be used to mark the IP packets.

Usually the configuration of the Policy-based Quality of Service is done by defining a Group Policy Object (GPO) in the Group Policy Management Console (GPMC). This could be done for a single computer or distributed to a number of computers via the domain controller.

Microsoft Windows QoS Policy Mappings for innovaphone Applications
Policy Name Application Path Protocol Source Port Destination Port Source IP / Mask Destination IP / Mask DSCP Value Throttling Rate
innovaphone myPBX Video RTP %programfiles(x86)%\innovaphone\myPBX\myPBX.exe UDP 50000:50100 * * * 34 -1
innovaphone myApps Video RTP %programfiles(x86)%\innovaphone\myApps\myApps.exe UDP 50100:50199 * * * 34 -1
innovaphone myPBX Signalling HTTP %programfiles(x86)%\innovaphone\myPBX\myPBX.exe TCP * 80 * * 26 -1
innovaphone myPBX Signalling HTTPS %programfiles(x86)%\innovaphone\myPBX\myPBX.exe TCP * 443 * * 26 -1
innovaphone SoftwarePhone Audio RTP %programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe UDP 2050:16000 * * * 46 -1
innovaphone myApps Audio RTP %programfiles(x86)%\innovaphone\myApps\myApps.exe UDP 50000:50099 * * * 46 -1
innovaphone SoftwarePhone Signalling RAS %programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe UDP * 1718:1719 * * 26 -1
innovaphone SoftwarePhone Signalling H225 %programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe TCP * 2048:59999 * * 26 -1
innovaphone SoftwarePhone Signalling H323/TCP %programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe TCP * 1720 * * 26 -1
innovaphone SoftwarePhone Signalling H323/TLS %programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe TCP * 1300 * * 26 -1
innovaphone SoftwarePhone Signalling SIP %programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe TCP/UDP * 5060 * * 26 -1
innovaphone SoftwarePhone Signalling SIPS %programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe TCP * 5061 * * 26 -1

The DSCP Values in the above example are default DSCP values used by innovaphone devices, according to the Wiki article Howto:Calculate Values for Type of Service (ToS) from DiffServ or DSCP Values. You may change this values to meet requirements on your traffic prioritisation and routing equipment.

In the Windows 8, Server 2012, Windows 10 and later it is possible to use PowerShell to configure the values with the NetQosPolicy Cmdlet.

The above table can be added to the Group Policies by the following powershell commands (administrator account access right required):

New-NetQosPolicy -Name "innovaphone myPBX Video RTP" -DSCPAction 34 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\myPBX\myPBX.exe" -IPProtocolMatchCondition UDP -IPSrcPortStartMatchCondition 50000 -IPSrcPortEndMatchCondition 50100
New-NetQosPolicy -Name "innovaphone myApps Video RTP" -DSCPAction 34 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\myApps\myApps.exe" -IPProtocolMatchCondition UDP -IPSrcPortStartMatchCondition 50100 -IPSrcPortEndMatchCondition 50199
New-NetQosPolicy -Name "innovaphone myPBX Signalling HTTP" -DSCPAction 26 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\myPBX\myPBX.exe" -IPProtocolMatchCondition TCP -IPDstPortMatchCondition 80
New-NetQosPolicy -Name "innovaphone myPBX Signalling HTTPS" -DSCPAction 26 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\myPBX\myPBX.exe" -IPProtocolMatchCondition TCP -IPDstPortMatchCondition 443
New-NetQosPolicy -Name "innovaphone SoftwarePhone Audio RTP" -DSCPAction 46 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe" -IPProtocolMatchCondition UDP -IPSrcPortStartMatchCondition 2050 -IPSrcPortEndMatchCondition 16000
New-NetQosPolicy -Name "innovaphone myApps Audio RTP" -DSCPAction 46 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\myApps\myApps.exe" -IPProtocolMatchCondition UDP -IPSrcPortStartMatchCondition 50000 -IPSrcPortEndMatchCondition 50099
New-NetQosPolicy -Name "innovaphone SoftwarePhone Signalling RAS" -DSCPAction 26 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe" -IPProtocolMatchCondition UDP -IPSrcPortStartMatchCondition 1718 -IPSrcPortEndMatchCondition 1719
New-NetQosPolicy -Name "innovaphone SoftwarePhone Signalling H225" -DSCPAction 26 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe" -IPProtocolMatchCondition TCP -IPSrcPortStartMatchCondition 2048 -IPSrcPortEndMatchCondition 59999
New-NetQosPolicy -Name "innovaphone SoftwarePhone Signalling H323 TCP" -DSCPAction 26 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe" -IPProtocolMatchCondition TCP -IPDstPortMatchCondition 1720
New-NetQosPolicy -Name "innovaphone SoftwarePhone Signalling H323 TLS" -DSCPAction 26 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe" -IPProtocolMatchCondition TCP -IPDstPortMatchCondition 1300
New-NetQosPolicy -Name "innovaphone SoftwarePhone Signalling SIP" -DSCPAction 26 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe" -IPProtocolMatchCondition Both -IPDstPortMatchCondition 5060
New-NetQosPolicy -Name "innovaphone SoftwarePhone Signalling SIPS" -DSCPAction 26 -NetworkProfile All -AppPathNameMatchCondition "%programfiles(x86)%\innovaphone\SoftwarePhone\softwarephone.exe" -IPProtocolMatchCondition TCP -IPDstPortMatchCondition 5061

Please note, the QoS policies added via powershell NetQosPolicy cmdlet are not visible in the Group Policies Editor (gpedit.msc). To list the configured QoS policies use Get-NetQosPolicy cmdlet.

The GPO on the PCs will refresh from time to time automatically. To apply the changes to the GPO immediately following command can be used:

Gpupdate.exe /force

Known Problems

In some cases setting of the following registry key is required to ensure the DSCP values are applied:

  1. Go to HKLM\System\CurrentControlSet\Services\Tcpip\QoS. If "QoS" folder doesn't exist there - create it.
  2. Add a DWORD parameter named "Do not use NLA" and assign "1" as its value.

Reboot of the PC is required afterwards.

Related Articles