With the HDX RealTime Optimization Pack, the HDX RealTime Media Engine runs on the user device. The HDX RealTime Media Engine performs Signaling and Media transmission. To help you understand which ports are used by the HDX RealTime Media Engine for supporting external users, equate running the HDX RealTime Media Engine with running the Microsoft Skype for Business client locally on the user device. The difference is XenApp and XenDesktop host the UI and business logic layers. Understanding that the media engine is running on the remote endpoint clarifies the port requirements.
External users outside of the corporate firewall connect to the Skype for Business Edge Server or Lync Edge Server, a component of Skype for Business or Lync Server infrastructure that must be installed on a dual-homed server in the DMZ with connections to both the Internet and to the intranet. For more information, see https://technet.microsoft.com/en-us/library/mt346415.aspx and https://technet.microsoft.com/EN-US/library/mt346416.aspx.
To find the Lync Edge Server, the HDX RealTime Media Engine follows the same procedures as the Skype for Business client. See "How Skype for Business Clients Locate Services" at https://technet.microsoft.com/en-us/library/dn951397.aspx.
Internal users inside the corporate firewall connect directly to the Lync Server that runs inside the firewall. They also communicate point-to-point between other Lync clients during calls. If your company has internal firewalls, you must make sure that the proper ports are open to connect with the Lync Server and to transmit and receive media during calls. The port requirements are listed at: https://technet.microsoft.com/EN-US/library/gg398833.aspx.