Application Behaviour Analysis – Citrix GoToMeeting for Application Virtualization environments like XenApp

In this article, I would detail on Application Behaviour Analysis – Citrix GoToMeeting for Application Virtualization environments like XenApp.  You may also want to refer to general application analysis of GoToMeeting (GTM) in below recent articles:

The challenge with GTM running in XenApp environment is it doesn’t support Audio which makes GTM unusable in XenApp environments.  Here are the couple options that I’ve evaluated and their observations:

  • You successfully configured Audio Settings in XenApp User Policies to Detect and Redirect Audio from ICA session to User Device components. Also Enabled Legacy Audio as XenApp App settings level.
  • You have the XenApp server running on Physical Hardware and has a proper Sound Card installed.  In case of VM, you ensure the Sound card and respective drivers are installed.
  • Citrix XenApp ICA session supports Mic & Speakers and other applications works fine with Audio.  Only GTM says “Audio Not Connected”
  • In general, while Initiating/joining a Meeting, GTM detects that it’s running under XenApp environment and then shows Audio is Not Connected.
  • In XenApp ICA session, g2mlauncher.exe process detects the XenApp environment before creating/joining the meeting. 2014-07-31 01:55:09.979 PST i: [g2mlauncher] XAE: XenApp Environment detected, G2M is running on server
    2014-07-31 01:55:09.980 PST i: [g2mlauncher] XAE: Integration type: None
  • However, on the same System, GTM via RDP session just works fine with Mic and Speakers. Here it’s g2mComm.exe process that does the XenApp Detection:

    2014-07-30 22:36:47.555 PST i: [g2mcomm] G2MVoIPThread::init_() – Running under Parallels: false
    2014-07-30 22:36:47.555 PST i: [g2mcomm] G2MVoIPThread::init_() – Running under XenApp: false

  • The goal to get GTM working with Audio in Citrix XenApp can be achieved if you can find out how GTM is detecting that its running under XenApp session.

 

Is Citrix XenApp ICA and RDP Protocols properly configured to support Audio?

  • You enable all the Audio Settings in Citrix XenApp > Policies > User > Unfiltered Policy > Settings > ICA > Audioimage
  • Also ensures Audio/Video Playback as well as Audio Recording are not disabled under  Remote Desktop Session Host Configuration > Connections > ICA-TCP > Client Settings > Redirection, as well as for RDP-TCP Connectionsimage image
  • You ensure that you have enabled Audio on the local system from where you are launching the XenApp ICA session.

No Application Isolation Mode supported in XenApp:

In this scenario, the Citrix XenApp’s AIE (Application Isolation Mode) Mode would have been a great option to handle this issue but that capability has been discontinued by Citrix in latest versions of XenApp.

Suspecting %SESSIONNAME% role in Detecting XenApp environment:

  • You kill the default Explorer.exe shell in ICA session and launches afresh
  • You also set %SESSIONNAME% variable as a System Environment level just in case if the user level gets overwritten image
  • But session gets it overwritten. So, you again set the %SESSIONNAME% variable to Console via Set Command: set sessionname=Console within the user ICA session
  • You also update the HKEY_CURRENT_USER\Volatile Environment\4\SESSIONNAME to Console.image
  • You verify that new processes see the %SESSIONNAME% value as Console.image
  • But then still GTM shows up “Audio Not Connected” message indicating you are running GTM in Virtual environment that image

 

Export HKCU user settings from RDP where GTM works with Audio to XenApp ICA Session:

Knowing that GTM supporting Audio in RDP, you export your HKCU GTM settings and import them back in ICA session to see if GTM is depending/using the HKCU values to determine the XenApp environment.

  • Import HKCU from RDP that has Audio options configured to use “Remote Audio” settingsimage
  • But still GTM Detects its running in XenApp and overwrites the HKCU with ICA session detected Audio settingsimage
  • Still the GTM shows up that “Audio Not Connected” image

Comparing Successful RDP and Failing ICA sessions GTM log files:

 

  • In case of RDP, g2mlauncher.exe does NOT log any events about checking the XenApp Status but it does in case of ICA session. 
  • in case of RDP, g2mcomm.exe G2MVoIP confirms that it’s NOT running in XenApp but in case of ICA session it detects confirms that it’s in XenApp environment
  • In both RDP and ICA sessions, g2mcomm.exe G2MVoIP detects that its running on a ‘Virtual Machine’. This is something some choose to opt out of by going to see this page and choosing an option from there. Still, if you want to configure this yourself, keep going.

In Successful RDP Session:

2014-07-30 22:33:43.480 PST d: [g2mlauncher] Office Add-in successfully installed …
2014-07-30 22:33:43.522 PST d: [g2mlauncher] <<< G2MLauncherThread::init()
2014-07-30 22:33:43.522 PST d: [g2mlauncher] CPluginThread::run(G2MLauncher) – entering message loop. … …

2014-07-30 22:36:47.548 PST s: [g2mvideoconference] VE:2014-07-31T06:36:47.548Z:                    Engine.cpp   543 VcEngine Version: 2.1_187
2014-07-30 22:36:47.555 PST i: [g2mcomm] G2MVoIPThread::init_() – Running under Parallels: false
2014-07-30 22:36:47.555 PST i: [g2mcomm] G2MVoIPThread::init_() – Running under XenApp: false
2014-07-30 22:36:47.572 PST i: [g2mvideoconference] <17814> VE:2014-07-31T06:36:47.551Z:               ThreadsImpl.cpp   487 Thread id:9464 name: Periodic Timer Impl

2014-07-30 22:36:47.616 PST i: [g2mvideoconference] VE:2014-07-31T06:36:47.616Z:         ConnectionManager.cpp   268 Manager Start: start listening on UDP port: 0
2014-07-30 22:36:47.616 PST i: [g2mvideoconference] VE:2014-07-31T06:36:47.616Z:                     mcs_i.cpp   770 ->CreateStack
2014-07-30 22:36:47.621 PST s: [g2mcomm] CPU: 2.0GHz, 1, ‘Intel(R) Xeon(R) CPU           E5504  @ 2.00GHz’, RAM: 2045MB, OS: ‘Microsoft Windows Server 2008 R2, Standard x64 Edition  (Build 7600)’, SYS: ‘Virtual Machine’, ‘Microsoft Corporation’, EPVersion=6.3.0.1468
2014-07-30 22:36:47.624 PST i: [g2mvideoconference] VE:2014-07-31T06:36:47.624Z:                     mcs_i.cpp   781 <-CreateStack

 

In Failed XenApp ICA session:

2014-07-31 01:55:09.386 PST d: [g2mlauncher] Installing Office Add-in…
2014-07-31 01:55:09.717 PST i: [g2mcomm] JLinkConnectMonitorWin32: initialization complete
2014-07-31 01:55:09.927 PST d: [g2mlauncher] Office Add-in successfully installed …
2014-07-31 01:55:09.979 PST i: [g2mlauncher] XAE: XenApp Environment detected, G2M is running on server
2014-07-31 01:55:09.980 PST i: [g2mlauncher] XAE: Integration type: None

2014-07-31 01:55:09.980 PST d: [g2mlauncher] <<< G2MLauncherThread::init()

2014-07-31 02:07:46.151 PST d: [g2mcomm] <18527/IPluginControl.start> G2MVoIPPI::start() – Got argument PluginDebug=On
2014-07-31 02:07:46.152 PST d: [g2mcomm] <18527/IPluginControl.start> >>> G2MVoIPThread::isReady()
2014-07-31 02:07:46.152 PST d: [g2mcomm] CPluginThread::run(G2MVoIP)
2014-07-31 02:07:46.152 PST d: [g2mcomm] >>> G2MVoIPThread::init_()
2014-07-31 02:07:46.155 PST i: [g2mcomm] G2MVoIPThread::init_() – Running under Parallels: false
2014-07-31 02:07:46.155 PST i: [g2mcomm] G2MVoIPThread::init_() – Running under XenApp: true
2014-07-31 02:07:46.174 PST d: [g2mui] CUI::reactToSessCtrlEventsOnStartup() – in: stage=4
2014-07-31 02:07:46.236 PST s: [g2mcomm] Display Driver ‘Microsoft Virtual Machine Bus Video Device’, Version ‘6.1.7600.16385’, Date ‘6-21-2006’, Provider ‘Microsoft’

2014-07-31 02:07:46.495 PST s: [g2mcomm] CPU: 2.0GHz, 1, ‘Intel(R) Xeon(R) CPU           E5504  @ 2.00GHz’, RAM: 2045MB, OS: ‘Microsoft Windows Server 2008 R2, Standard x64 Edition  (Build 7600)’, SYS: ‘Virtual Machine’, ‘Microsoft Corporation’, EPVersion=6.3.0.1468
2014-07-31 02:07:46.507 PST i: [g2mcomm] RtcAudioEngine: [2]1T10:07:46.498681Z L0               rtc::util    PersistentSettingsWi:68       ERROR: can’t open registry key Software\Citrix\AudioEngine

Observations from System Monitoring during the ICA GTM detecting the XenApp:

  • During 2014-07-31 01:55:09.979 PST i: [g2mlauncher] XAE: XenApp Environment detected, G2M is running on server, no events occur on the system: image
  • The last event around this time is g2mlauncher creating and accessing C:\Windows\SysWOW64\winsta.dll File.  The winsta.dll is a “WinStation Library” file.
  • During 2014-07-31 02:07:46.155 PST i: [g2mcomm] G2MVoIPThread::init_() – Running under XenApp: true , image
  • The last event around this time is g2mcomm.exe accessing again the C:\Windows\SysWOW64\winsta.dll File.   
  • It’s clear that GTM is detecting about the session environment by accessing some functions under winsta.dll File.
  • Post after that g2mcomm.exe attempts to see if there existing HKCU\Software\Citrix\GoToMeeting\XenAppVoIP as shown belowimage
  • If you create the  XenAppVoIP registry as shown below GTM starts supporting Audio in XenApp.  Yay!!

    C:\>reg add “HKCU\Software\Citrix\GoToMeeting” /v XenAppVoIP /T REG_SZ /F /D true
    The operation completed successfully.

    C:\> imageimage

  • However, the Audio of GTM in XenApp VoIP is treated as a regular data streams and thus not being optimized for effective transmission.  This causes GTM audio to consume high bandwidth as well as high CPU/RAM resources on the XenApp server.  I guess for this reason, Citrix has disabled the VvoIP Audio for GTM in XenApp session.
  • FTR, GTM with XenAppVoIP supports multiple XenApp user sessions with Audio simultaneously, it only consumes high resources as its data stream is not optimized.

 

Logs of GTM Audio VoIP successful launch in XenApp ICA session:

  • GTM (g2mcomm) still detects that its running under XenApp 2014-08-01 01:56:54.868 PST d: [g2mcomm] <20711/IPluginStatusChangeListener.statusChangeEvent> <<< CCommAgentApp::statusChangeEvent()
    2014-08-01 01:56:54.853 PST i: [g2mlauncher] XAE: XenApp Environment detected, G2M is running on server
    2014-08-01 01:56:54.853 PST i: [g2mlauncher] XAE: Integration type: None
    2014-08-01 01:56:54.853 PST d: [g2mlauncher] <<< G2MLauncherThread::init()
  • GTM (g2mcomm) still detects that its running under XenApp during VoIP evaluation

    2014-08-01 01:58:05.401 PST d: [g2mui] <<< CUI::authenticatedEvent()
    2014-08-01 01:58:05.420 PST i: [g2mcomm] G2MVoIPThread::init_() – Running under Parallels: false
    2014-08-01 01:58:05.420 PST i: [g2mcomm] G2MVoIPThread::init_() – Running under XenApp: true
    2014-08-01 01:58:05.463 PST s: [g2mcomm] Display Driver ‘Microsoft Virtual Machine Bus Video Device’, Version ‘6.1.7600.16385’, Date ‘6-21-2006’, Provider ‘Microsoft’
    2014-08-01 01:58:05.475 PST s: [g2mcomm] Network Driver ‘Microsoft ISATAP Adapter’, Version ‘6.1.7600.16385’, Date ‘6-21-2006’, Provider ‘Microsoft’

  • GTM Detects that it’s found an explicit EnableVoIP setting to support Audio via VoIP in XenApp sessions.

    2014-08-01 01:58:05.542 PST d: [g2mvideoconference] VideoConferenceSession::initialize() – createSession=true
    2014-08-01 01:58:05.546 PST i: [g2mcomm] VoiceEngineFactory::getEnableVoIP() – Found explicit XenAppVoIP = true
    2014-08-01 01:58:05.552 PST i: [g2mcomm] RtcAudioEngine: [2]1T09:58:05.551030Z L0               rtc::util    PersistentSettingsWi:68       ERROR: can’t open registry key Software\Citrix\AudioEngine
    2014-08-01 01:58:05.552 PST i: [g2mcomm] RtcAudioEngine: [3]    AudioVoiceEngine.cpp:236      _STAT_:RtcAudioEngine Version: 1.1_34 initialize ->
    2014-08-01 01:58:05.406 PST d: [g2mui] CAttendeesDataFromSessCtrl::broadcastNewAttendeesCan 21 = 1

  • Detection of Audio Devices from the client system by GTM in the XenApp session:

    2014-08-04 21:33:28.914 PST i: [g2mcomm] {Session 4776884547803020390 EPConnectionRouter::} ————————————–
    2014-08-04 21:33:28.914 PST i: [g2mcomm] {Session 4776884547803020390 EPConnectionRouter::} CURRENT ROUTE TABLE STATE:
    2014-08-04 21:33:28.915 PST i: [g2mcomm] {Session 4776884547803020390 EPConnectionRouter::}      MCS-1: eId-1, lbSt=1, rSt=1
    2014-08-04 21:33:28.915 PST i: [g2mcomm] {Session 4776884547803020390 EPConnectionRouter::}      MCS-3: eId-3, lbSt=2, rSt=2
    2014-08-04 21:33:28.915 PST i: [g2mcomm] {Session 4776884547803020390 EPConnectionRouter::} ————————————–
    2014-08-04 21:33:29.220 PST i: [g2mcomm] RtcAudioEngine: [4]    WebRtcAudioDeviceHan:402      WebRTC audio module has been initialized successfully.
    2014-08-04 21:33:29.221 PST i: [g2mcomm] RtcAudioEngine: [5]    WebRtcAudioDeviceHan:415      Default playout device has been set.
    2014-08-04 21:33:29.225 PST i: [g2mcomm] RtcAudioEngine: [6]    WebRtcAudioDeviceHan:430      Speaker has been initialized.
    2014-08-04 21:33:29.225 PST i: [g2mcomm] RtcAudioEngine: [7]    WebRtcAudioDeviceHan:445      Default recording device has been set.
    2014-08-04 21:33:29.227 PST i: [g2mcomm] RtcAudioEngine: [8]    WebRtcAudioDeviceHan:460      Microphone has been initialized.
    2014-08-04 21:33:29.227 PST i: [g2mcomm] RtcAudioEngine: [9]    WebRtcAudioDeviceHan:488      Failed to set the recording channel.
    2014-08-04 21:33:29.227 PST i: [g2mcomm] RtcAudioEngine: [10]    AudioVoiceEngine.cpp:243      Audio device handler initialized.
    2014-08-04 21:33:29.227 PST i: [g2mcomm] RtcAudioEngine: [11]    WebRtcAudioProcessor:1287     AEC mode set: eEchoSuppressionHigh
    2014-08-04 21:33:29.227 PST i: [g2mcomm] RtcAudioEngine: [12]    WebRtcAudioProcessor:1411     AGC mode set: eGainControlModeAdaptiveAnalog
    2014-08-04 21:33:29.227 PST i: [g2mcomm] RtcAudioEngine: [13]    WebRtcAudioProcessor:1341     Noise suppression mode set: eNoiseSuppressionStrong
    2014-08-04 21:33:29.227 PST i: [g2mcomm] RtcAudioEngine: [14]    WebRtcAudioProcessor:1192     Codec set: ISAC
    2014-08-04 21:33:29.227 PST i: [g2mcomm] RtcAudioEngine: [15]    AudioVoiceEngine.cpp:260      RtcAudioEngine initialized <-
    2014-08-04 21:33:29.230 PST i: [g2mcomm] RtcAudioEngine: [16]    WebRtcAudioDeviceHan:623      New recording device added: Stereo Mix (IDT High Definition
    2014-08-04 21:33:29.230 PST i: [g2mcomm] RtcAudioEngine: [17]    WebRtcAudioDeviceHan:623      New recording device added: Integrated Microphone Array (ID
    2014-08-04 21:33:29.231 PST i: [g2mcomm] RtcAudioEngine: [18]    WebRtcAudioDeviceHan:737      New playout device added: Speakers / HP (IDT High Definit
    2014-08-04 21:33:29.231 PST d: [g2mcomm] G2MRtcAudioEngine::RtcAudioEngineAdapter::onInitialized() – eAudioEngineSuccess, 2 recording devices, 1 playout devices.
    2014-08-04 21:33:29.231 PST d: [g2mcomm] G2MRtcAudioEngine::logCodecs() – # of supported codecs: 9
    2014-08-04 21:33:29.231 PST d: [g2mcomm] G2MRtcAudioEngine::logCodecs() – Codec: L16, sampleFrequency: 16000, samplesPerFrame: 160, audioChannels: 1, bitRate: 256000
    2014-08-04 21:33:29.231 PST d: [g2mcomm] G2MRtcAudioEngine::logCodecs() – Codec: ISAC, sampleFrequency: 16000, samplesPerFrame: 480, audioChannels: 1, bitRate: 32000
    2014-08-04 21:33:29.231 PST d: [g2mcomm] G2MRtcAudioEngine::logCodecs() – Codec: PCMU, sampleFrequency: 8000, samplesPerFrame: 80, audioChannels: 1, bitRate: 64000
    2014-08-04 21:33:29.231 PST d: [g2mcomm] G2MRtcAudioEngine::logCodecs() – Codec: PCMA, sampleFrequency: 8000, samplesPerFrame: 80, audioChannels: 1, bitRate: 64000
    2014-08-04 21:33:29.231 PST d: [g2mcomm] G2MRtcAudioEngine::logCodecs() – Codec: ILBC, sampleFrequency: 8000, samplesPerFrame: 240, audioChannels: 1, bitRate: 13300
    2014-08-04 21:33:29.231 PST d: [g2mcomm] G2MRtcAudioEngine::logCodecs() – Codec: ILBC, sampleFrequency: 8000, samplesPerFrame: 160, audioChannels: 1, bitRate: 15200
    2014-08-04 21:33:29.231 PST d: [g2mcomm] G2MRtcAudioEngine::logCodecs() – Codec: G722, sampleFrequency: 16000, samplesPerFrame: 160, audioChannels: 1, bitRate: 64000
    2014-08-04 21:33:29.231 PST d: [g2mcomm] G2MRtcAudioEngine::logCodecs() – Codec: PCMU, sampleFrequency: 8000, samplesPerFrame: 160, audioChannels: 1, bitRate: 64000
    2014-08-04 21:33:29.231 PST d: [g2mcomm] G2MRtcAudioEngine::logCodecs() – Codec: PCMA, sampleFrequency: 8000, samplesPerFrame: 160, audioChannels: 1, bitRate: 64000
    2014-08-04 21:33:29.231 PST i: [g2mcomm] RtcAudioEngine: [19]    AudioVoiceEngine.cpp:400      AsyncRtcAudioEngineCore::initialize – audio engine successfully initialized
    2014-08-04 21:33:29.232 PST i: [g2mcomm] G2MRtcAudioEngine::initialize() –
    2014-08-04 21:33:29.232 PST d: [g2mcomm] G2MRtcAudioEngine::enableAGC() – enableAnalogAgc=true, enableDigitalAgc=true
    2014-08-04 21:33:29.232 PST d: [g2mcomm] G2MRtcAudioEngine::enableEchoControl() – enable=3
    2014-08-04 21:33:29.232 PST d: [g2mcomm] G2MRtcAudioEngine::enableNoiseSuppression() – enable=3
    2014-08-04 21:33:29.232 PST d: [g2mcomm] G2MVoIPThread::init_() – Created channel id=0
    2014-08-04 21:33:29.232 PST d: [g2mcomm] G2MRtcAudioEngine::setSendTransport() – channel=0, pTransport=0x0673E5E4
    2014-08-04 21:33:29.233 PST d: [g2mcomm] >>> AudioControl::getInputDevices()
    2014-08-04 21:33:29.233 PST i: [g2mcomm] RtcAudioEngine: [20]    WebRtcAudioProcessor:1411     AGC mode set: eGainControlModeAdaptiveAnalog
    2014-08-04 21:33:29.233 PST i: [g2mcomm] RtcAudioEngine: [21]    WebRtcAudioProcessor:1287     AEC mode set: eEchoSuppressionHigh
    2014-08-04 21:33:29.233 PST i: [g2mcomm] RtcAudioEngine: [22]    WebRtcAudioProcessor:1341     Noise suppression mode set: eNoiseSuppressionStrong
    2014-08-04 21:33:29.268 PST d: [g2mcomm] MixerControl::getDevices_() – num. devices=2, isInput=true
    2014-08-04 21:33:29.268 PST d: [g2mcomm] TStringSetFiller::operator ()() – name=’Integrated Microphone Array (ID’
    2014-08-04 21:33:29.268 PST d: [g2mcomm] TStringSetFiller::operator ()() – name=’Stereo Mix (IDT High Definition’
    2014-08-04 21:33:29.268 PST d: [g2mcomm] <<< AudioControl::getInputDevices()
    2014-08-04 21:33:29.268 PST d: [g2mcomm] >>> AudioControl::getOutputDevices()
    2014-08-04 21:33:29.268 PST d: [g2mcomm] MixerControl::getDevices_() – num. devices=1, isInput=false
    2014-08-04 21:33:29.272 PST d: [g2mcomm] TStringSetFiller::operator ()() – name=’Speakers / HP (IDT High Definit’
    2014-08-04 21:33:29.272 PST d: [g2mcomm] <<< AudioControl::getOutputDevices()
    2014-08-04 21:33:29.272 PST d: [g2mcomm] <<< G2MVoIPThread::init_()

  •  

    Observations from XenApp ICA session alone:

    When you connect to GTM and about to Join/create a Meeting, GTM prompts user about “HDX Microphone and Webcam” An online application is attempting to user your microphone or webcam.

    Logs about “HDX Microphone and Webcam” access prompt when you response “Permit use”:

    2014-07-31 02:07:58.042 PST i: [g2mcomm] RtcAudioEngine: [4]    WebRtcAudioDeviceHan:402      WebRTC audio module has been initialized successfully.
    2014-07-31 02:07:58.042 PST i: [g2mcomm] RtcAudioEngine: [5]    WebRtcAudioDeviceHan:415      Default playout device has been set.
    2014-07-31 02:07:58.343 PST i: [g2mcomm] RtcAudioEngine: [6]    WebRtcAudioDeviceHan:430      Speaker has been initialized.
    2014-07-31 02:07:58.343 PST i: [g2mcomm] RtcAudioEngine: [7]    WebRtcAudioDeviceHan:445      Default recording device has been set.
    2014-07-31 02:08:11.496 PST W: [g2mcomm] Warning at , g2mrtcaudioengine.cpp:248
        (2024) “ECError::eTimeout”
    2014-07-31 02:08:24.789 PST i: [g2mcomm] {Allocator::} _update: new id 12 grant 0 isStable false

    image

    2014-07-31 02:08:52.544 PST i: [g2mcomm] G2MRtcAudioEngine::uninitialize() –
    2014-07-31 02:08:52.544 PST d: [g2mcomm] <<< G2MVoIPThread::init_()
    2014-07-31 02:08:52.544 PST W: [g2mcomm] <18527/IPluginControl.start> G2MVoIPThread::isReady() – init() failed!

    < p>During the above Access prompt, “Windows Audio Device Graph Isolation” process AUDIODG.EXE attempts to read the values of HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\Audio\status\ as shown below:image

    If you make HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\Audio\ path unavailable in ICA session, then GTM in ICA session wouldn’t be able know it’s Audio devices list and thus says No Speakers Detected.image

    Leave a Reply

    Your email address will not be published. Required fields are marked *