How to setup STUN+TURN server for VoiceCall and VideoCall feature of LIveAgent:

Centos 7:

[root@turn ~]# yum -y install make gcc gcc-c++ openssl-devel libevent libevent-devel wget
[root@turn ~]# mkdir /root/turn
[root@turn ~]# cd /root/turn
[root@turn turn]# wget
[root@turn turn]# tar -xvzf
[root@turn turn]# cd coturn- && ./configure
[root@turn turn]# cd coturn-
[root@turn coturn-]# ./configure
[root@turn coturn-]# make
[root@turn coturn-]# make install

Upload turnserver config to /etc/turnserver.conf
- see attached turnserver.conf and replace following variables with your values:
  {{ publicIp }} - your sever publicIp
  {{ secret }} - generate some password that you will use later in LiveAgent Voice Call and Video Call configuration
  {{ maxBps }} - maximum bitrate that you allow for connections going through turn server (recommended: 128000)Upload SSL key for turnserver to /etc/turnserver.key
Upload SSL certificate for turnserver to /etc/turnserver.crt

Create turnserver service file /etc/systemd/system/turnserver.service

Description=turnserver Service

ExecStart=/usr/local/bin/turnserver -c /etc/turnserver.conf


Start the turnserver service:

[root@turn ~]# systemctl start turnserver

Allow the ports:

[root@turn ~]# iptables -A INPUT -p tcp -m tcp --dport 3478 -j ACCEPT
[root@turn ~]# iptables -A INPUT -p udp -m udp --dport 3478 -j ACCEPT

[root@turn ~]# iptables -A INPUT -p tcp -m tcp --dport 5349 -j ACCEPT
[root@turn ~]# iptables -A INPUT -p udp -m udp --dport 5349 -j ACCEPT