Flex on Citrix VDI gives customers using Virtual Desktop Infrastructure (VDI) environments the ability to run Flex.
Flex UI 2.5.0 and later improves audio quality by supporting Citrix HDX WebRTC devices. When a voice call initiates, signaling occurs between the agent's browser/Citrix Workspace App and the Twilio Voice JS SDK. The call connects directly from the agent's machine to Twilio Programmable Voice.
Flex on Citrix VDI applies only to voice calls.
The following are system requirements for the Citrix server and remote device.
Server operating system:
One of the following operating systems:
The latest version of one of the following browsers:
To set up Flex on Citrix VDI, complete the following steps:
Changes to the Citrix VDI environment require a user with Administrative privileges.
Note: If you are unable to change the registry value or are facing permission issues, contact your Citrix administrator.
By default, Citrix HDX is not enabled for Chrome. Complete the following steps to enable the Chrome browser to access the underlying Citrix HDX framework:
Add the application binary name, chrome.exe, to an allowlist registry in Windows Registry Editor:
Key Path | HKLM\Software\WOW6432Node\Citrix\WebSocketService |
---|---|
Key Name | ProcessWhitelist |
Key Type | MULTISZ |
Key Value | chrome.exe |
(Optional) Some versions of Citrix have issues with HDX content redirection with Chrome browser 105 and later. As a workaround, disable the Chrome Browser Chrome Root Store certificate verifier on VDI using one of the methods specified on the Citrix support page.
You can verify that you've disabled the Chrome Browser Chrome Root Store certificate by following the steps in the Chrome Root Store and Certificate Verifier.
The issue is fixed on the following Citrix versions:
To use Flex on Citrix VDI, you must enable it:
Open the following ports on the Citrix machine:
Protocol | Port | Reason |
---|---|---|
TCP,UDP | 1494 | Access to applications and virtual desktops by ICA/HDX. EDT protocol requires port 1494 to be open for UDP. |
TCP,UDP | 2598 | Access to applications and virtual desktops by ICA/HDX with Session Reliability. EDT protocol requires port 2598 to be open for UDP. |
TCP,UDP | 443 | Access to applications and virtual desktops by ICA/HDX over TLS/DTLS. |
UDP | 16500..16509 | ICA/HDX audio over UDP Real-time Transport. |
Upgrade the Flex library to a version that supports Citrix VDI:
npm install flex-ui@2.5.0
If you are using @twilio/voice-sdk, upgrade to version 2.5 or later for support with the Citrix HDX-compatible webRTC APIs.
npm install @twilio/voice-sdk@2.5
Follow these steps to validate your setup and ensure that Flex will automatically detect if you're running in a VDI environment:
1const citrixSocket = new WebSocket("wss://127.0.0.1:9002");2citrixSocket.onopen = (event) => {3citrixSocket.send(4JSON.stringify({5v: "webrtc",6hdr: {7version: 1,8msg_type: "req",9modifier: false,10destroy: false,11proc: { iid: 0, methodid: 2 }12},13objref: { oid: 0 },14params: [[]]15})16);17};18citrixSocket.onmessage = (event) => {19const msg = JSON.parse(event.data);20if ( msg.command === "feature-support" ) {21console.log("Success : We are in Citrix with webrtc support");22alert("Success : We are in Citrix with webrtc support");23citrixSocket.close();24}25};26citrixSocket.onclose = ()=> console.log("Socket successfully closed")27citrixSocket.onerror = ()=> {28console.log("Failure : Error opening socket");29alert("Failure : Error opening socket");30}31
Check your configurations and ensure that your environment meets the system requirements, then try again. If you still run into issues, contact Twilio support.
If you have additional plugins or business logic that use the Twilio Voice JavaScript SDK, you must upgrade them to use the latest Citrix HDX-compatible APIs. To use Citrix HDX, you must update the voice setup function. On the audio event of Twilio Voice JavaScript SDK, you need to map the Citrix devices to connection. The following examples demonstrate how to update these calls:
The Twilio Voice JavaScript SDK needs three new arguments for the Twilio Voice JavaScriptJS SDK setup function: RTCPeerConnection
, getUserMedia
, and enumerateDevices
.
1setup(data, {2...options,3...{4RTCPeerConnection: window.CitrixWebRTC.CitrixPeerConnection.bind(window.CitrixWebRTC),5getUserMedia: (...args: any[]) => window.CitrixWebRTC.getUserMedia(...args),6enumerateDevices: window.CitrixWebRTC.enumerateDevices.bind(window.CitrixWebRTC),7},8});9
Map the Citrix audio element to the voice connection by specifying the following:
1connection.on("audio", function(remoteAudio) {2....3window.CitrixWebRTC.mapAudioElement(remoteAudio);4....5})6
Voice Over Internet Protocol (VoIP) call quality is influenced by environmental factors, such as:
It's important you review our deployment best practices and connectivity requirements documentation before taking your app to production. Browsers that support DSCP are able to tag call media packets sent by the voice client. Your router or network element can then use these tags to prioritize call media packets over other traffic on the network.
Follow these steps to verify that Flex HDX is working correctly in Chrome:
Capture your Citrix instance logs using one of the following methods:
Citrix and Twilio jointly support the delivery of Flex on Citrix HDX VDI.
If you experience an issue with Flex on Citrix VDI, open a support ticket with the vendor whose product you suspect to be causing the issue. In other words, if the problem seems like a Flex issue, open a support ticket with Twilio. If you suspect it's a Citrix HDX issue, open a support ticket with Citrix. You must have an active Citrix license to receive support from Citrix.
When Citrix or Twilio receives the ticket, they will triage the issue and escalate it as appropriate. If they determine that the problem is caused by the other company's product, they will advise you to create a support ticket with the other company.