Jump to content
  • How to Get UDP Audio in Citrix VAD Working (Updated 5/20/22)


    cugcblogs

    raydavisrnd.png by Ray Davis

    ​Many people use Audio in Citrix VAD. It works well, but at times it can be choppy, jittery, and lagging.

    I wouldn’t say it’s hard, but Citrix is kind of all over the place with the docs. The Tech Zone does a nice job on the material. One of the reasons I started blogging is that I see all kinds of blogs, but I want to do something different. I want to share my settings and get feedback on your experience. Then update my blog with your professional experience. Of course, with your approval and your credit for the work. This will allow everyone to share different configurations and what works. My intention isn’t to redo blogs or Tech Zone, but to show ALL configurations around a specific topic, like this one. I want more than just links, I want detailed setups from start to finish. So, let’s start.

    1. Studio default Citrix policies
    2. So, as you can see, three policies are set by default within Citrix Studio. The reason I am showing this is that I just wanted to ensure to people that no Studio Policies need to be configured.
    RRV77Jph9A7ioJs1eGZKUrSdIIfkXkSNK2vQLxjEfK9jOOP0o8H6W-SYDXcUtftpwCpd0jh24HvKUk4B1h7qJih3cC6_H69L14Eo1LroKSd2n-p6K2PR7r7cpWv8Lyg_fK_oqNs

    Another thing I found is that if the Audio is set to medium, the quality is better, and it helps for MICS that use Optimized USB ICA virtual channel.

    jYRCVDDShFJvtHqeUKy_teXF4H4AlpTosIRlGA39

    Once these are set, they are by default. Then you need to tell the Workspace Clients how to use this policy. If these are not set, UDP will not work over audio.

    • Enable audio
    • Sound quality medium
    • Enable Real-Time transport (16500 – 16509)
    • Allow Real-Time transport through Gateway

    2. Client settings for UDP

    Workspace GPO, setting that reflects the bullet points above.

     

    Zb3PgOmvoTHDBVkRrSALih1G0kvBWh4KSsrO6wN-
    1. The next question will be, how does this work for non-domain, BYOD devices?
    2. For this to take effect, you must update the Default.ica on your storefront servers.
    3. On the StoreFront machine, open C:\inetpub\wwwroot\Citrix\<Store Name>\App_Data\default.ica with an editor such as notepad ++
    4. Some people may not like editing the default.ica file. I understand and get it. But after all, that is what really makes up the ICA packet from launching resources. It would be nice for Citrix to add a GUI option, such as in StoreFront for this, some drop down the says "enable UDP for all workspace clients." Checkbox =enable. 
    5. Anyway, let's continue. For me, it’s this…. C:\inetpub\wwwroot\Citrix\MFA\App_Data
    4vHawbe8cfBn_Rj9b29WLXlpXtBLACJ37xhe1q2E

    Make the entries below under the [Application] section.

    VFsxnt2RxTZqM_s7_Sl1QcgqWhZvMRRBWFkLvjr-

     

    * Note* on the configuration above, you will see a dash behind the 1. So it's "1-"  Jonathan Pitre reached out to me to ask about the (1-). I contacted Citrix and am finding out if this is a typo. I am glad he did, because it may not be needed. In my testing and into prod, the dash after the 1 still works. (But, it may not be needed.) Also, when you do a StoreFront upgrade, it will wipe out the default.ica file. Good catch Jonathan, Community support.

    Firewall requirements

    The Audio UDP port range specifies the range of port numbers that the Virtual Delivery Agent (VDA) uses to exchange audio packet data with the user device.

    1. By default, the range is 16500 – 16509
    2. Base Citrix Layout. I took this from the EDT CTX Article.
    3. Some people think that these ports need external as well. But in fact, it is from SNIP to the VDA Network. Then it’s wrapped up in the ICA packet.
    4. I have seen some documentation stating you need these ports open, however that is from the NSG gateway to the VDA backend. This isn’t what they mean.
    3BJXNganvWsHbv4GP0r4IUqu7JdvoQpTAwlx-nVe
    1. This is what it will look like in terms of an ICA packet.
    2. Internet Firewall: Additional rules must be added to your firewall(s) to allow the following UDP traffic.
    • Client/Citrix Receiver > NetScaler Gateway – UDP/443
    • NetScaler Gateway > XenDesktop VDA – UDP/16500-16509  
    Vl3UkIHX80uIgOawQPoJqcZeLLFfIweqmF8LFfe8

     

    Ideally, if you could blow up the ICA packet, and analyze the data inside it, It would look like this:

    4-jwDHkVV8-ff4cM_OS8PQYBEJYTxTeEPIG00q5h

    NetScaler Settings needed

    • Enable the DTLS flag on the NetScaler Gateway Virtual Server.

    *NOTE* I didn’t have to do this, but based on my research, people have done this and then it would work.

    • Unbind the SSL certificate pair from the NetScaler Gateway Virtual Server.
    • (Re)bind the SSL certificate pair to the NetScaler Virtual Server. (Note: when rebinding the SSL certificate I didn’t get any message saying, “No usable ciphers configured on the SSL vServer/service.” This is a known issue and can be ignored). Some say they have, but I didn’t.
    1. Go to the Gateway settings, then click the desired Gateway and edit
    2. Go to the Gateway, and Edit the vServer
    Yl_NkE4ayRC0p_TXuhIhexjpHEneRWH4rp1AWReN

    After this select DTLS (checkbox), under Basic settings. This is right at the top after you are in the Gateway settings.

    9kes2d_7y0Ia_u5R_4Au8Xf0HLAsvlwwT_EQTKJD

    Now go down to the SSL local and unbind the SSL cert. After you unbind it, go down and press done so the NetScaler will commit the changes.

    1ymC13P82VQUVcQMXNcKnsCiD2tD1yDpUhQn0APw

    Go back into the Gateway, and now Bind again. After you bind it, go down and press Done so the NetScaler will commit the changes.

    GfTTxOoNGn5BYbhAd25Vyz982NPJz0KUFPlpYHxagImr9ncwbxWvfO6VrADJDEX-rhXy-oNgBSFUX-P5

    Now at this point, you will see this in the DTLS setting:

     

    GlYkDLayScINfcXwlRamF_7AYsMJQdS27gZ7hJjI

    As you can see here, once the user starts connecting in, you will see the Client port and XenApp/XenDesktop port show the UDP audio port.

     

    lT-hXk2enSyW3AeuzYP0W7RmNTPcWyuLBeZUF_08

    Finally, results.

    1. 2016 Windows Server/Windows 10 1608 LTSC
    2. VDA 19122016 Windows Server /VDA1909 Windows 10 LTSC
    3. Logitech h570 headset (Optimized USB support)/ SONY PS3 Mic
    4. Citrix Workspace 1911
    5. FSLogix profiles (Just in case anyone asks)

     

    UDP

     

    p5h_C8fn7mJENPdiLFdL-wh91eVmdCrFwUFf7g1w0KbV9qCLg5g6ibMrvqmUDao-KNAGMDeXta6K-1Z9

     

     

    TCP

    iH5uEYicE9bQJOa6pclkrDMUcWM4HjR68xG_aCqvOUa9NSWZFbtJx_5qNC8DPx0h2o1XxRq7QzaBW4E9

     

     

    UDP

    5jkUcOFU6ndeKaZ4tt91Aotmualy1EBRTei68Sm9

     

    TCP

    CDNEh6_1jrKA2GcZzoDQwet0x5rglIqcUqZTadlK

     

    *Update* For XenDesktop 3/7/2020

    I needed to show XenDesktop Settings based on a Slack conversation I had. My settings are the same, nothing changed other than I had to enable USB support for this VDA. Even though Citrix is picking it up as optimized. It’s not integrated, and it’s still a USB device. (Which reminds me, I need to update My USB Blog….http://www.citrixirc.com/?p=1070.) Also make sure “Client USB Plug and Play device redirection" is enabled. I didn't need to enable USB support. The reason is because the Mic is optimized within the Virtual channel, and it will show up within the VDA. It will not show up in Device viewer, because it's native pass-through with HDX support. But it will show up in the VDA device manager. The reason I enabled it was just for Generic USB support (Just a catch all for my testing.)

     

    0WDIJGy_rjWZ_nfapPJ07eUHBBdHpfJ3Z_8zd6jlXl_riolmwWF3PHkEMz1Mt1buBGfFdpUHareRE8rRk4wUf67j_TDA2l4F7mXNiD85HVjpEUfclvAyNYGU

     

    My only headset laying around was my old PS3 Mic. Dang Citrix picked it right up, and optimized it, but restricted it. I must be blocking it.

    I am 🙂

     

    pYoV1kiO8tp_8_nGXuCVjEkuQCp_dSUMlGt_XRNY

     

    Allowed now.

    pZDnSUQnaAqgB17RA-pSFRrtTor9FjgQqXM8nicR

     

    I have to restart my session, for the restriction to go away. The sound would go through to the mic.

    Then check and see if optimized is right for this mic

    Ok, so it’s open now.

     

    tkVwqiIsTiQz6QbBf3Xnj5iVQf0dKh-tojMARKY3

     

    Still no Audio through Mic, as I am talking into it here.

    oBtN6qjLKa7BG11mvCvCBrYUkXqbPgQSTqIGzRoZ

     

    Toggle it to Generic.

    jBISwt-TjWP5FT_9CFza1EEBAYsFK231dUhN4Gas

     

    Windows 10 will install a drive for me. 🙂

    Generic it is… (This is also how I test optimized and Generic)

    See more here http://www.citrixirc.com/?p=1075

     

    Ikni-JCjTRtT532HNQYWWm9x4hk5s1Osn8nwcIoR

     

    My testing was around XenApp (Virtual Apps) XenDesktop (VD), and this is for Avaya OneX communicator without VDI equinox communicator on the client.

    Here are some blogs I picked through to get my information.

    • This was on Windows 8 and Citrix Receiver 4.2
    I53I7n6Q--wr7wnY9Fu7NetLSVRCqyoZfSkq4Cru

     

    As you can see, UDP is far more valuable and is a must. Seems like Citrix nailed this and did a wonderful job from a bandwidth perspective. But is the audio really better? 

    Some discussions around this.

    https://discussions.citrix.com/topic/394148-any-tips-for-configuring-audio-in-xenapp-715/

    This article states to use High.

    https://support.citrix.com/article/CTX210284

    Avaya states UDP and medium.

    https://support.citrix.com/article/CTX233747

    UDP with the multi-stream set, interesting Article talks about multi-stream and how it can help.

    https://www.citrix.com/blogs/2019/06/10/tips-to-optimize-voip-performance/

    Multi-Stream

    https://docs.citrix.com/en-us/xenapp-and-xendesktop/7-15-ltsr/policies/reference/ica-policy-settings/multistream-connections-policy-settings.html

    References and data, I collected for this blog.

    https://www.citrix.com/blogs/2015/04/03/udp-audio-through-a-netscaler-gateway/

    https://docs.citrix.com/en-us/tech-zone/design/reference-architectures/optimizing-unified-communications-solutions.html

    7.15

    https://docs.citrix.com/en-us/xenapp-and-xendesktop/7-15-ltsr/multimedia/audio.html#audio-over-udp-real-time-transport-and-audio-udp-port-range

    1912

    https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/1912-ltsr/multimedia/audio.html

     

    But as you can see, the data is scattered and it’s tough to get it all. At least, in my opinion. If you have a different configuration and did something different please share and with your permission, I’ll update this with your steps outlined for your setup In your environment. I feel that a master blog would benefit everyone.

     

    Acknowledgments.

    I wanted to thank everyone for helping me along these years, and giving me to opportunity to be apart of a wonderful community.

    I also wanted to give a special thanks to Leee Jeffries for pushing me to blog.

    @RayDavis83

    Update as of May 20th, 2022

    I was in a conversation in Slack about UDP audio dropping after some time in the Citrix Session with a couple of guys that I think are sharp dudes and provide community help. Something that started out small, led to finding a fix. Thanks, Nick Panaccio and Dale Scriven for finding this information. Like this one.

    Citrix Audio Over UDP Dropping Mid Session

    Here is a nice write-up from Dale Scriven: 

    Citrix Audio Over UDP Dropping mid session | (vhorizon.co.uk)

     

     

    "Create a DWORD value of KeepAliveTimer in the following location HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Citrix\Audio and set the value to a number. This number represents the number of seconds between UDP keep-alive pings which will keep the UDP sessions active during the periods of inactivity somewhere."

    "This also means that you need to talk to your network team and confirm what the firewall in between the clients and the endpoints has configured for UDP timeouts and adjust the registry value to be inside of that timeout. So, for instance, if networks say the UDP timeout is 30 seconds on their firewall, the registry value you would set could be.

    KeepAliveTimer DWORD 15"

    Note: it's a decimal value as well.

    An example that Nick provided is tested and working.

    Davis070622.png.25bda1c3951373693e149380c6cd6e9f.png

    Newer Adaptive Audio:

    Audio features | Citrix Virtual Apps and Desktops 7 2203 LTSR

    Next Gen HDX Multimedia Audio Redirection: A difference you can hear | Citrix Blogs

    But as you can see, the data is scattered and it’s tough to get it all. At least, in my opinion. If you have a different configuration and did something different please share and with your permission, I’ll update this with your steps outlined for your setup In your environment. I feel that a master blog would benefit everyone.

    davis031120-01.png.b3d7118f8bd1f47c7025e92b8bacba57.png


    User Feedback

    Recommended Comments

    Guest Citrix Audio Over UDP Dropping mid session |

    Posted

    […] in Citrix sessions and Ray Davis has a good article on how to get it working correctly link HERE. One issue I’ve come across recently is reports of audio failing to work mid-session. Often […]
    Link to comment
    Share on other sites

    Hi just wondering what monitoring tool you used to show the virtual channel state for both UDP and TCP that you had screenshot of? Thank you!
    Link to comment
    Share on other sites

    Hello Shet Li, I used the HDX monitor Tool that Citrix offers. I install it on the VDA and open it up to get my stats. Director has it as well.
    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...