Thursday, January 25, 2018

Genesys Chat 8.5 Installation Notes


Summary

This post will cover some of the highlights of a recent install of latest/greatest Genesys Chat architecture.  I'm not attempting to recreate the Genesys installation documentation (there's ample amount of that already), just areas that I noted were troublesome and/or not documented as clearly as I would like.

Architecture

Below is a diagram of this particular lab environment.  For clarity, the diagram does not depict all the actual processes and inter-connections.  This is a lab/all-in-one-box type deployment.  Genesys Mobility Services (GMS) is used for AP interface to Chat Server whereas was used WebAPI in the previous 8.1 architecture.


Licensing

Below is an excerpt of a Genesys license file with the line items necessary for chat highlighted.  Ten seats of chat are enabled.
FEATURE 3GP07263ACAA genesys.d 7.1 1-oct-2018 10 5379D90C1653 \
 vendor_info="v7.1 - Genesys Agent Desktop" NOTICE="Lab" \
 SIGN=AAE090E4AF30
FEATURE 3GP08393ACAA genesys.d 8.0 1-oct-2018 10 3EB730F543A4 \
 vendor_info="v8.0 - SIP Server" NOTICE="Lab" SIGN=FAC58E606844
FEATURE 3GP08693ACAA genesys.d 8.0 1-oct-2018 1 02D33156B657 \
 vendor_info="v8.0 - Genesys Chat - Lab" NOTICE="Lab" \
 SIGN=71238A487514
FEATURE ics_multi_media_agent_seat genesys.d 8.0 1-oct-2018 10 \
 63B03A7C3207 NOTICE="Lab" SIGN=1366ECF80B66
FEATURE ics_live_web_channel genesys.d 8.0 1-oct-2018 10 B606C4B7F496 \
 NOTICE="Lab" \
 SIGN=25F907A4A1DE
FEATURE DESKTOP_SUPERVISOR genesys.d 7.0 1-oct-2018 1 BE6E85DE569E \
 NOTICE="Lab" \
 SIGN=B7DBB0F88EEC
Additionally, the options below need to be set in Interaction Server to check out licenses from FlexLM daemon:


Interaction Server

  1. This particular Genesys server needs a Genesys DB Server + Data Access Point (DAP) to integrate with a database (unlike Config layer which can utilize the native client - Oracle dbclient via a DAP alone).
  2. There are a dozen or so SQL scripts included in the install directory.  The two that you need for a fresh install are (assuming Oracle DB):  isdb_oracle.sql, eldb_oracle.sql.
    $ pwd
    /home/genesys/ixnsvr/Script/Oracle
    $ ls
    eldb_oracle_7.6.1-8.0.1.sql  eldb_oracle.sql          isdb_oracle_7.2-7.5.sql      isdb_oracle_7.6-7.6.1.sql  isdb_oracle.sql
    eldb_oracle_drop.sql         isdb_oracle_7.0-7.1.sql  isdb_oracle_7.5-7.6.sql      isdb_oracle_drop.sql
    eldb_oracle_nvc.sql          isdb_oracle_7.1-7.2.sql  isdb_oracle_7.6.1-8.0.1.sql  isdb_oracle_nvc.sql
    
  3. Interop with ORS. Below is an excerpt from the current ORS Deployment guide regarding interop with eServices. 

    Starting with ORS 8.1.400.27, you create the Interaction Server Application(s) using only the Interaction Server Application template. There is no need to create an Interaction Server Application using a T- Server Application Template for the second Application object. For backward compatibility, both methods of deployment are supported.

    Based on my experience, that's simply not true.  Not configuring a multimedia switch and corresponding TServer results in the following errors in the ORS log and no routing from ORS:
    10:23:27.752 Std 20010 Configuration error. Class [ConfigDirectory] : Switch is not assinged to the tenant of Interaction Server 'ixnsvr'
    10:23:27.752 Std 23009 ORS WARNING Connection to Interaction Server configured as T-Server required, eServices functionality not enabled.
    
    Those messages are pretty clear to me:  ORS still demands the legacy configuration.  Solution: create a switching office of type Multimedia, a switch, and associate a Interaction Server with it by using a TServer application template.  Screen shots below of what that looks like:
  4. There's an undocumented health monitoring interface (HTTP/SOAP).  If you set up a HTTP 'health' port and options, you can access it via browser as depicted below:

GMS

Ensure the connection to Chat Server is on its webapi port (http).  GMS will attempt to install its own Cassandra instance but you can specify instead it use an existing/external instance.  

ORS

The deployment guide pretty well covers the configurations necessary to get ORS to function with eServices.  Couple items of note:
  1. Turn on mcr-pull-by-this node
  2. Turn up full debug on logs if you're troubleshooting.  Setting 'debug' as the log level alone won't get you log messaging down to SCXML processing level.  You need set the x-server-trace-level option as well.


Workspace

By default, Workspace will try to login an agent to all media types.  If you don't have licensing to support that, you'll get annoying errors on start-up of Workspace.  To eliminate those, turn on role-based security, create a role with privileges corresponding to your licensing (in this case, voice and chat only) and assign the role to the agent(s).  Role-based security is disabled by default.  You do the double-negative to turn it on (option is 'disable', set it to false).

Capacity Rule

By default, agents have no capacity for any eService-type interactions (chat, email, etc).  If you don't configure a Capacity Rule with chat, for instance, and assign it to an agent - no routing of a chat will occur.  

Creating a rule requires deployment of GAX.  Below are some screenshots of a simple rule to allows for 1 voice and 3 chat interactions simultaneously.

Routing - GMS Chat API Version 1

There are two Chat API's within GMS.  Below are the steps to get a V1 Chat interaction routed to an agent.

Develop the Composer Routing Script

Screen shots below of the dev cycle for a extremely simplistic chat routing script.  It simply sends an inbound request to an Agent Group.

File, New, Other

Name the project, Select Route project type, Next, Finish.


Connect to Configuration Server.

Open up the default.workflow and add a single Route Interaction block.  For Targets, choose an Agent Group you've previously created in Administrator.


Open the default.ixnprocess view and add an Interaction Queue object.  Go to the properties of that object and add a View.  Connect the Interaction Queue to the Workflow object.


Left click on the project in Project Explorer, choose Generate All.  Select Deploy Project and Publish data to Configuration Server.  This step will build/validate the code, deploy the resulting WAR file on the Tomcat instance included with Composer, and finally build all the necessary Script objects in Configuration Management.



After completing this step, the project will be on Tomcat and objects below are constructed in Configuration.


Those four objects have linkages to each other.  The 'defaultWorkflow' object has the URI to the actual Composer-generated SCXML on Tomcat.


We use the InteractionQueue object in an Chat endpoint.  Create an Endpoint in Options and add the reference to the Queue as its value.



Using the web GUI to GMS, provision a 'request-chat' service and add the Chat endpoint you just defined to it.



In theory, all the provisioning is complete now.  GMS provides a sample Chat V1 API client on the main page with the 'Sample' link.


Select the 'Request-Chat' scenario and click the 'Connect' button.

The GMS sample client will then initiate a chat session against the endpoint defined in GMS + Chat Server.  Interaction Server will trigger ORS to fetch the Composer-generated SCXML file on Tomcat.  The SCXML strategy will route the chat to the agent in the defined Agent Group.


Copyright ©1993-2024 Joey E Whelan, All rights reserved.

Monday, January 8, 2018

Cassandra Integration with Genesys Orchestration Server

Summary

Below are some the challenges and steps I took to overcome them in getting Genesys Orchestration Server (ORS) working with Cassandra.  ORS uses Cassandra for session persistence storage.

Environment

Below is a diagram of an 'all in one' server scenario.  Suitable for lab instances.  All components coexist within 1 virtual machine (VM) - in theory.

Challenge 1:  Genesys supported RHEL version vs required Python version

Genesys is currently supporting up to version 6 of RHEL/CentOS.  RHEL 6 has Python 2.6 as its native version.  Specifically, Python 2.6 is a hard requirement as yum is dependent on it.

Cassandra's command line interface, CQLSH, requires Python 2.7.  Simply installing Python 2.7 on top of 2.6 will result in a broken OS.

Solution:  Utilize RHEL Software Collections (SCL).  SCL allows multiple versions of software packages to coexist within one system.  Below are the commands to install SCL.
yum install scl-utils
yum install centos-release-scl-rh
yum install python27
Starting up a bash shell via SCL to enable Python 2.7 is accomplished with this command:
scl enable python27 bash
If you want to exit the SCL environment (and re-enable Python 2.6)
exit

Challenge 2: Eliminating warnings/degraded mode message in Cassandra logs.

If you deploy Cassandra on a fresh install of RHEL/CentOS - you will see various warnings that are tied to insufficient resource limits for the user starting Cassandra.

Solution:
  • Create a file 'cassandra.conf' in the /etc/security/limits.d directory to increase the limits.  For the example below I have a user 'genesys' who will be starting Cassandra.  I increase the limits for that user.
genesys - memlock unlimited
genesys - nofile 100000
genesys - nproc 32768
genesys - as unlimited
  • Eliminate swap warning.  If you want to turn off swap:
    • Temporary Method:
      • swapoff -a
    • Permanent Method: Comment out the swap partition in /etc/fstab
  • Eliminate jemalloc warning.  
The only other mandatory config requirement is turning on RPC in the cassandra.yaml file.
# Whether to start the thrift rpc server.
start_rpc: true

Challenge 3:  Buggy Cassandra version included in Genesys install package

Genesys is currently packaging Cassandra 2.2.5 on their latest install media for Routing.  That release has a documented bug with CQLSH.  If you attempt to use CQLSH in this version, you'll get an error that looks like this:
Connection error: ('Unable to connect to any servers', {'127.0.0.1': TypeError('ref() does not take keyword arguments',)})
Solution:  Don't use the Cassandra package that is included in the Genesys media.  Download a current tar ball from the Cassandra site.

Challenge 4:  Cassandra user authentication issues with ORS

So, I don't have a documented/confirmed bug on this one - but I'm fairly confident there is one.  I've been unable to get authentication to work properly with ORS 8.1.4 after trying pretty much everything.  

If you define a user within Cassandra AND set the authenticator variable within cassandra.yaml - user authentication should work.  Below is the configuration item necessary in cassandra.yaml.
authenticator: PasswordAuthenticator
In fact, I tested this with CQLSH and also with a Python client (pycassa).  The Python client uses the same RPC link to Cassandra that ORS uses.  CQLSH and the Python client work just fine with authentication.  

Setting user name + password is done with the persistence options under ORS in Genesys Administrator.  Screen shot below.

If you set those options (and configure Cassandra as discussed above), this is what I see in the ORS logs.  ORS can't connect to Cassandra and simply terminates.
21:09:16.499 Std 23001 ORS Cassandra schema version ORS8130000 Schema validation failed . Orchestration is terminating.
Solution (not a good one):  Turn off authentication in Cassandra and blank out the username/password in the ORS persistence options.  Cassandra.yaml config to allow all/no authentication on RPC below:
authenticator: AllowAllAuthenticator
ORS will connect to Cassandra with no username/password and then create its keyspace 'Orchestration'.  Below is what you should see in Cassandra after a successful ORS integration with Cassandra:
$ python -V
Python 2.7.13
$ /home/cassandra/apache-cassandra-3.11.1/bin/cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.11.1 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> describe keyspaces;

system_schema  system           system_distributed
system_auth    "Orchestration"  system_traces     

Copyright ©1993-2024 Joey E Whelan, All rights reserved.