# Genesys Quality Management Suite 8.1.520 : Screen Capture High Availability Options

Created and last modified by

To provide High Availability for Screen Capture:

- There must be two Call Recording clusters deployed and these clusters must have a Screen Capture server configured.
- Each cluster must have its own uploaders and media encoders, as these can not be shared.
- The Screen Capture Capture Client must be configured to connect to all of the Screen Capture Servers by entering the list of addresses during installation of the Capture client.

The Screen Capture Capture Client connects to a primary Screen Capture server. The primary Screen Capture server controls the Screen Capture Capture Client. Upon failure of the primary Screen Capture server, control passes to the secondary Screen Capture server.
Recordings are uploaded to the primary uploader. In the event of a failure of the primary uploader, the Screen Capture Capture Client can connect to the secondary Screen Capture server and process requests.
If there is a failure of the Screen Capture server during recording, the current recording is lost. After reconnection to the other Screen Capture server, new requests process normally.

Because all of the media are synchronized at the replay server; if Screen Capture fails on the primary server (A), but the call recording is OK, then it is possible to replay the screen captures from the backup connection (B) with the audio from the primary connection.

## Java Standalone Thin Client

The integration of the standalone Capture Client with Java-based agent desktops is provided by the `screenrec-controller.jar` file that must be present in the classpath of the agent desktop application. This file can be found at the following default location on the Call Recording server:

    /opt/callrec/screenrec/screenrec-controller-5.0.0.jar

The `screenrec-controller.jar` bundles a (compressed) Capture Client. The actual spawning of the Capture Client is performed by creating a new instance of the `cz.zoom.screenrec.impl.controller.ScreenRecorderStarter` class.

The `ScreenRecorderStarter` constructor requires the following parameters:

- The agent name (login ID)
- A list of servers to connect to

The `ScreenRecorderStarter` instance runs a background thread that monitors the Capture Client and restarts it if it exits. The application is bundled in the form of a highly-compressed self-extracting .exe application.
The starter instance extracts the application to a temporary directory, executes the self-extraction and runs the extracted binary application. A background thread deletes all old instances that may have been left over in the temporary directory.
To stop the capture client from the agent desktop, call `ScreenRecorderStarter.stop()` in this instance. This stops the monitoring thread and destroys the running client application.

## .NET Standalone Thin Client

The integration of the standalone Capture Client with .NET-based agent desktops is provided by the ScreenREC.exe binary application, which can be downloaded in compressed form from the Call Recording server at the following URL (where `SERVER_URL` is the Call Recording server address):

    http://SERVER_URL/callrec/plugins/screenrec-client-binary-5.0.0.exe

Running the downloaded executable extracts the ScreenREC.exe binary application.

To start the application from C/C++ code, call the following method:

    System.Diagnostics.Process.Start(appName, arguments)

where:

- `appName` is the full path to the Capture Client binary;
- `arguments` is obtained by calling:

    System::String::Format("-agent {0} -host {1}", agentName, serverHostName)

The `-host` parameter may be used several times, in which case the format specification needs to be changed accordingly.

## Screen Capture Port Usage Guide

The Screen Capture server accepts incoming connections on the predefined port 7003. The port is currently not configurable.
The Capture Client application does not use any predefined port.
In Windows service mode, there is additional inter-process communication, between the service and running Screen Capture Capture Client applications. This inter-process communication uses the Named Pipes Windows API rather than sockets.
The Capture Client application connects as a client to the Screen Capture Media Upload Server (MUS), and the Screen Capture server specifies the server endpoint that the Capture Client application uploads to. This endpoint is typically port 80 and on the same server on which the Call Recording UI is installed. This port number can be changed from the Screen Capture configuration.