Revision as of 00:00, December 28, 2016 by Sschlich (talk | contribs) (Update with the copy of version: DRAFT)
Jump to: navigation, search

Deploying Recording Muxer Script

Genesys Interaction Recording (GIR) needs the Recording Muxer Script to combine the call and screen recordings for a seamless playback.


Prerequisites

Before installing and configuring the Recording Muxer Script, you must have the following prerequisites:

Installing Recording Muxer Script

Installing on Windows

  1. Install 32 bit Python 2.7.x from the Python website.
  2. Install the Recording Muxer Script IP.
  3. Untar the <Recording Muxer Install Directory>/thirdparty/setuptools-1.3.2.tar.gz file.
  4. From the <Recording Muxer Install Directory>/thirdparty/setuptools-1.3.2 directory, run python setup.py install.
  5. Untar the <Recording Muxer Install Directory>/thirdparty/requests-2.4.1.tar.gz file.
  6. From the <Recording Muxer Install Directory>/thirdparty/requests-2.4.1 directory, run python setup.py install.
  7. Untar the <Recording Muxer Install Directory>/thirdparty/boto-2.32.1.tar.gz file.
  8. From the <Recording Muxer Install Directory>/thirdparty/boto-2.32.1 directory, run python setup.py install.
  9. Untar the <Recording Muxer Install Directory>/thirdparty/easywebdav-1.2.0.tar.gz file.
  10. From the <Recording Muxer Install Directory>/thirdparty/easywebdav-1.2.0 directory, run python setup.py install.
  11. Untar the <Recording Muxer Install Directory>/thirdparty/filechunkio-1.5.tar.gz file.
  12. From the <Recording Muxer Install Directory>/thirdparty/filechunkio-1.5 directory, run python setup.py install.
  13. Untar the <Recording Muxer Install Directory>/thirdparty/pyasn1-0.1.7.tar.gz file.
  14. From the <Recording Muxer Install Directory>/thirdparty/pyasn1-0.1.7 directory, run python setup.py install.
  15. Untar the <Recording Muxer Install Directory>/thirdparty/pyasn1-modules-0.0.5.tar.gz file.
  16. From the <Recording Muxer Install Directory>/thirdparty/pyasn1-modules-0.0.5 directory, run python setup.py install.
  17. Untar the <Recording Muxer Install Directory>/thirdparty/boto3-1.4.0.tar.gz file.
  18. From the <Recording Muxer Install Directory>/thirdparty/boto3-1.4.0 directory, run python setup.py install.
  19. Untar the <Recording Muxer Install Directory>/thirdparty/futures-3.0.5.tar.gz file.
  20. From the <Recording Muxer Install Directory>/thirdparty/futures-3.0.5 directory, run python setup.py install.
  21. Unzip the <Recording Muxer Install Directory>/thirdparty/ffmpeg/ffmpeg-2.4.3-win64-static-gpl3.0.zip.
  22. Unzip the <Recording Muxer Install Directory>/thirdparty/openssl/openssl-0.9.8zb-win64.zip.

Installing on Linux

RHEL 5 or RHEL 6

  1. Install Python 2.7.6 or later:
    • Download the software from the Python website.
      It is recommend that newer versions of Python are installed separately from an existing versions (do not update).
  2. Install the Recording Muxer Script IP.
  3. Untar the <Recording Muxer Install Directory>/thirdparty/setuptools-1.3.2.tar.gz file.
  4. From the <Recording Muxer Install Directory>/thirdparty/setuptools-1.3.2 directory, run python setup.py install.
  5. Untar the <Recording Muxer Install Directory>/thirdparty/requests-2.4.1.tar.gz file.
  6. From the <Recording Muxer Install Directory>/thirdparty/requests-2.4.1 directory, run python setup.py install.
  7. Untar the <Recording Muxer Install Directory>/thirdparty/boto-2.32.1.tar.gz file.
  8. From the <Recording Muxer Install Directory>/thirdparty/boto-2.32.1 directory, run python setup.py install.
  9. Untar the <Recording Muxer Install Directory>/thirdparty/easywebdav-1.2.0.tar.gz file.
  10. From the <Recording Muxer Install Directory>/thirdparty/easywebdav-1.2.0 directory, run python setup.py install.
  11. Untar the <Recording Muxer Install Directory>/thirdparty/filechunkio-1.5.tar.gz file.
  12. From the <Recording Muxer Install Directory>/thirdparty/filechunkio-1.5 directory, run python setup.py install.
  13. Untar the <Recording Muxer Install Directory>/thirdparty/pyasn1-0.1.7.tar.gz file.
  14. From the <Recording Muxer Install Directory>/thirdparty/pyasn1-0.1.7 directory, run python setup.py install.
  15. Untar the <Recording Muxer Install Directory>/thirdparty/pyasn1-modules-0.0.5.tar.gz file.
  16. From the <Recording Muxer Install Directory>/thirdparty/pyasn1-modules-0.0.5 directory, run python setup.py install.
  17. Untar the <Recording Muxer Install Directory>/thirdparty/futures-3.0.5.tar.gz file.
  18. From the <Recording Muxer Install Directory>/thirdparty/futures-3.0.5 directory, run python setup.py install.
  19. Untar the <Recording Muxer Install Directory>/thirdparty/boto3-1.4.0.tar.gz file.
  20. From the <Recording Muxer Install Directory>/thirdparty/boto3-1.4.0 directory, run python setup.py install.
  21. Untar the <Recording Muxer Install Directory>/thirdparty/ffmpeg/ffmpeg-2.4.3-centos5-x86_64-static-gpl3.0.tar.bz2.
  22. Execute chmod a+x ffmpeg and chmod a+x ffprobe.
  23. Untar the <Recording Muxer Install Directory>/thirdparty/openssl/openssl-0.9.8zb-centos5-x86_64.tar.bz2.
  24. Execute chmod a+x openssl.

Upgrading Recording Muxer Script

  1. Backup the Recording Muxer Script installation directory including logs and configuration file.
  2. Uninstall the Recording Muxer Script component.
  3. Install the new Recording Muxer Script component.
  4. Update the Recording Muxer Script configuration according to the standard installation procedures.


Important
Uninstalling the previous Recording Muxer Script is optional.

Configuring Recording Muxer Script

This section describes how to configure the Recording Muxer Script for your environment.

Configure Passwords

Important
In a Linux or Windows environment, Muxer supports the use of environment variables instead of parameters in the configuration file for certain parameters. When both are available, the environment variable take precedence.

The following definitions describe the mapping of the environment variables to the corresponding configuration parameter:

HTCC_PASSWORD – maps to the existing configuration parameter under the htcc section, password value.

RCS_PASSWORD - maps to the existing configuration parameter under the rcs section, password value.

WEBDAV_PASSWORD - maps to the existing configuration parameter under the webdav section, password value.

In a Windows only environment, Recording Muxer Script supports storing all passwords in a secure keystore instead of storing in plain-text in the muxer.cfg file.

  1. From the muxer directory folder in the Recording Muxer installation folder (for example, <Recording Muxer Install Directory>\muxer), execute the following command:
    python encryptPassword.py
    The command will prompt for the appropriate values to be entered for the password/key configuration parameters. See the Genesys Interaction Recording Options Reference for the descriptions of the parameters.
  2. Configure the muxer.cfg file leaving the following parameter values empty:
        [webdav]
        password =
     
        [htcc]
        password=
     
        [rcs]
        password =
    


Configuring High Availability

Recording Muxer Cluster

The Recording Muxer Script provides High Availability support using multiple instances of the Recording Muxer Script (all active). HA supports:

  • Active/active pairs with the aim to load balance equally between the Recording Muxer nodes by splitting and configuring the time window on each node, so that it is close to equal the number of recordings found on each time window.
  • When one of the node dies, recordings are still multiplexed.

Limitations:

  • If the node with time window, now - N/2, dies, multiplexing will still occur, but a slower rate since the second node's time window is from N/2 to N.
  • If the node with time window, N/2 - N, dies, screen recordings that are uploaded with the delay more than N/2 might not be multiplexed.
  • Nodes should be configured so that the time windows are exclusive of each other, otherwise it may result in two multiplexed files being uploaded.

To configure HA:

  1. In each Recording Muxer’s muxer.cfg configuration file, in the [processing] section, set the following values for each node. For example,
    • On first node:
      • window_past= 720
      • window_past_older_than =
    • On second node:
      • window_past = 1440
      • window_past_older_than = 720
      The above will multiplex all recordings that were recorded within the last 1 day.
  2. As a general rule, if the screen recording upload occurs with a delay of N, the configuration on each node can be set to:
    • On first node:
      • window_past = N / 2
      • window_past_older_than =
      • min-poll_interval = N/200
    • On second node:
      • window_past= N
      • window_past_older_than = N / 2
      • min-poll_interval = N/200
    Ensure that all Recording Muxer instances have the same configuration other than the above.
Important
  • Genesys recommends that multiple Recording Muxer instances be deployed on different hosts to provide better HA and also not to have machine resource contentions.
  • If the recording upload is delayed by more than the time window configured for the Recording Muxer Script, it is possible that the recording will be outside of the processing window and not be multiplexed. For such cases, the Recording Muxer Script can be run as a migration tool to batch process the records matching any desired criteria. For more information see the call_recording_query_string parameter under Configuring the Advanced Options in the Advanced Configuration tab.

Configure Recording Muxer Script to support the SR Service Nightly Upload

The Recording Muxer Script splits the Muxer Period window into smaller time ranges to reduce the load on Elasticsearch and Recording Web Services Search and subsequently better supports the SR Service Nightly Upload.

To enable this support, set the following parameters in the Recording Muxer muxer.cfg file:

Parameter Name Default Value Valid Value Description
split_window_enabled 0 1 (enables the support), 0 (disables the support) Enables splitting the Muxer Period window into sub-intervals to improve Elasticsearch performance when querying Interaction Recording Web Services (RWS).
max_interval_minutes 720 720 to (window size)/2 where window size = window_past_older_than-window_past if window_past_older_than is defined, or now - window_past otherwise Specifies the maximum duration of the sub-interval in minutes.
interval_buffer_minutes 240 240 The minimum value is 1. This parameter should be set to the estimated maximum duration of the interaction and it must be less than max_interval_minutes.


Configuring the Connection to Interaction Recording Web Services (Web Services)

To configure the Interaction Recording Web Services (or Web Services if you're using version 8.5.210.02 or earlier) connection, set the following parameters in the [htcc] section of the Recording Muxer muxer.cfg configuration file:

Parameter Name Default Value Description
base_uri Specifies the host and port of the Interaction Recording Web Services (Web Services) server—for example, https://<web services host>:<web services port>/.
contact_center_id Specifies the unique identifier of the contact center.
username ops Specifies the username used to access the Interaction Recording Web Services (Web Services) account.
password ops Specifies the password used to access the Interaction Recording Web Services (Web Services) account.

Note:

  • If the "Configuring the Secure Password Storage" step was performed, leave this value empty.
  • The password can be overridden by the HTCC_PASSWORD environment variable.

Configuring the Connection to Recording Crypto Server

To configure the connection to the Recording Crypto Server, set the following parameters in the [rcs] section of the Recording Muxer muxer.cfg file:


Parameter Name Default Value Description
base_uri Empty Specifies the host and port of the Recording Crypto Server:
https://<Recording Crypto Server host>:<Recording Crypto Server port>/.
username Empty Specifies the contact center admin username used to access the Recording Crypto Server account belonging to the contact center specified by the contact_center_id option in the [htcc] section.

Note: The user must have the media decrypt permission.

password Empty Specifies the contact center admin password used to access the Recording Crypto Server account belonging to the contact center specified by the the contact_center_id option in the [htcc] section.

Note:

  • If the Configuring the Secure Password Storage step was performed, leave this value empty.
  • The password can be overridden by the RCS_PASSWORD environment variable.

Configuring the Processing Commands

  1. The Recording Muxer uses libraries for analyzing and handling multimedia data. To configure these commands, set the following parameters in the muxer.cfg file, the [processing] section:
    • ffmpeg = The path to the ffmpeg executable file.
    Important
    The ffmpeg executable is located under the directory where the thirdparty ffmpeg package was unzipped/untarred.
    • ffprobe = The path to the ffprobe executable file.
    Important
    The ffprobe executable is located under the directory where the thirdparty ffmpeg package was unzipped/untarred.
  2. To enable Sharding configure the following parameters using the command line provided or the muxer.cfg configuration file (optional):
    • muxer_type: The primary Muxer instance or backup Muxer instance.
      Valid Values: primary, backup
      If you select not to use Sharding, the system ignores this value.
    • muxer_id: A unique Muxer ID.
      Valid Values: A non negative integer starting with 0 (every Muxer ID is incremented by 1).
      If you select not to use Sharding, the value should be empty or -1.
    • total_muxers: The total number of Muxer instances deployed (excluding the backup).
      Valid Values: max(muxer_id) + 1.
      If muxer_id is less than 0, the system ignores this value.

    Command line: muxer_process.py --config-file=CONFIG_FILE --muxer-type=MUXER_TYPE --total-muxers=TOTAL_MUXERS --remote-kill-port=KILL_PORT
    Data resulting from the command line will be used before the data from muxer.cfg.

    For example: When using the following values, the system will have two instances of Muxer running:
    • muxer_type = primary
    • muxer_id = 0 (for the first instance)
    • muxer_id = 1 (for the second instance)
    • total_muxers = 2

    Command line example for running the first instance:
    python.exe ../muxer/muxer_process.py --config-file=muxer.cfg --muxer-type=primary --muxer-id=0 --total-muxers=2

    Command line example for running the second instance:
    python.exe ../muxer/muxer_process.py --config-file=muxer.cfg --muxer-type=primary --muxer-id=1 --total-muxers=2

    By default, Sharding is disabled and muxer_id = -1.

  3. To enable Muxer to read multiple screen recordings metadata with one request, configure the following parameters using the muxer.cfg configuration file (optional):
    • batch_read_screen_recording_metadata: Determines how screen recording metadata is received. The new algorithm reads multiple screen recordings metadata in one request. The previous algorithm reads one request at a time.
      Valid Values: Using Bulk API = 1 / Using previous algorithm the integer <>1
      Default Value: 1
    • query_slice_size: Defines the maximum number of call recording records whose screen recordings should be queried.
      Valid Values: all integers > 0
      Default Value: 100

  4. Configure the openssl parameter to set the path to the openssl executable.
    Important
    • The openssl executable is located under the directory where the thirdparty openssl package was unzipped/untarred.
    • On Linux, specifying the absolute path to the openssl executable path is recommended to ensure that the default installed openssl (for example, /usr/bin/openssl) is not executed instead.
  5. Configure the window_past and window_past_older_than parameters to set the time in the past to search for the call recordings to multiplex with the screen recordings. See the "Configure HA" section for the recommended values for these parameters.

For more information about the [processing] section parameters, see the Genesys Interaction Recording Options Reference.

Configuring the Connection to WebDAV

In the [webdav] section of the muxer.cfg file, set the following parameters:

  • username = The username to allow read/write access to the WebDAV storage server.
  • password = The password to allow read/write access to the WebDAV storage server.
Important
  • If multiple WebDAV storage are used for same contact center region, make sure to use the same username and password.
  • If the "Configuring the Secure Password Storage" step was performed, leave the password value empty.
  • A password can be overridden by the WEBDAV_PASSWORD environment variable.

Configuring the Advanced Options

To manage the records returned for multiplexing, set the following options in the [advanced] section of the muxer.cfg file:

  • worker_threads = The number of parallel processing threads.
  • pagination = The maximum number of records returned with each Interaction Recording Web Services (or Web Services if you're using version 8.5.210.02 or earlier) query.
  • max_overlap_allowed = The overlap time before truncating.
  • video_padding_slice_length_ms = If the video starts later or ends earlier than the audio, set the duration needed to prepend or append a padded video slice. Genesys recommends to set it to 5000.
  • call_recording_extra_query_string = Used to specify parameter value pairs other than startTime, endTime, and limit.
    If left empty, the call_recording_extra_query_string value will be defaulted internally to userData=SRSScreenRecordingStateStarted, if the HTCC version is >= 8.5.201.14, otherwise, it remains an "" (empty string).
    Specify "disable" (without quotes) to force it to be an empty string without checking the HTCC version. When the final value of this configuration is not empty, the Recording Muxer Script will continually poll for records that match the searching criteria according to the final value of the configuration that should be processed.
    Genesys recommends that this parameter be left empty. Query parameters have to be formatted as: <parameter name>=<value>[&<parameter name>=<value>…].
    The following table describes values (query parameters) that are available (except startTime and endTime).
  • call_recording_query_string = When not empty, [call_recording_query_string] queries Interaction Recording Web Services (Web Services) with the given string for records to process. Instead of continually polling for records to process, the Recording Muxer script will exit once the returned records are processed. Genesys recommends that this parameter be left empty unless the Muxer script is to be used for batch migrating the old recordings. Query parameters have to be formatted as: <parameter name>=<value>[&<parameter name>=<value>…]. The following table describes values (query parameters) that are available:
    Parameter Name Description
    callerPhoneNumber Retrieves all recordings which apply to any call containing the specified ANI attribute. The exact match of stored number (alphanumeric-only) and request parameter (alphanumeric-only) is used. The request string can contain * wildcard which can substitute any number of any symbols in the request. Search is case-sensitive.
    dialedPhoneNumber Retrieves all recordings which apply to any call containing the specified DNIS attribute. The exact match of stored number (alphanumeric-only) and request parameter (alphanumeric-only) is used. The request string can contain * wildcard - which can substitute any number of any symbols in request. Search is case-sensitive.
    startTime Retrieves all recordings that started >= the specified time.
    endTime Retrieves all recordings that ended <= the specified time.
    userName Retrieves all recordings in eventHistory->contacts of which the passed userName/firstName/Lastname is present. User can use wildcards to specify only part of the username/firstname/lastname. If more than 1 word is used (divided by spaces) -the records containing any of provided terms as username, firstname or lastname will be included. If user wants to retrieve records containing ALL terms - the AND keyword should be used. Sample: ?userName= Alice AND Amber - will seek for recording with events->contact-> username/firstName/lastName containing Alice and Amber (possible - in different users). Search is case-insensitive.
    userData Retrieves all recordings in eventHistory->data of which the passed userData is present as value of HashMap. These matches are supported:
    • Exact match - match the entire value (for example, "tom" will find "tom").
    • Wildcarded value (for example, "tom*" will find a record with "tomas").
    • Combination of matches - If the query terms are separated by spaces (for example, "tom jerry" will look for recordings that contain "tom" or "jerry").

Configuring the Recording Muxer Using Genesys Administrator Extension (Optional)

The Recording Muxer uses a configuration file instead of a specific application object in Configuration Server. However, it is possible to configure the Recording Muxer as a "third-party server" application enabling Genesys Administrator Extension to monitor, start, and stop the process.

The following steps describe how to setup Recording Muxer as a "third party server" application in Genesys Administrator Extension. For more information, see the Using the Management Layer section of the Framework 8.5.1 Management Layer User's Guide

Configuring Recording Muxer Script to Start/Stop via LCA using Genesys Administrator Extension:

  1. Install and deploy the latest Recording Muxer script.
  2. Make sure that the Local Control Agent (LCA) is running.
  3. Create a new application template in Genesys Administrator Extension called Recording Muxer script of type Third Party Server.
  4. Create a new application (for example, myRecordingMuxer) in Genesys Administrator Extension using this new application template.
  5. On Windows:
    1. Set the Command Line parameter to the python executable (for example, C:\Python27\python.exe).
    2. Set the Host parameter in the application’s server info to the correct Host object.
    3. Set the Working Directory parameter to the <Recording Muxer Install Directory>\muxer directory. For example, C:\Program Files\GCTI\Recording Muxer Script\muxer.
    4. Set the Command Line Arguments parameter to the python arguments: muxer_process.py --config-file=muxer.cfg.
  6. On Linux:
    1. Set the Command Line parameter to env.
    2. Set the Host parameter in the application’s server info to the correct Host object.
    3. Set the Working Directory parameter to the <Recording Muxer Install Directory>/muxer directory. For example, /opt/genesys/Recording_Muxer_Script_8.5/muxer/.
    4. Set the Command Line Arguments parameter. The LD_LIBRARY_PATH must be set to include the openssl binary directory before muxer script execution. For example, LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<untarred openssl directory> /opt/python27/python muxer_process.py –-config-file=muxer.cfg.
Important
The Recording Muxer does not support configuration through Genesys Administrator Extension. Configuration is acquired using a local configuration file.

For more information about the Recording Muxer Script parameters, see the Genesys Interaction Recording Options Reference.

Starting the Recording Muxer Script

Important
For muxer.cfg, if temp_dir is configured, verify that the path exists and is writable by the muxer process.

To launch the Recording Muxer script, run the following command from the <Recording Muxer Install Directory> (where x = 6):

On Windows:

  • <python2.7.x executable> muxer_process.py --config-file=muxer.cfg

On Linux:

  • env LD_LIBRARY_PATH=<untarred openssl directory>:$LD_LIBRARY_PATH <python2.7.x executable> muxer_process.py --config-file=muxer.cfg

By default the Recording Muxer’s log file is stored in the working directory. This can be changed by specifying a preexisting folder in the logfile_path parameter in the [logfile] section of the configuration file. For example:

logfile_path = C:\logs\recordingMuxer

Comments or questions about this documentation? Contact us for support!