Revision as of 19:11, April 28, 2017 by Sschlich (talk | contribs) (Update with the copy of version: DRAFT)
Jump to: navigation, search

Configuring Interaction Recording Web Services

You'll need to update the application.yaml file on each of your Interaction Recording Web Services nodes to provide the basic configuration. You created this file (or Interaction Recording Web Services created it for you) as part of Deploying the Web Application. In later topics, you'll learn more about modifying this file to configure additional features and security. For now, review the contents below for details about each section in the application.yaml configuration file.

Important
When editing the application.yaml file, the values for the configuration options that are strings must be enclosed in double quotation marks in certain cases. Specifically:
  • For string options only, the values YES, NO, ON, OFF, TRUE, FALSE (in upper or lower case) must be quoted.
  • If the option is a boolean (true/false) option, then any of the values in the previous bullet can be used without quotes.
  • Values that look like numbers but are treated as strings (for example; PINs, phone numbers, encryption keys), that begin with leading zeroes must be quoted.
  • Avoid placing leading zeroes on numeric options; doing so will cause your option to be interpreted as an octal value.
For example, specifying crRegion: NO (indicating Norway) will be interpreted as crRegion: FALSE. Instead, this must be specified using double quotation marks crRegion: “NO”.

Logging Settings

The purpose of this section is to tell Interaction Recording Web Services where to find the logback.xml file you created (or Interaction Recording Web Services created for you) as part of Deploying the Web Application and where to save logs.

The application.yaml.sample file includes the following default logging section:

logging:
   config: logback.xml
   file: cloud.log
   path: /var/log/jetty9

See logging for details about all supported configuration settings for this section.

Jetty Settings

Since Jetty is embedded in Interaction Recording Web Services, you have to use the jetty section of the application.yaml file to tell Interaction Recording Web Services how Jetty should behave.

The application.yaml.sample file includes the following default jetty section:

jetty:
   host: [RWS_HOST]
   port: 8080
   idleTimeout: 30000
   soLingerTime: -1
   sessionMaxInactiveInterval: 1800
   enableWorkerName: true
   enableRequestLog: true
   requestLog:
      filename: yyyy_mm_dd.request.log
      filenameDateFormat: yyyy_MM_dd
      logTimeZone: GMT
      retainDays: 90
      append: true
      extended: true
      logCookies: true
      logLatency: true
      preferProxiedForAddress: true
   enableSsl: false
   ssl:
      port: 443
      securePort: 8443
      keyStorePath: [KEYSTORE_PATH]
      keyStorePassword: [KEYSTORE_PASSWORD]
      keyManagerPassword: [KEY_MANAGER_PASSWORD]
      trustStorePath: [TRUSTSTORE_PATH]
      trustStorePassword: [TRUSTSTORE_PASSWORD]
   httpOnly: true
   secure: false
   sessionCookieName: GIRJSESSID

See jetty for details about all supported configuration settings for this section.

Cassandra Cluster Settings

The settings in the cassandraCluster section tell Interaction Recording Web Services how your Cassandra cluster should be managed and accessed.

The application.yaml.sample file includes the following default cassandraCluster section:

cassandraCluster:
  thrift_port: 9160
  jmx_port: 7199
  keyspace: sipfs
  nodes: [ToBeChanged: <CASSANDRA_PRIMARY_DC_NODES>]
  backup_nodes: [ToBeChangedOrRemoved: <CASSANDRA_BACKUP_DC_NODES>]
  replication_factor: [ToBeChanged: <REPLICATION_FACTOR>]
  write_consistency_level: [ToBeChanged: "CL_LOCAL_QUORUM" for multi-datacenters env, "CL_QUORUM" for single-DC env.]
  read_consistency_level: [ToBeChanged: "CL_LOCAL_QUORUM" for multi-datacenters env, "CL_QUORUM" for single-DC env.]
  max_conns_per_host: 16
  max_cons: 48
  max_pending_conns_per_host: 80
  max_blocked_threads_per_host: 160

  cassandraVersion: 1.2
  useSSL: [ToBeChanged: "false" | "true"]
  truststore: [ToBeChanged: path to client truststore]
  truststorePassword: [ToBeChanged: truststore password]

Make sure you update all settings marked as [ToBeChanged]. See cassandraCluster for details about all supported configuration settings for this section.

Server Settings

The settings in the serverSettings section provide the core settings Interaction Recording Web Services needs to run your node.

The application.yaml.sample file includes the following default serverSettings section:

serverSettings:
  # URLs
  externalApiUrlV2: [ToBeChanged: public URL including protocol, address and port, <PUBLIC_SCHEMA_BASE_URL>]/api/v2
  internalApiUrlV2: [ToBeChanged: internal URL including protocol, address and port, <INTERNAL_SCHEMA_BASE_URL>]/internal-api
  undocumentedExternalApiUrl: [ToBeChanged: public URL including protocol, address and port, <PUBLIC_SCHEMA_BASE_URL>]/internal-api

  # Paths
  pathPrefix: [ToBeChangedOrRemoved: <PATH_PREFIX>]
  internalPathPrefix: [ToBeChangedOrRemoved: <INTERNAL_PATH_PREFIX>]

  # General
  temporaryAuthenticationTokenTTL: [ToBeChangedOrRemoved: <TEMPORARY_AUTHENTICATION_TOKEN_TTL>]
  enableCsrfProtection: false
  enableStaleSessionsMonitoring: true
  staleSessionsMonitorSettings:
    monitoringInterval: 60
    expiredSessionAge: 180

  # Timeouts
  activationTimeout: 12000
  configServerActivationTimeout: 35000
  configServerConnectionTimeout: 15000
  connectionTimeout: 4000
  inactiveUserTimeout: 60
  reconnectAttempts: 1
  reconnectTimeout: 10000

  # OPS account
  opsUserName: [ToBeChanged: <OPS_USER_NAME>]
  opsUserPassword: [ToBeChanged: <OPS_USER_PASSWORD>]

  # CME credentials
  applicationName: [ToBeChanged: <CONFIG_SERVER_RWS_APPLICATION_NAME>]
  applicationType: CFGGenericClient
  cmeUserName: [ToBeChanged: <CONFIG_SERVER_USER_NAME>]
  cmePassword: [ToBeChanged: <CONFIG_SERVER_USER_PASSWORD>]
  syncNode: [ToBeChanged: "true"|"false"]

  # Call Recording
  createCallRecordingCF: true
  crClusterName: [ToBeChanged: <NAME_OF_ES_CLUSTER>]
  crRegion: [ToBeChanged: <CR_REGION>]
  cryptoSecurityKey: [ToBeChanged: <CRYPTO_SECURITY_KEY>]
  webDAVMaxConnection: 50
  webDAVMaxTotalConnection: 500

  # Multi regional supporting
  nodePath: [ToBeChanged: node position in cluster, example: /<REGION>/HOST
  nodeId: [ToBeChangedOrRemoved: unique value in cluster <NODE_ID>]

  # SSL and CA
  caCertificate: [ToBeChangedOrRemoved: <CA_CERTIFICATE>]
  jksPassword: [ToBeChangedOrRemoved: <JKS_PASSWORD>]

  # CORS
  crossOriginSettings:
    allowedOrigins: [ToBeChangedOrRemoved: <CROSS_ALLOWED_ORIGINS>]
    allowedMethods: [ToBeChangedOrRemoved: <CROSS_ALLOWED_METHODS>]
    allowedHeaders: [ToBeChangedOrRemoved: <CROSS_ALLOWED_HEADERS>]
    allowCredentials: [ToBeChangedOrRemoved: <CROSS_ALLOW_CREDENTIALS>]
    corsFilterCacheTimeToLive: 120
    exposedHeaders: [ToBeChangedOrRemoved: <CROSS_EXPOSED_HEADERS>]

  # Elasticsearch
  elasticSearchSettings:
    indexPerContactCenter: [ToBeChangedOrRemoved: "true"|"false"]
    enableScheduledIndexVerification: [ToBeChangedOrRemoved: "true"|"false"]
    indexVerificationInterval: 720
    enableIndexVerificationAtStartUp: [ToBeChangedOrRemoved: "true"|"false"]
    retriesOnConflict: 3
    useTransportClient: true
    transportClient:
      nodes: [ToBeChanged: <ELASTIC_SEARCH_NODES>]
      useSniff: false
      ignoreClusterName: false
      pingTimeout: 5000
      nodesSamplerInterval: 5000
    waitToIndexTimeout: 5000

  # Recording Settings
  recordingSettings:
    auditLogDeletedFiles: [ToBeChangedOrRemoved: "true"|"false"]
    recordCryptoServerDecryptMaxConnection: 50
    recordCryptoServerDecryptMaxTotalConnection: 500
    recordCryptoServerDecryptSocketTimeout: 30000
    keyspaceNameSettingsCacheSecondsTTL: 300
    regionsSettingsCacheSecondsTTL: 300
    readOnlyRetryAfterSeconds: 1200

  # Screen Recording
  screenRecordingSettings:
    screenRecordingVoiceEnabled: [ToBeChangedOrRemoved: "true"|"false"]
    screenRecordingEServicesEnabled: [ToBeChangedOrRemoved: "true"|"false"]
    recordingInteractionEventsTTL: 172800
    clientSessionManagerCacheTTL: 60
    contactCenterInfoManagerCacheTTL: 90

  # Caching Settings
  cachingSettings:
    enableSystemWideCaching: [ToBeChangedOrRemoved: "true"|"false"]
    contactCenterFeaturesTTL: 30
    contactCenterSettingsTTL: 30

  # Screen Recording Connections Reporting
  screenRecordingConnectionReportingSettings:
    reportingEnabled: [ToBeChangedOrRemoved: "true"|"false"]
    createReportingCF: [ToBeChangedOrRemoved: "true"|"false"]
    connectionInfoHoursTTL: 168
    historyCountsMinutesTTL: 1440

  # Multimedia Disaster Recovery
  drMonitoringDelay: 1800

  # DoS Filter Settings
  enableDosFilter: [ToBeChanged: "true"|"false"]
  dosFilterSettings:
    maxRequestsPerSec: 25
    delayMs: 100
    maxWaitMs: 50
    throttledRequests: 5
    throttleMs: 30000
    maxRequestMs: 30000
    maxIdleTrackerMs: 30000
    insertHeaders: [ToBeChangedOrRemoved: <DOS_FILTER_INSERT_HEADERS>]
    trackSessions: [ToBeChangedOrRemoved: <DOS_FILTER_TTACK_SESSIONS>]
    remotePort: [ToBeChangedOrRemoved: <DOS_FILTER_REMOTE_PORT>]
    ipWhitelist: [ToBeChangedOrRemoved: <DOS_FILTER_IP_WHITE_LIST>]

  multiPartResolverMaxUploadSize: 536870912
  multiPartResolverMaxInMemorySize: 67108864

  # Media Life Cycle Management
  backgroundScheduledMediaOperationsSettings:
    enableBackgroundScheduledMediaOperations: [ToBeChangedOrRemoved: "true"|"false"]
    schedulerThreads: 4
    schedulePollingInterval: 60
    speechMinerMaxConnection: 20
    speechMinerMaxTotalConnection: -1
    speechMinerSocketTimeout: 60000
    defaultBackupExportURI: [ToBeChangedOrRemoved: <DEFAULT_BACKUP_EXPORT_URI>]
    useFullPathInMediaFileBackup: false

  # CometD Settings
  cometDSettings:
    cometdSessionExpirationTimeout: 60
    closeHttpSessionOnCometDExpiration: true
    maxSessionsPerBrowser: 1
    multiSessionInterval: 2000

  # Log Header Settings
  logHeaderSettings:
    enableLogHeader: [ToBeChangedOrRemoved: "true"|"false"]
    updateOnPremiseInfoInterval: 600

  # Update on startup settings
  updateOnStartup:
    opsCredentials: false
    features: false

Make sure you update all settings marked as [ToBeChanged], except for the settings that start with aws. You should also be sure to do the following:

Important
To create the ops user and credentials in Cassandra and to enable the features in the Interaction Recording Web Services node, set the following parameters to true during the first Interaction Recording Web Services startup in the application.yaml file:

updateOnStartup
opsCredentials: true
features: true
After Interaction Recording Web Services is started, you must change both options to false for production:

updateOnStartup
opsCredentials: false
features: false

See serverSettings for details about all supported configuration settings for this section.

On Premise Settings

The settings in the onPremiseSettings section instruct Interaction Recording Web Services on how to communicate with the Configuration Server. The application.yaml.sample file includes the following default onPremiseSettings section:

# On Premise Settings (when syncNode is true)
onPremiseSettings:
  cmeHost: [ToBeChanged: <CONFIG_SERVER_HOST>]
  cmePort: [ToBeChanged: <CONFIG_SERVER_PORT>]
  backupCmeHost: [ToBeChanged: <BACKUP_CONFIG_SERVER_HOST>]
  backupCmePort: [ToBeChanged: <BACKUP_CONFIG_SERVER_PORT>]
  countryCode: [ToBeChanged: "US" | "CA" | etc]
  tlsEnabled: [ToBeChangedOrRemoved: "true"|"false"]

Make sure you update all settings marked as [ToBeChanged]. See onPremiseSettings for details about all supported configuration settings for this section.

Tuning the Interaction Recording Web Services Host Performance

Complete the steps below on each Interaction Recording Web Services node to tune the performance of the host environment.

Start

  1. To optimize TCP/IP performance, you can run the following commands:
  2. sudo sysctl -w net.core.rmem_max=16777216 
    sudo sysctl -w net.core.wmem_max=16777216 
    sudo sysctl -w net.ipv4.tcp_rmem="4096 87380 16777216" 
    sudo sysctl -w net.ipv4.tcp_wmem="4096 16384 16777216" 
    sudo sysctl -w net.core.somaxconn=4096 
    sudo sysctl -w net.core.netdev_max_backlog=16384
    sudo sysctl -w net.ipv4.tcp_max_syn_backlog=8192 
    sudo sysctl -w net.ipv4.tcp_syncookies=1 
    sudo sysctl -w net.ipv4.tcp_congestion_control=cubic
  3. Increase the file descriptors by adding the following to the /etc/security/limits.conf file:
  4. <user_name>		hard nofile	100000
    <user_name>		soft nofile	100000
  • <user_name> — The name of the user or group that is starting Jetty.

End

Enabling features in the Feature Definitions file

The Feature Definitions file contains a list of features that are available for your contact center. The file is used to define features for the contact center by both Web Services (when installed) and Interaction Recording Web Services. For this reason, the procedure has a dependency on whether Web Services is being deployed along with Interaction Recording Web Services.

Perform the following operations on one of the Interaction Recording Web Services nodes.

For Web Services and Interaction Recording Web Services Installations

  1. Locate the gir-feature-definitions.json file in the installation_CD/config-templates folder.

  2. If you have already followed the Enabling features in the Feature Definitions file instructions from the Web Services and Applications Deployment Guide (GWS), locate the feature-definitions.json file that was installed and edited into the GWS_CONF folder on the Web Services nodes.
    If you did not already follow the Enabling features in the Feature Definitions file instructions, locate the gws-feature-definitions.json file in the installation_CD/config-templates folder.

  3. Merge the contents of the two files together into a feature-definitions.json file in the GWS_CONF folder, as follows:
    1. Ensure there is only one set of enclosing [ ... ] (for example, first and last lines).
    2. Ensure there is a comma after each { ... } excluding the last.
    3. Ensure there are no duplicate items, for instance api-provisioning-read and api-provisioning-write.

  4. Edit the file and for each feature that you want to enable for a new contact center, set the autoAssignOnContactCenterCreate flag to true. If you have already created your contact center or you are unsure of which Interaction Recording Web Services features to enable at this point, leave the autoAssignOnContactCenterCreate flags as they appear.
    Important
    The instructions that follow provide more detail about the Interaction Recording Web Services features and how to enable or disable them using REST API endpoints. For additional information, refer to Configuring Features.
  5. Merged Feature Definitions File - Example [+] Show example.


  6. Follow the steps in the Ensuring the Feature Definitions file is Read at Start-Up section.

For Interaction Recording Web Services Only Installations

  1. Locate the gir-feature-definitions.json file in the installation_CD/config-templates folder.

  2. Copy the file to feature-definitions.json file in the GWS_CONF folder, and open the file.

  3. For each feature that you want to enable for a new contact center, set the autoAssignOnContactCenterCreate flag to true. If you are unsure of which Interaction Recording Web Services features to enable, leave them as they appear.
    Important
    The instructions that follow provide more detail about the Interaction Recording Web Services features and how to enable or disable them using REST API endpoints. For additional information, refer to Configuring Features.
  4. Feature Definitions File - Example [+] Show example.


  5. Follow the steps in the Ensuring the Feature Definitions file is Read at Start-Up section.


Ensuring the Feature Definitions file is Read at Start-Up

The Feature Definitions file is by default not read at start-up.

To ensure that it is read at start-up:

  1. Add the following setting to application.yaml under the serverSettings section, on one of the Interaction Recording Web Services nodes:
     updateOnStartup:
        features: true
    
  2. Restart the Interaction Recording Web Services node.
  3. Ensure you remove the setting after Interaction Recording Web Services has been started.
    Important
    Instructions about starting can be found in the Starting and Testing page.

Next Step

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