Install TeamSpeak VoIP Server on CentOS / RHEL 8 - CentLinux

Latest

Sunday, 31 October 2021

Install TeamSpeak VoIP Server on CentOS / RHEL 8

Install TeamSpeak VoIP Server on CentOS / RHEL 8

Teamspeak is a popular VoIP server for Gamers. In this article, you will learn how to install Teamspeak VoIP server on CentOS / RHEL 8 or similar Linux distros.

 

Table of Contents:

 

Install TeamSpeak VoIP Server on CentOS / RHEL 8

 

What is VoIP? :

Voice over Internet Protocol (VoIP), also called IP telephony, is a method and group of technologies for the delivery of voice communications and multimedia sessions over Internet Protocol (IP) networks, such as the Internet. The terms Internet telephony, broadband telephony, and broadband phone service specifically refer to the provisioning of communications services (voice, fax, SMS, voice-messaging) over the Internet, rather than via the public switched telephone network (PSTN), also known as plain old telephone service (POTS).

The steps and principles involved in originating VoIP telephone calls are similar to traditional digital telephony and involve signaling, channel setup, digitization of the analog voice signals, and encoding. Instead of being transmitted over a circuit-switched network, the digital information is packetized and transmission occurs as IP packets over a packet-switched network. They transport media streams using special media delivery protocols that encode audio and video with audio codecs and video codecs. Various codecs exist that optimize the media stream based on application requirements and network bandwidth; some implementations rely on narrowband and compressed speech, while others support high-fidelity stereo codecs.

Early providers of voice-over-IP services used business models and offered technical solutions that mirrored the architecture of the legacy telephone network. Second-generation providers, such as Skype, built closed networks for private user bases, offering the benefit of free calls and convenience while potentially charging for access to other communication networks, such as the PSTN. This limited the freedom of users to mix-and-match third-party hardware and software. Third-generation providers, such as Google Talk, adopted the concept of federated VoIP. These solutions typically allow dynamic interconnection between users in any two domains of the Internet, when a user wishes to place a call.

In addition to VoIP phones, VoIP is also available on many personal computers and other Internet access devices. Calls and SMS text messages may be sent via Wi-Fi or the carrier's mobile data network. VoIP provides a framework for consolidation of all modern communications technologies using a single unified communications system. (Source: Wikipedia)

 

What is TeamSpeak? :

TeamSpeak is a proprietary voice-over-Internet Protocol (VoIP) application for audio communication between users on a chat channel, much like a telephone conference call. Users typically use headphones with a microphone. The client software connects to a TeamSpeak server of the user's choice, from which the user may join chat channels.

The target audience for TeamSpeak is gamers, who can use the software to communicate with other players on the same team of a multiplayer video game. Communicating by voice gives a competitive advantage by enabling players to keep their hands on the controls.

The TeamSpeak server runs as a dedicated server on Linux, macOS, Microsoft Windows and FreeBSD and uses a client based user interface or a command-line interface to control server administration and configuration.

TeamSpeak clients are available for Linux, macOS, Windows, Android, and iOS. (Source: Wikipedia)

Recommended Book: Packet Guide to Voice over IP: A system administrator's guide to VoIP technologies 1st Edition by Bruce Hartpence.

 

Environment Specification:

We are using a minimal RHEL 8 virtual machine with following specifications.

  • CPU - 3.4 Ghz (2 cores)
  • Memory - 2 GB
  • Storage - 20 GB
  • Operating System - Red Hat Enterprise Linux 8.4
  • Hostname – teamspeak-01.centlinux.com
  • IP Address - 192.168.116.243 /24

 

Updating Red Hat Enterprise Linux Server:

Connect with teamspeak-01.centlinux.com as root user by using a ssh client.

If you are facing problem while using dnf command on your RHEL server. This usually happens when you clone a virtual machine from already subscribed Red Hat Enterprise Linux server.

To workaround this problem, you have to refresh your Red Hat subscription by executing following command.

# subscription-manager refresh
1 local certificate has been deleted.
All local data refreshed

Build cache for the enabled yum repositories by executing following command at Linux bash prompt.

# dnf makecache
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - BaseOS  1.0 kB/s | 4.1 kB     00:04
Red Hat Enterprise Linux 8 for x86_64 - BaseOS  223 kB/s |  37 MB     02:50
Red Hat CodeReady Linux Builder for RHEL 8 x86_ 1.6 kB/s | 4.5 kB     00:02
Red Hat CodeReady Linux Builder for RHEL 8 x86_ 178 kB/s | 5.5 MB     00:31
Red Hat Enterprise Linux 8 for x86_64 - AppStre 3.9 kB/s | 4.5 kB     00:01
Red Hat Enterprise Linux 8 for x86_64 - AppStre 151 kB/s |  33 MB     03:41
Last metadata expiration check: 0:00:09 ago on Wed 20 Oct 2021 11:16:15 AM EDT.
Metadata cache created.

Update installed software packages on your Linux server.

# dnf update -y

If the above command updates your old Linux kernel then you have to reboot your machine with updated Linux kernel.

# reboot

Verify the version of Linux Kernel and Operating System.

# uname -r
4.18.0-305.19.1.el8_4.x86_64

# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="8.4 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.4 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8.4:GA"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/8/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.4"

 

Configure TeamSpeak Server Prerequisites:

Create a Linux user to own TeamSpeak VoIP software. Also set the TeamSpeak installation directory as home directory for that user.

# adduser teamspeak -d /opt/teamspeak

You will require wget and bunzip2 commands to download and extract TeamSpeak server setup. Therefore, install them now by using dnf command.

# dnf install -y wget bzip2

 

Install TeamSpeak VoIP Server on Linux:

You can download TeamSpeak Server software from their official website.

teamspeak-voip-server-downalod-page

We prefer to copy the download link from that webpage and use wget command to download it directly from the Linux CLI.

# cd /tmp
# wget https://files.teamspeak-services.com/releases/server/3.13.6/teamspeak3-server_linux_amd64-3.13.6.tar.bz2
--2021-10-20 11:30:50--  https://files.teamspeak-services.com/releases/server/3.13.6/teamspeak3-server_linux_amd64-3.13.6.tar.bz2
Resolving files.teamspeak-services.com (files.teamspeak-services.com)... 151.139.128.11
Connecting to files.teamspeak-services.com (files.teamspeak-services.com)|151.139.128.11|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9948972 (9.5M) [application/x-tar]
Saving to: ‘teamspeak3-server_linux_amd64-3.13.6.tar.bz2’

teamspeak3-server_l 100%[===================>]   9.49M   278KB/s    in 94s

2021-10-20 11:32:29 (103 KB/s) - ‘teamspeak3-server_linux_amd64-3.13.6.tar.bz2’ saved [9948972/9948972]

Extract downloaded setup of TeamSpeak software to /opt/teamspeak directory by using bunzip2 and tar commands.

# bunzip2 teamspeak3-server_linux_amd64-3.13.6.tar.bz2
# tar xf teamspeak3-server_linux_amd64-3.13.6.tar -C /opt/teamspeak/ --strip-components=1

To accept TeamSpeak server license, create an empty file ".ts3server_license_accepted" in /opt/teamspeak directory.

# touch /opt/teamspeak/.ts3server_license_accepted

Grant the ownership of /opt/teamspeak directory to teamspeak Linux user.

# chown -R teamspeak:teamspeak /opt/teamspeak

 

Create Systemd Service Unit for TeamSpeak VoIP Server:

To automate start of TeamSpeak VoIP service on Linux startup, you have to create a Systemd service unit.

# vi /lib/systemd/system/teamspeak.service

Add following directives in this file.

[Unit]
Description=Team Speak 3 Server
After=network.target

[Service]
WorkingDirectory=/opt/teamspeak/
User=teamspeak
Group=teamspeak
Type=forking
ExecStart=/opt/teamspeak/ts3server_startscript.sh start inifile=ts3server.ini
ExecStop=/opt/teamspeak/ts3server_startscript.sh stop
PIDFile=/opt/teamspeak/ts3server.pid
RestartSec=15
Restart=always

[Install]
WantedBy=multi-user.target

Inform the Systemd about changes in unit files.

# systemctl daemon-reload

Enable and start TeamSpeak VoIP service.

# systemctl enable --now teamspeak.service
Created symlink /etc/systemd/system/multi-user.target.wants/teamspeak.service → /usr/lib/systemd/system/teamspeak.service.

Check the status of your VoIP server to verify is it started successfully.

# systemctl status teamspeak.service
● teamspeak.service - Team Speak 3 Server
   Loaded: loaded (/usr/lib/systemd/system/teamspeak.service; enabled; vendor p>
   Active: active (running) since Fri 2021-10-22 12:15:29 EDT; 15s ago
  Process: 1456 ExecStart=/opt/teamspeak/ts3server_startscript.sh start inifile>
 Main PID: 1463 (ts3server)
    Tasks: 17 (limit: 5819)
   Memory: 26.2M
   CGroup: /system.slice/teamspeak.service
           └─1463 ./ts3server inifile=ts3server.ini daemon=1 pid_file=ts3server>

Oct 22 12:15:29 teamspeak-01.centlinux.com ts3server_startscript.sh[1456]: Star>
Oct 22 12:15:29 teamspeak-01.centlinux.com ts3server_startscript.sh[1456]: Team>
Oct 22 12:15:29 teamspeak-01.centlinux.com systemd[1]: Started Team Speak 3 Ser>
Oct 22 12:15:30 teamspeak-01.centlinux.com ts3server_startscript.sh[1456]: ---->

If you face difficulty in starting the VoIP service, check the TeamSpeak logs in /opt/teamspeak/logs directory.

 

Configure Linux Firewall for TeamSpeak VoIP Server:

Allow Teamspeak service ports in Linux firewall. or you can also create a custom service in Linux firewall.

# firewall-cmd --permanent --add-port={10011,10022,30033,10080}/tcp
success
# firewall-cmd --permanent --add-port=9987/udp
success
# firewall-cmd --reload
success

 

Conclusion:

In this article, you have successfully learned how to install TeamSpeak VoIP server on Rocky / CentOS / RHEL 8 or similar Linux distros.

No comments:

Post a Comment