CTI Deployment Guide

Overview

Expertflow Cloud Contact Center provides a user-friendly interface, integrated will all the basic CTI operations, and agents are not required to log in on any SIP phone, he/she just need to login into the Agent Interface, and we will automatically register a browser-based SIP phone based on his dedicated extension. This interface follows the mechanisms of WebRTC ↔ SIP.

Components 

Expertflow Cloud Contact Center CTI is the combination of 2 basic components

  1. Frontend → The graphical user interface for the agents to interact with the Contact Center, With the help of custom libraries provided by Backend.
  2. Backend → A node middleware service used for sending events to agents can be deployed on Windows or Linux machines.

Prerequisites

Following are the mandatory prerequisites for a smooth installation.

Hardware Requirements

These requirements suffice for deployment.

Item

Recommended

Notes

CPU

2 vCPU

Can be co-hosted

Memory

4 GB


Disk Space

30 GB

The minimum disk space requirement is 5 GB. The recommendation is to account for transactional storage and logs.

The gadget can be co-hosted with other Expertflow or third-party products.

Software Requirements

Item

Recommended

Notes

Operating System

  • Windows Server 
  • Linux (CentOS, Debian)

supported on these operating systems

Node

Node v14.15.5

Node v14.17.6

Tested on these two versions

Npm 

npm v6.14.11

npm v6.14.15

Tested on these two versions

nssm /pm2 

pm2 v5.1.1  

Running the module as a backend service use nssm for windows and pm2 for linux 

Freeswitch 

FreeSWITCH version: 1.10.7 (release-19-883d2cb662~64bit)

Freeswitch should be deployed and running.

Port Utilization Requirements

The default port used by the service is port 2000 whereas it can be changed from the configuration file. Following ports should remain open on the Firewall. The local security policy and any antivirus should also allow open communication on the following ports:

Type

Source Host

Source Port

Destination Host

Destination Port

TCP

<Server Application>

any/ (default 2000) 

Freeswitch

8021

HTTPS

<Client Application>

<Server Application>

Server Application Port / (default 2000)

HTTPS

<Client Application>

Freeswitch

7443

** Server Application = This is the backend application that we will deploy for the CTI connector 

** Client Application   = Agent browser on which Agent will access the CTI Toolbar to login 

Time Synchronization Requirements

If the system date and time are not synchronized the system can produce unpredictable results. Therefore, please make every effort to adhere to the following time synchronization guidelines:

The server machine and Agents machines should have their Time Zone and time configured properly according to the geographic region and synchronized. The application servers should be synchronized to the second. This synchronization should be maintained continuously and validated on a regular basis.

Software installation guide

Kindly follow the link mentioned below for the installation of each required software.

Chat Application Browser Settings

Recommended to have the valid certificates for the server and the Freeswitch machine else kindly accept two expectations for port 2000 with the IP of the machine where it is deployed and second for the port 7443 with the IP of the Freeswitch server machine.

Type

URL

HTTPS

https://<Client Application Server FQDN/IP>:2000

HTTPShttps://<FreeSwitch IP >:7443

Backend Deployment

Pull the backend release 2.2 from gdrive and extract the zip folders.

Navigate to the application folder and follow the steps listed below to deploy on a Linux machine.

Installing Node Dependencies

  1. Check npm installed by entering the command, if it’s installed it will tell the version else send an error message then kindly install npm before going forward.

Command npm -v

  1. Run npm install for the node to install all the required libraries

Command npm install

Configuration File Editing

  1. Open config.js file placed in the config directory and edit the Freeswitch server IP, port and password.
    Commandvi config/config.js

    PropertyValue
    IP<FreeSwitch IP >
    port8021
    Password<ESL Password>


Running Node Server

  1. Check node and pm2 installed by entering command if it’s installed it will tell the version else to send an error message then kindly install npm before going forward.

Command pm2 -v

Command node -v

  1. Run pm2 start app.js -n CTIBackend

Command pm2 start app.js -n CTIBackend

Testing

you can check the CTI backend is working by opening the URL in the browser https://<server_machine_ip>:2000

you can also test the backend by entering the following command on the server pm2 list it will display the list of all node running modules where you could see if CTIBackend is working or not

Back-end Application Logs

Two different types of logs are made one application-level log and the other in agent wise logging is done. The path of the logs directory is the same where you have extracted the files 

PropertyValue
Path

Application logs: /var/log/ExpertflowCTI/cti.log

Agent logs: /var/log/ExpertflowCTI/agent/1001.log

Max file5Mb
Backup file3
TypeDebug and Info

Logging Configuration File Editing

  1. Open logs.js file placed in the Logs directory and edit the log file size, backup file, path etc.
    Commandvi logs/logs.js

Troubleshooting

Issue

Recommendation

CTI not loaded.

Check if the port is opened from the server or not, by going telnet <server_machine_ip> port

Unable to initiate a call

Check if the agent machine has Freeswitch machine access.

Unable to login

Check if the password is correct from the Freeswitch administrator, or if there are two agents of similar names.

PM2 Basic Commands

Command

Description

pm2 start <app.js>

To start the node project

pm2 list

To list all running applications

pm2 stop <app_name|id>

To stop application

pm2 restart <app_name|id>

To restart running applications

pm2 delete <app_name|id>

To delete application


CTI Web Application Deployment Steps

Once the backend is deployed successfully, we can move forward to deploy the Front-end application. 

Deployment on Window Machine 

This front-end can be deployed on any application server of the user's choice (IIS, Tomcat, etc). The following section lists the steps to deploy the application on an IIS server.

  1. Download the frontend release 2.2 and place it in the (c:\inetpubt) or any desired directory. 
  2. Navigate to `c:\inetpub` folder and create a directory with the name CloudCC

    • Site name (CloudCC).
    • Physical path (c:\inetpubt\CloudCC).
    • Select binding type as https.
    • Port, default value is 443 but any other port can be assigned.
    • Please follow this guide to install and configure the SSL certificates on IIS in order to run the project on https.
    • Once this is deployed please follow these configurations

Deployment on Linux Machine 

Download the Cloud CC Node Package.

Navigate to the application folder and follow the steps listed below to deploy on a Linux machine.

Installing Node Dependencies

Check npm installed by entering a command, if it’s installed it will tell the version else send an error message then kindly install npm before going forward.

Command → npm -v

  • Run npm install for the node to install all the required libraries

Command → npm install 

Running Node Server

  • Check node and pm2 installed by entering a command, if it’s installed it will tell the version else to send an error message then kindly install npm before going forward.

Command → pm2 -v

Command → node -v

  • Run pm2 start app.js -n CTIFrontend

Command → pm2 start app.js -n CTIFrontend

Navigate to the https://<server_machine_ip>:2000

Configuration

Open the config.js file. It will be the same as below figure


S.NoProperty NameValue Description
1freeswitch_wssipwss://192.168.1.201:7443The IP and port for the FreeSwitch 
2callVariables[ 0,1,2,3,4,5,6,7,8,9,10 ]

The total list of callvariables, which we want to show on the CTI interface, Maximum CallVariables which we support are 10

3callVariablesName
{
callVariable0:'callVariable0',
callVariable1:'First Name First Nam',
callVariable2:'Last Name',
callVariable3:'Address',
callVariable4:'Date of Birth',
callVariable5:'Mobile',
callVariable6:'Country',
callVariable7:'Postal Code',
callVariable8:'Id Card',
callVariable9:'Nationality',
callVariable10:'Landline'
}

We can display the  user define Callvariable name on the CTI Interface, 

4RowVariableTrue/False

Possible Values are 

  • True
  • False

If CTI is running stand-alone without any CRM, this property will remain true, if its integrated in CRM like Microsoft this propery will be false

5CRM0/1

A possible value for this key would be 0 or 1

0= When web CTI is deployed as a standalone project without any CRM Integration 

1= When Web CTI is deployed with some CRM, The CRM can be any. If the value for this property is 1, then the crmFilePath variable must be set

6crmFilepath

The predefined path of the CRM file

To make this property work, the above property CRM must be set 1 . Value for this property depends on the CRM you are using.  Possible values are 

CRMValue
MS CRM Online CRM/ new_ms_CIF.js
7organizationDomainhttps://expertflow.dynamics.comThis value can only be set when you are using Microsoft CRM Online (CIF enabled) else you can ignore this property. This is the organization domain of your online CRM 
9entities"Lead,Account,Contact"The searching priority user can define in the config file. For example, as per this configuration, the CTI connector first searches the record in the Lead, then in the Account, and last Contact. If you wanted to search the record first in Contact, you can simply change the order as per your requirement and the searching order will be changed. 
  • After completing these configurations, Open the cti_config.js file. It will be the same as below figure
  •  
    1. IP Is where backend is deployed (which we deployed in the first section)
    2. Port is on which Backend is running
    3. freeswitch_ip is the IP of FreeSwtich 
    4. Browse the configured FQDN and the application should be accessible as shown below
    5. You need to add the following exceptions
  • Note: Both of the above exceptions will be different in your case as your backend deployment.

If you application and configurations are done successfully you able to see the below screen