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
- Frontend → The graphical user interface for the agents to interact with the Contact Center, With the help of custom libraries provided by Backend.
- 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 |
| 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 | |
HTTPS | https://<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
- 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
- Run npm install for the node to install all the required libraries
Command → npm install
Configuration File Editing
Open config.js file placed in the config directory and edit the Freeswitch server IP, port and password.
Command → vi config/config.jsProperty Value IP <FreeSwitch IP > port 8021 Password <ESL Password>
Running Node Server
- 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
- 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
Property | Value |
---|---|
Path | Application logs: /var/log/ExpertflowCTI/cti.log Agent logs: /var/log/ExpertflowCTI/agent/1001.log |
Max file | 5Mb |
Backup file | 3 |
Type | Debug and Info |
Logging Configuration File Editing
- Open logs.js file placed in the Logs directory and edit the log file size, backup file, path etc.
Command → vi 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.
- Download the frontend release 2.2 and place it in the (c:\inetpubt) or any desired directory.
- 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.No | Property Name | Value | Description | ||||
---|---|---|---|---|---|---|---|
1 | freeswitch_wssip | wss://192.168.1.201:7443 | The IP and port for the FreeSwitch | ||||
2 | callVariables | [ 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 | ||||
3 | callVariablesName | { | We can display the user define Callvariable name on the CTI Interface, | ||||
4 | RowVariable | True/False | Possible Values are
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 | ||||
5 | CRM | 0/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 | ||||
6 | crmFilepath | 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
| ||||
7 | organizationDomain | https://expertflow.dynamics.com | This 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 | ||||
9 | entities | "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
-
- IP Is where backend is deployed (which we deployed in the first section)
- Port is on which Backend is running
- freeswitch_ip is the IP of FreeSwtich
- Browse the configured FQDN and the application should be accessible as shown below
- 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