You can configure and add the following Citrix policy settings to a policy that optimizes HDX audio features. For usage details plus relationships and dependencies with other policy settings, see Audio policy settings and Bandwidth policy settings and Multi-stream connections policy settings.
We recommend delivering audio using User Datagram Protocol (UDP) rather than TCP, but UDP audio encryption using DTLS is available only between Citrix Gateway and Citrix Workspace app. Therefore, sometimes it might be preferable to use TCP transport. TCP supports end-to-end TLS encryption from the VDA to Citrix Workspace app.
In general, higher sound quality consumes more bandwidth and server CPU utilization by sending more audio data to user devices. Sound compression allows you to balance sound quality against overall session performance; use Citrix policy settings to configure the compression levels to apply to sound files.
By default, the Audio quality policy setting is set to High - high definition audio when TCP transport is used. The policy is set to Medium - optimized-for-speech when UDP transport (recommended) is used. The High Definition audio setting provides high fidelity stereo audio, but consumes more bandwidth than other quality settings. Do not use this audio quality for non-optimized voice chat or video chat applications (such as softphones). The reason being that it might introduce latency into the audio path that is not suitable for real-time communications. We recommend the optimized for speech policy setting for real-time audio, regardless of the selected transport protocol.
When bandwidth is limited, for example satellite or dial-up connections, reducing audio quality to Low consumes the least possible bandwidth. In this situation, create separate policies for users on low-bandwidth connections so that users on high-bandwidth connections are not adversely impacted.
For setting details, see Audio policy settings. Remember to enable Client audio settings on the user device.
Client audio redirection
To allow users to receive audio from an application on a server through speakers or other sound devices on the user device, leave the Client audio redirection setting at Allowed, which is its default.
Client audio mapping puts extra load on the servers and the network. However, prohibiting client audio redirection disables all HDX audio functionality.
For setting details, see Audio policy settings. Remember to enable client audio settings on the user device.
Client microphone redirection
To allow users to record audio using input devices such as microphones on the user device, leave the Client microphone redirection setting at its default (Allowed).
For security, user devices alert their users when servers they don’t trust try to access microphones. Users can choose to accept or reject access before using the microphone. Users can disable this alert on Citrix Workspace app.
For setting details, see Audio policy settings. Remember to enable Client audio settings on the user device.
Audio Plug N Play
The Audio Plug N Play policy setting allows or prevents the use of multiple audio devices to record and play sound. This setting is Enabled by default. Audio Plug N Play enables audio devices to be recognized even if they are not plugged in until after the user session has started.
This setting applies only to Windows Server OS machines.
For setting details, see Audio policy settings.
Audio redirection bandwidth limit and audio redirection bandwidth limit percent
The Audio redirection bandwidth limit policy setting specifies the maximum bandwidth (in kilobits per second) for a playing and recording audio in a session.
The Audio redirection bandwidth limit percent setting specifies the maximum bandwidth for audio redirection as a percentage of the total available bandwidth.
By default, zero (no maximum) is specified for both settings. If both settings are configured, the one with the lowest bandwidth limit is used.
For setting details, see Bandwidth policy settings. Remember to enable Client audio settingson the user device.
Audio over UDP Real-time Transport and Audio UDP port range
By default, Audio over User Datagram Protocol (UDP) Real-time Transport is allowed (when selected at time of installation). It opens up a UDP port on the server for connections that use Audio over UDP Real-time Transport. If there is network congestion or packet loss, we recommend configuring UDP/RTP for audio to ensure the best possible user experience. For real time audio such as softphone applications, UDP audio is preferred to EDT. UDP allows for packet loss without retransmission, ensuring that no latency is added on connections with high packet loss.
When Citrix Gateway is not in the path, audio data transmitted with UDP is not encrypted. If Citrix Gateway is configured to access Citrix Virtual Apps and Desktops resources, then audio traffic between the endpoint device and Citrix Gateway is secured using DTLS protocol.
The Audio UDP port rang specifies the range of port numbers that the Virtual Delivery Agent (VDA) uses to exchange audio packet data with the user device.
By default, the range is 16500 through 16509.
For setting details about Audio over UDP Real-time Transport, see Audio policy settings. For details about Audio UDP port range, see Multi-stream connections policy settings. Remember to enable Client audio settings on the user device.
Audio setting policies for user devices
- Load the group policy templates by following Configuring the Group Policy Object administrative template.
- In the Group Policy Editor, expand Administrative Templates > Citrix Components > Citrix Workspace > User Experience.
- For Client audio settings, select Not Configured, Enabled, or Disabled.
- Not Configured. By default, Audio Redirection is enabled using high quality audio or the previously configured custom audio settings.
- Enabled. Enables audio redirection using the selected options.
- Disabled. Disables audio redirection.
- If you select Enabled, choose a sound quality. For UDP audio, use Medium (default).
- For UDP audio only, select Enable Real-Time Transport and then set the range of incoming ports to open in the local Windows firewall.
- To use UDP Audio with Citrix Gateway, select Allow Real-Time Transport Through gateway. Configure Citrix Gateway with DTLS. For more information, see this article.
As an Administrator, if you do not have control on endpoint devices to make these changes, use the default.ica attributes from StoreFront to enable UDP Audio. For example, for bring your own devices or home computers.
- On the StoreFront machine, open C:\inetpub\wwwroot\Citrix\<Store Name>\App_Data\default.ica with an editor such as notepad.
- Make the entries below under the [Application] section.
; This text enables Real-Time Transport EnableRtpAudio=true ; This text allows Real-Time Transport Through gateway EnableUDPThroughGateway=true ; This text sets audio quality to Medium AudioBandwidthLimit=1- ; UDP Port range RtpAudioLowestPort=16500 RtpAudioHighestPort=16509
If you enable User Datagram Protocol (UDP) audio by editing default.ica, then UDP audio is enabled for all users who are using that store.
Avoid echo during multimedia conferences
Users in audio or video conferences might hear an echo. Echoes usually occur when speakers and microphones are too close to each other. For that reason, we recommend the use of headsets for audio and video conferences.
HDX provides an echo cancellation option (enabled by default) that minimizes echo. The effectiveness of echo cancellation is sensitive to the distance between the speakers and the microphone. Ensure that the devices aren’t too close or too far away from each other.
You can change a registry setting to disable echo cancellation.
Editing the Registry incorrectly can cause serious problems that might require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Be sure to back up the registry before you edit it.
- Using the Registry Editor on the user device, navigate to one of the following:
- 32-bit computers: HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\Engine\Configuration\Advanced\Modules\ClientAudio\EchoCancellation
- 64-bit computers: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\ICA Client\Engine\Configuration\Advanced\Modules\ClientAudio\EchoCancellation
- Change the Value data field to FALSE.
A softphone is software acting as a phone interface. You use a softphone to make calls over the internet from a computer or other smart device. By using a softphone, you can dial phone numbers and carry out other phone-related functions using a screen.
Citrix Virtual Apps and Desktops support several alternatives for delivering softphones.
- Control mode. The hosted softphone controls a physical telephone set. In this mode, no audio traffic goes through the Citrix Virtual Apps and Desktops server.
HDX RealTime optimized softphone support. The media engine runs on user device, and Voice over Internet Protocol traffic flows peer-to-peer. For examples, see:
- HDX RealTime Optimization Pack, which optimizes the delivery of Microsoft Skype for Business and Lync.
- Cisco Virtualization Experience Media Engine (VXME) for Jabber.
- Avaya VDI Communicator for one-X Communicator and one-X Agent.
- Local App Access. A Citrix Virtual Apps and Desktops feature that allows an application such as a softphone to run locally on the Windows user device yet appear seamlessly integrated with their virtual/published desktop. This feature offloads all audio processing to the user device. For more information, see Local App Access and URL redirection.
- HDX RealTime generic softphone support. Voice over Internet Protocol-over-ICA.
Generic softphone support
Generic softphone support, enables you to host an unmodified softphone on XenApp or XenDesktop in the data center. The audio traffic goes over the Citrix ICA protocol (preferably using UDP/RTP) to the user device running the Citrix Workspace app.
Generic softphone support is a feature of HDX RealTime. This approach to softphone delivery is especially useful when:
- An optimized solution for delivering the softphone is not available and the user is not on a Windows device where Local App Access can be used.
- The media engine that is needed for optimized delivery of the softphone isn’t installed on the user device or isn’t available for the operating system version running on the user device. In this scenario, Generic HDX RealTime provides a valuable fallback solution.
There are two softphone delivery considerations using Citrix Virtual Apps and Desktops:
- How the softphone application is delivered to the virtual/published desktop.
- How the audio is delivered to and from the user headset, microphone, and speakers, or USB telephone set.
Citrix Virtual Apps and Desktops include numerous technologies to support generic softphone delivery:
- Optimized-for-Speech codec for fast encode of real-time audio and bandwidth efficiency.
- Low latency audio stack.
- Server-side jitter buffer to smooth out the audio when network latency fluctuates.
- Packet tagging (DSCP and WMM) for Quality of Service.
- DSCP tagging for RTP packets (Layer 3)
- WMM tagging for Wi-Fi
The Citrix Workspace app versions for Windows, Linux, Chrome, and Mac also are Voice over Internet Protocol capable. Citrix Workspace app for Windows offers these features:
- Client-side jitter buffer - Ensures smooth audio even when network latency fluctuates.
- Echo cancellation - Allows for greater variation in the distance between microphone and speakers for workers who do not use a headset.
- Audio plug-n-play - Audio devices do not need to be plugged in before starting a session. They can be plugged in at any time.
- Audio device routing - Users can direct ringtone to speakers but the voice path to their headset.
- Multi-stream ICA - Enables flexible Quality of Service-based routing over the network.
- ICA supports four TCP and two UDP streams. One of the UDP streams supports real-time audio over RTP.
For a summary of Citrix Workspace app capabilities, see Citrix Receiver Feature Matrix.
System configuration recommendations
Client Hardware and Software: For optimal audio quality, we recommend the latest version of Citrix Workspace app and a good quality headset that has acoustic echo cancellation (AEC). Citrix Workspace app versions for Windows, Linux, and Mac support Voice over Internet Protocol. Also, Dell Wyse offers Voice over Internet Protocol support for ThinOS (WTOS).
CPU Considerations: Monitor CPU usage on the VDA to determine if it is necessary to assign two virtual CPUs to each virtual machine. Real-time voice and video are data intensive. Configuring two virtual CPUs reduces the thread switching latency. Therefore, we recommend that you configure two vCPUs in a Citrix Virtual Desktops VDI environment.
Having two virtual CPUs does not necessarily mean doubling the number of physical CPUs, because physical CPUs can be shared across sessions.
Citrix Gateway Protocol (CGP), which is used for the Session Reliability feature, also increases CPU consumption. On high-quality network connections, you can disable this feature to reduce CPU consumption on the VDA. Neither of the preceding steps might be necessary on a powerful server.
UDP Audio: Audio over UDP provides excellent tolerance of network congestion and packet loss. We recommend it instead of TCP when available.
LAN/WAN configuration: Proper configuration of the network is critical for good real-time audio quality. Typically, you must configure virtual LANs (VLANs) because excessive broadcast packets can introduce jitter. IPv6-enabled devices might generate many broadcast packets. If IPv6 support is not needed, you can disable IPv6 on those devices. Configure to support Quality of Service.
Settings for use WAN connections: You can use voice chat over LAN and WAN connections. On a WAN connection, audio quality depends on the latency, packet loss, and jitter on the connection. If delivering softphones to users on a WAN connection, we recommend using the NetScaler SD-WAN between the data center and the remote office. Doing so maintains a high Quality of Service. NetScaler SD-WAN supports Multi-Stream ICA, including UDP. Also, for a single TCP stream, it’s possible to distinguish the priorities of various ICA virtual channels to ensure that high priority real-time audio data receives preferential treatment.
Use Director or the HDX Monitor to validate your HDX configuration.
Remote user connections: Citrix Gateway supports DTLS to deliver UDP/RTP traffic natively (without encapsulation in TCP). Open firewalls bidirectionally for UDP traffic over Port 443.
Codec selection and bandwidth consumption: Between the user device and the Virtual Delivery Agent (VDA) in the data center, we recommend using the Optimized-for-Speech codec setting, also known as Medium Quality audio. Between the VDA platform and the IP-PBX, the softphone uses whatever codec is configured or negotiated. For example:
- G711 provides good voice quality but has a bandwidth requirement of from 80 kilobits per second through 100 kilobits per second per call (depending on Network Layer2 overheads).
- G729 provides good voice quality and has a low bandwidth requirement of from 30 kilobits per second through 40 kilobits per second per call (depending on Network Layer 2 overheads).
Delivering softphone applications to the virtual desktop
There are two methods by which you can deliver a softphone to the XenDesktop virtual desktop:
- The application can be installed in the virtual desktop image.
- The application can be streamed to the virtual desktop using Microsoft App‑V. This approach has manageability advantages because the virtual desktop image is kept uncluttered. After being streamed to the virtual desktop, the application executes in that environment as if it was installed in the usual manner. Not all applications are compatible with App-V.
Delivering audio to and from the user device
Generic HDX RealTime supports two methods of delivering audio to and from the user device:
- Citrix Audio Virtual Channel. We generally recommend the Citrix Audio Virtual Channel because it’s designed specifically for audio transport.
- Generic USB Redirection. Supports audio devices having buttons or a display (or both), human interface device (HID), if the user device is on a LAN or LAN-like connection back to the Citrix Virtual Apps and Desktops server.
Citrix audio virtual channel
The bidirectional Citrix Audio Virtual Channel (CTXCAM) enables audio to be delivered efficiently over the network. Generic HDX RealTime takes the audio from the user headset or microphone and compresses it. Then, it sends it over ICA to the softphone application on the virtual desktop. Likewise, the audio output of the softphone is compressed and sent in the other direction to the user headset or speakers. This compression is independent of the compression used by the softphone itself (such as G.729 or G.711). It is done using the Optimized-for-Speech codec (Medium Quality). Its characteristics are ideal for Voice over Internet Protocol. It features quick encode time, and it consumes only approximately 56 Kilobits per second of network bandwidth (28 Kbps in each direction), peak. This codec must be explicitly selected in the Studio console because it is not the default audio codec. The default is the HD Audio codec (High Quality). This codec is excellent for high fidelity stereo soundtracks but is slower to encode compared to the Optimized-for-Speech codec.
Generic USB Redirection
Citrix Generic USB Redirection technology (CTXGUSB virtual channel) provides a generic means of remoting USB devices, including composite devices (audio plus HID) and isochronous USB devices. This approach is limited to LAN-connected users. This reason being that the USB protocol tends to be sensitive to network latency and requires considerable network bandwidth. Isochronous USB redirection works well when using some softphones. This redirection provides excellent voice quality and low latency. However, Citrix Audio Virtual Channel is preferred because it is optimized for audio traffic. The primary exception is when you’re using an audio device with buttons. For example, a USB telephone attached to the user device that is LAN-connected to the data center. In this case, Generic USB Redirection supports buttons on the phone set or headset that control features by sending a signal back to the softphone. There isn’t an issue with buttons that work locally on the device.
In this article
- Audio quality
- Client audio redirection
- Client microphone redirection
- Audio Plug N Play
- Audio redirection bandwidth limit and audio redirection bandwidth limit percent
- Audio over UDP Real-time Transport and Audio UDP port range
- Audio setting policies for user devices
- Avoid echo during multimedia conferences