Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The CHAT role is used for conducting chat sessions with agents from external websites. The CHAT role is also required for WhatsApp integrations. The chat server is a Java application, which can be installed in parallel on the web servers with corresponding additional RAM of about 4 GB per server. Alternatively, the chat-server can be installed on a separate server, or on the load balancer. The following recommendations are made:
InstallationJava 8 InstallationFirst of all, Java 8 is installed:
Installing and Configuring ClientMessengerClientMessenger InstallationFirst of all, the ClientMessenger directory is copied to /home/jtel
Hazelcast Cluster Configuration FileThe hazelcast.xml file is copied to the configuration directory of the chat server. Note, this assumes that the file has been prepared already. See the installation instructions for the WEB role for details of how to prepare this file.
Client Messenger ConfigurationThe configuration or the start file jtel-clientmessenger may have to be adapted so that the database connection can be established. Here <password> must be replaced with the password for the root user of the database:
Install ClientMessenger with systemd
Create the Update ScriptAn update script is created for updating the chat server:
Configure the FirewallNext, the open ports for the chat service must be entered in the firewall and saved persistently. Here you can distinguish whether http (speak unsecure websocket) or https (secure websocket) is used. Since the load balancer usually decrypts the https, for https only port 3003 needs to be opened to the load balancer. Firewall configuration httpExecute the following commands, on the following machines:
Firewall configuration https
Load Balancer Configurationhaproxy.cfg AdjustmentsFor httpThe following adjustments are made on the haproxy, in case of a http connection for the chat to the outside:
For https
Reload HaproxyThen, reload the haproxy with the following command:
Chat ConfigurationParameters (as sysadmin)For https / wss
For http / ws
StatusAn appropriate agent status for "Chat" - or an existing status - must be configured so that chat is distributed to the agent: Max chats per agentThe maximum number of parallel chats per agent must be configured. This value is set to 0 by default for all agents. Additional configurations for WhatsAppIn order for What's App to work, further configurations still need to be made. Note: setting up the WhatsApp business account or connecting to the provider (currently TynTec) is done directly with the provider.
Additional configuration in jtel-clientmessengerThe parameter DATADIR must be checked. This must point to either the /srv/jtel/shared/Data/Clients/ directory if it is hosted directly on the chat server, or /home/jtel/shared/Data/clients/ if the server has mooted the directory.
Additional configuration on the load balancerAdditional entries are required in the frontend area for the portal:
Additional parametersThe following system parameters must be checked in the portal:
Customize TynTec API endpointsIt may be necessary to adjust the API endpoints to which the messages are sent. Currently TynTec does not offer the possibility to do this via a web configuration, this must be done via a REST call. The easiest way to do this is to use Postman. The following parameters are required, both callback URLs are adjusted according to the end point of the system.
Chat Connector ConfigurationThe following additional parameters are configured in the Chat Connector:
|
Sv translation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Translations Ignore |
Code Block | ||||
---|---|---|---|---|
| ||||
yum -y install https://cdn.jtel.de/downloads/java/jdk-8u202-linux-x64.rpm |
ClientMessenger Installieren und Konfigurieren
ClientMessenger Installation
Das Verzeichnis ClientMessenger wird nach /home/jtel kopiert.
Code Block | ||
---|---|---|
| ||
cp -R /home/jtel/shared/JTELCarrierPortal/Utils/Install/ClientMessenger/ /home/jtel/ClientMessenger
chown -R jtel:jtel /home/jtel/ClientMessenger |
Hazelcast Cluster Konfiguration
Die Konfiguration des Hazelcast-Clusters muss geprüft werden. Bei Neuinstallationen von Release 3.11 ab 01.04.2018 sind die Einträge in hazelcast.xml vorhanden, davor hingegen nicht.
- Zum einen, wird der Chat-Server als Member im Cluster aufgenommen.
Zum anderen werden die CHAT Buffer und Counter der Konfiguration - falls nicht vorhanden - hinzugefügt.
Die notwendigen Konfigurationsabschnitte in hazelcast.xml sind hier aufgeführt:
Code Block | ||||
---|---|---|---|---|
| ||||
...
<tcp-ip enabled="true">
...
<member>CHATSERVER</member>
</tcp-ip>
...
<ringbuffer name="CHAT">
<in-memory-format>BINARY</in-memory-format>
<backup-count>1</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>60</time-to-live-seconds>
<capacity>500</capacity>
</ringbuffer>
<map name="CHATCOUNTERS">
<backup-count>0</backup-count>
<async-backup-count>1</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="PER_NODE">5000</max-size>
</map> |
Sämtliche Rechner im Hazelcast-Cluster betrachten:
- Rolle DATA, DB-Master
- hazelcast.xml updaten
- updatepl.sh ausführen
- Rolle TEL
- hazelcast.xml updaten
- PlatformUDPListener neu starten
- Rolle WEB
- hazelcast.xml updaten
updatejb.sh ausführen
- Rolle CHAT (das System, was gerade installiert wird!)
- hazelcast.xml am besten kopieren
ClientMessenger als Daemon Prozess installieren
Falls die Repositories auf einer Windows Maschine liegen (dies kann nur alte Installationen betreffen), muss der Start-Skript /etc/init.d/jtel-clientmessenger vorher repariert werden, damit aus CR+LF nur LF wird.
Code Block | ||
---|---|---|
| ||
sed -i -e 's/\r//g' /home/jtel/ClientMessenger/init.d/jtel-clientmessenger |
Die Konfiguration, bzw. die Startdatei jtel-clientmessenger muss ggf. angepasst werden, damit die Datenbank-Verbindung aufgebaut werden kann. Hierbei muss <password> mit den Passwort für den root User der Datenbank ersetzt werden:
Code Block | ||
---|---|---|
| ||
...
-Dde.jtel.platform.clientmessenger.connection=jdbc:mysql://acd-dbm/JTELWeb?user=root\&password=<password>\&characterEncoding=utf8 \
... |
Anschließend, wird der Prozess als Linux Daemon installiert:
Code Block | ||
---|---|---|
| ||
cd /home/jtel/
cp /home/jtel/ClientMessenger/init.d/jtel-clientmessenger /etc/init.d/
chmod 755 /etc/init.d/jtel-clientmessenger
chkconfig jtel-clientmessenger on
service jtel-clientmessenger start |
Update Skript anlegen
Für das Updaten des Chat-Servers wird ein Update-Skript angelegt:
Code Block | ||
---|---|---|
| ||
cat <<EOFF>/usr/local/bin/updatesc.sh
#!/bin/bash
service jtel-clientmessenger stop
cp /home/jtel/shared/JTELCarrierPortal/Utils/Install/ClientMessenger/bin/* /home/jtel/ClientMessenger/bin
chown -R jtel:jtel /home/jtel/ClientMessenger
service jtel-clientmessenger start
EOFF
chmod +x /usr/local/bin/updatesc.sh |
Firewall Konfiguration
Als nächstes müssen in der Firewall die Port-Freigaben für den Chat Dienst eingetragen und persistent gespeichert werden. Hierbei kann unterschieden werden, ob http (sprich unsecure websocket) oder https (secure websocket) genutzt wird.
Da der Load-Balancer den https üblicherweise entschlüsselt, muss bei https nur der Port 3003 auf den Load-Balancer geöffnet werden.
Firewall Konfiguration http
Folgende Befehle, auf folgende Maschinen ausführen:
- Auf CHAT Server (hier der Chat-Port sowie die Hazelcast Cluster Ports)
Code Block | ||||
---|---|---|---|---|
| ||||
firewall-cmd --zone=public --add-port=5701-5801/tcp --permanent
firewall-cmd --zone=public --add-port=3000/tcp --permanent
firewall-cmd --reload |
Code Block | ||||
---|---|---|---|---|
| ||||
firewall-cmd --zone=public --add-port=3000/tcp --permanent
firewall-cmd --reload |
Firewall Konfiguration https
Auf alle LB - bei https Verbindung nach AussenCode Block | ||||
---|---|---|---|---|
| ||||
firewall-cmd --zone=public --add-port=3003/tcp --permanent
firewall-cmd --reload |
Firewall Centos 6
Code Block | ||||
---|---|---|---|---|
| ||||
service iptables status
iptables -I INPUT 4 -p tcp -m tcp --dport 5701:5801 -j ACCEPT
iptables -I INPUT 4 -p tcp -m tcp --dport 3000:3003 -j ACCEPT
service iptables save
service iptables restart
|
Load Balancer Konfiguration
haproxy.cfg Anpassungen
Für http
Folgende Anpassungen werden am haproxy vorgenommen, bei einer http Verbindung für den Chat nach Aussen:
Code Block | ||||
---|---|---|---|---|
| ||||
frontend acdportal_chat_ws
mode http
bind :3000
timeout client 1d
default_backend backend_chat_ws
backend backend_chat_ws
mode http
balance leastconn # roundrobin
server chatserver1 <ip_addresse_oder_name>:3000 weight 1 check inter 1m
server chatserver2 <ip_addresse_oder_name>:3000 weight 1 check inter 1m |
Für https
Code Block | ||||
---|---|---|---|---|
| ||||
frontend acdportal_chat_wss
mode http
bind :3003 ssl crt /etc/haproxy/haproxy.pem
timeout client 1d
default_backend backend_chat_ws
backend backend_chat_ws
mode http
balance leastconn # roundrobin
server chatserver1 <ip_addresse_oder_name>:3000 weight 1 check inter 1m
server chatserver2 <ip_addresse_oder_name>:3000 weight 1 check inter 1m |
Haproxy neu laden
Anschließend, den haproxy neu laden mit folgenden Befehl:
Code Block | ||||
---|---|---|---|---|
| ||||
service haproxy reload |
Chat Konfiguration
Parameter (als sysadmin)
Für https / wss
ACD.Chat.Script.Library.URL
https://<load-balancer>:3003/gui/
Für http / ws
ACD.Chat.Script.Library.URL
https://<load-balancer>:3000/gui/
Status
Ein entsprechender Agentenstatus für "Chat" - oder einen vorhandenen Status - muss konfiguriert werden, sodass der Chat an den Agenten verteilt wird:
Max Chats pro Agent
Die maximale Anzahl an parallele Chats pro Agent muss konfiguriert werden. Dieser Wert ist standardmäßig bei allen Agenten auf 0 eingestellt.
Zusätzliche Konfigurationen für WhatsApp
Damt What's App funktioniert, müssen weitere Konfigurationen noch getätigt werden.
Hinweis: das Einrichten vom WhatsApp Business-Konto bzw. die Anbindung an den Provider (derzeit TynTec) erfolgt direkt mit dem Provider.
Warning | ||
---|---|---|
| ||
Der Load-Balancer muss mit https und ein gültiges Zertifikat betrieben werden. |
Zusätzliche Konfiguration im jtel-clientmessenger
Der Parameter DATADIR muss geprüft werden. Dies muss entweder auf das /srv/jtel/shared/Data/Clients/ Verzeichnis zeigen, falls dieser am Chat-Server direkt gehostet ist, oder /home/jtel/shared/Data/clients/, falls der Server das Verzeichnis gemoutet hat.
Code Block |
---|
DATADIR="/home/jtel/shared/Data/clients/" |
Zusätzliche Konfigurationen am Load-Balancer
Im Bereich frontend für das Portal sind zusätzliche Einträge nötig:
Code Block |
---|
frontend acdportal_https
...
acl whatsapp_req path /incoming
acl whatsapp_req path /delivery
...
use_backend backend_chat_ws if whatsapp_req |
Zusätzliche Parameter
Folgende System-Parameter müssen im Portal geprüft werden:
TynTec API Endpunkte anpassen
Es kann notwendig sein, die API Endpunkte anzupassen, auf den die Nachrichten gesendet werden. Derzeit bietet TynTec keine Möglichkeit dies über eine Web-Konfiguration durchzuführen, dies muss über ein REST Aufruf geschehen. Dies kann am einfachsten mit Postman erfolgen.
Folgende Parameter werden benötigt, hierbei werden beide Callback-URL entsprechend des Endpunktes des Systems angepasst.
apikey
Wert = den generierten API Key von Tyntec
Accept
application/problem+json
Content-Type
application/json
Translations Ignore |
---|
{ |
Chat-Connector Konfiguration
Folgende zusätzliche Parameter werden beim Chat-Connector konfiguriert:
- Der Haken Whatsapp wird gesetzt.
- Der TynTec API Key wird eingetragen.
- Die Rufnummer wird in E.164 Format eingetragen.