Following is the procedure to configure Chat Server:
-
Stop
EF_ChatServerservice in Windows Services pane -
Navigate to
<installation-dir>\hybrid-chat\core\chat_server\configdirectory -
Open
config.jsonfile with any text editor -
Save the file after configuration changes and start
EF_ChatServerservice -
Chat Server logs can be found at
/EFLogs/chat-solution/chat-server
Configuration
Follow JSON Schema rules for changes in config.json file. Following is a sample of this file:
{
"ActiveMQ": {
"GeneralQueue": "General",
"host1": "localhost",
"host2": "localhost",
"priority": 100,
"port": "61615",
"url": "https://localhost:8162",
"username": "admin",
"password": "admin",
"tls": true,
"certificatePath": "https/client.pem",
"certificateKeyPath": "https/client.key",
"certificateAuthorityPath": "https/broker.pem",
"passphrase": "password",
"heartbeat": "9000,3000",
"timeout": 3000
},
"TranscriptService": {
"enabled" : true,
"PdfOptions": {
"Author": "EF Chat Service",
"Title": "Chat Transcript",
"Creator": "EF Chat Server",
"Producer": "EF Chat Server",
"TranscriptsDirectory": "./resources/transcripts",
"FontsDirectory": "./resources/fonts",
"Font": "calibri_light.ttf",
"HeadingFont": "Calibri.ttf",
"FooterText": "Powered by ExpertFlow Chat Server",
"ActivityMessageBackgroundColor": "#bad3fc",
"ActivityMessageTextColor": "#1b3766",
"ChatMessageTextColor": "#000",
"TranscriptPageSize": "Letter",
"MainLogo": "./resources/logos/transcript-logo.png",
"HeaderText": "Chat Transcript"
},
"EmailOptions": {
"EmailAddress": "chatserver.expertflow@gmail.com",
"Password": "Expertflow464",
"Host": "smtp.gmail.com",
"Port": 587,
"Secure": false,
"Body": "PFA",
"Subject": "Chat Transcript"
}
},
"conversation": {
"wrapUp": {
"enabled": false,
"wrapUpTime": 0
}
},
"agent": {
"reconnectTime": 30,
"alias": "ExpertFlow"
},
"server": {
"port": 8444,
"ssl": {
"enabled": true,
"socket_connection_limit": 1000,
"privateKey": "https/localhost.key",
"certificate": "https/localhost.cert",
"passphrase": ""
},
"transport": {
"pingInterval": 3000,
"pingTimeout": 6000,
"debug_transport": "false"
},
"certificateBundlePath":"https/chat-server.ca-bundle"
},
"bot": {
"enabled": false,
"directHandOff": true,
"primaryBotId": "bot",
"handOffThreshHold": 1.1,
"handOffIntent": "human",
"handOffText": "Please wait, We are finding an agent for you"
},
"connector": {
"smsLanguage": "en"
},
"db":{
"url": "https://localhost:8450",
"type": "mongo",
"lastAgentAPI":"https://localhost:8450/getLastAgent?type=outbound&refId={refId}"
},
"reporting": {
"enabled": true
},
"mre_microservice": {
"url" :"https://localhost:8447"
},
"mre_url": "https://127.0.0.1:8095/",
"cim" : {
"isIntegrated" : false,
"labelsUrl": "http://192.168.2.50:8081/cim/label",
"queryUrl": "http://192.168.2.50:8081/cim/customer?query=phone:{refId}"
},
"FILE_SERVER_URL": "https://127.0.0.1:8495/",
"pcs":{
"intent":""
},
"history_port": "",
"history_username": "",
"history_password": "",
"enable_announcements": true,
"scale": false,
"instance_id": "chat_server_1",
"subscribe_external": true,
"customerReconnectTime": "30",
"RESPONSE_TO_NULL_INTENT": ""
}
Following table explains configuration parameters
|
|
Configuration Variable |
Default Value |
Expected value |
Limitations |
Description |
|---|---|---|---|---|---|
|
1 |
ActiveMQ.GeneralQueue |
General |
String |
|
Name of the ActiveMQ queue where Communication Server listens. Chat Server is the only producer of this queue. Do not change. |
|
2 |
ActiveMQ.host1 |
localhost |
String |
This is TCP connection, HTTP & HTTPS are not supported |
Host of ActiveMQ server |
|
3 |
ActiveMQ.host2 |
localhost |
String |
This is TCP connection, HTTP & HTTPS are not supported |
Host of ActiveMQ server |
|
4 |
ActiveMQ.priority |
1000 |
|
|
|
|
5 |
ActiveMQ.port |
61615 |
Number |
61615 if ActiveMQ.tls is |
Port where ActiveMQ Stomp listener is exposed. |
|
6 |
ActiveMQ.url |
https://localhost:8162 |
String |
https://<fqdn>:8162 if ActiveMQ.tls is |
Active MQ HTTP endpoint url. Provide core host machine fqdn here not reverse proxy |
|
7 |
ActiveMQ.username |
admin |
String |
|
ActiveMQ HTTP endpoint username |
|
8 |
ActiveMQ.password |
admin |
String |
|
ActiveMQ HTTP endpoint password |
|
9 |
ActiveMQ.tls |
true |
String |
|
Specifies to connect ActiveMQ over TLS. |
|
10 |
ActiveMQ.certificatePath |
https/client.pem |
String |
Applicable only when ActiveMQ.tls is |
ActiveMQ client certificate path for TLS traffic |
|
11 |
ActiveMQ.certificateKeyPath |
https/client.key |
String |
Applicable only when ActiveMQ.tls is |
ActiveMQ client certificate key path for TLS traffic |
|
12 |
ActiveMQ.certificateAuthorityPath |
https/broker.pem |
String |
Applicable only when ActiveMQ.tls is |
ActiveMQ certificate authority path |
|
13 |
ActiveMQ.passphrase |
password |
String |
Applicable only when ActiveMQ.tls is |
ActiveMQ certificate authority passphrase |
|
14 |
ActiveMQ.heartbeat |
9000,3000 |
String |
|
|
|
15 |
TranscriptService |
|
|
This configuration is not being used anymore (whole Transcript JSON block) |
|
|
16 |
conversation.wrapUp.enabled |
false |
Boolean |
|
|
|
17 |
conversation.wrapUp.wrapUpTime |
0 |
Number |
|
|
|
18 |
agent.reconnectTime |
30 |
Number |
|
Time in seconds when an agent can reconnect in case of disconnection, agent is logged out after this time expires and his / her chats are re-routed. |
|
19 |
agent.alias |
Expertflow |
String |
|
Agent name to show to customer |
|
20 |
server.port |
8444 |
Number |
|
Server port where Chat Server is hosted |
|
21 |
server.ssl.enabled |
true |
Boolean |
|
Specifies Chat Server is hosted on HTTP or HTTPS. |
|
22 |
server.ssl.socket_connection_limit |
1000 |
Number |
|
|
|
23 |
server.ssl.privateKey |
https/localhost.key |
String |
Applicable only when server.ssl.enabled is |
Server certificate key file |
|
24 |
server.ssl.certificate |
https/localhost.cert |
String |
Applicable only when server.ssl.enabled is |
Server certificate which is offered to clients when hosted |
|
25 |
server.ssl.passphrase |
|
String |
Applicable only when server.ssl.enabled is |
Server certificate passphrase |
|
26 |
server.transport.pingInterval |
3000 |
Number |
|
Socket.io pint interval |
|
27 |
server.transport.pingTimeout |
6000 |
Number |
|
Socket.io ping timeout before declaring the connection as disconnected. |
|
28 |
server.transport.debug_transport |
false |
String |
|
Debug socket.io transport for potential issues |
|
29 |
server.certificateBundlePath |
https/chat-server.ca-bundle |
String |
|
Certificate bundle is keystore for Chat Server, it consists of all client certificates of components which Chat Server accesses via REST endpoints over HTTPS |
|
30 |
bot.enabled |
false |
Boolean |
|
Specifies if a bot is integrated with Chat Server |
|
31 |
bot.directHandOff |
true |
Boolean |
|
if |
|
32 |
bot.primaryBotId |
bot |
String |
|
Bot id presented by Bot Connector |
|
33 |
bot.handOffThreshHold |
0.1 |
Floating point Number |
Applicable only when bot.directHandOff is |
Threshold for chat handoff to human agent |
|
34 |
bot.handOffIntent |
human |
String |
Applicable only when bot.directHandOff is |
Customer chat is sent to human agent if specified keyword / intent is received in chat from customer |
|
35 |
bot.handOffText |
... |
String |
Applicable only when bot.directHandOff is |
Message shown to customer when bot hand offs a request to human agent |
|
36 |
bot.connector.smsLanguage |
en |
String |
|
|
|
37 |
db.url |
https://localhost:8450 |
String |
|
Database Connector URL |
|
38 |
db.type |
mongo |
String |
|
This is an obsolete variable, do not change. |
|
39 |
db.lastAgentAPI |
https://localhost:8450/getLastAgent?type=outbound&refId={refId } |
String |
|
|
|
40 |
reporting.enabled |
true |
Boolean |
|
|
|
41 |
kafka.enabled |
false |
Boolean |
Kafka is not supported anymore, keep this configuration false |
|
|
42 |
mre_microservice.url |
https://localhost:8447 |
String |
|
MEW Microservice URL |
|
43 |
mre_url |
https://127.0.0.1:8095/ |
String |
|
MRE URL |
|
44 |
cim.isIntegrated |
true/false |
Boolean |
|
|
|
45 |
cim.labelsUrl |
http://192.168.2.50:8081/cim/label |
String |
|
|
|
46 |
cim.queryUrl |
http://192.168.2.50:8081/cim/customer?query=phone:{refId } |
String |
|
|
|
47 |
FILE_SERVER_URL |
https://127.0.0.1:8495/ |
String |
|
|
|
48 |
history_port |
|
port |
|
The history page is accessible through this port. If set to empty, the history page will be hosted on the default chat-server port. |
|
49 |
history_username |
|
String |
|
username to authenticate the user for history page access |
|
50 |
history_password |
|
String |
|
the password to authenticate the user for history page access, if the value is empty then the user can access the history page without authentication. |
|
51 |
enable_announcements |
True/False |
boolean |
|
When true, announcements will be available. Default is true. |
|
52 |
scale |
false |
Boolean |
|
This variable defines if Chat Servers are deployed in scale mode on the same host. Please note that agents will only be able to connect and take Chats landed on a single Chat Server in scale mode. The other Chat Server will serve only Bot conversations.
|
|
53 |
instance_id |
chat_server_1 |
String |
|
Chat Server instance id in case SCALE=true, do not change the default value if Chat Server is deployed in singleton mode. |
|
54 |
subscribe_external |
true/false |
Boolean |
|
Only used when SCALE=true, the Chat Server with SUBSCRIBE_EXTERNAL=true can only take chats from the channels other than web. |
|
55 |
customerReconnectTime |
30 |
Number |
|
This is time in seconds for which Chat Server waits for a web customer to reconnect after a network outage between Customer Gadget and Chat Server. After this time expires, Chat Server ends the chat. |
|
56 |
RESPONSE_TO_NULL_INTENT |
|
|
|
|