Creating a Totalview3CX Linux Service¶
Prerequisites¶
.NET Core 3.1 must be installed on server. See section Install and/or Verify .NET Core 3.1 Installation
3CX must be installed and running on same machine as Totalview3CX ConnectorLinux service/daemon is targeted to be installed on.
Verify by running the following command:
sudo apt list --installed | grep 3cx
It should show 3cxpbx package as installed.
Verify that 3CX services are running, by running the following command:
sudo systemctl status "*3CX*"
It should output a couple of pages with information about running 3CX services.
3CX connector must be created in Totalview Admin.
Installation and Configuration Steps¶
Create totalview user:
useradd totalviewuser
Create folders:
/bin/3CXCore
and/bin/3CXCore/Logs
Locate the 3CXCore files in
<InstallDir>\\InstallFiles\\3CXCoreLinux
or<InstallDir>\\InstallFiles\\3CXCoreLinux1605
Copy Totalview3CX Connector files to
/bin/3CXCore/
(root can be owner)Give execute permission to /bin/3CXCore/Totalview3CXCore:
sudo chmod +x /bin/3CXCore/Totalview3CXCore
Set totalviewuser as owner of Logs folder:
sudo chown totalviewuser:totalviewuser /bin/3CXCore/Logs
Edit
/bin/3CXCore/config.xml
setPhoneSystemBinPath to the bin folder of the installed 3CX relative to the installation (e.g.
../../../var/lib/3cxpbx/Bin
)ServerIpAddress to the IP or DNS name of the Totalview Server
ServerPort to the Port of the Totalview Server
ConnectorName to the correct name registered in Totalview Admin
Register Daemon¶
Edit
/bin/3CXCore/Totalview3CXCore.service
file (might not need any change)Set correct Description
Set correct WorkingDirectory
Set correct User
Set correct Group
Set correct SystemIdentifier
Copy the file to systemd
cp Totalview3CXCore.service /lib/systemd/system/
Reload Daemon with
systemctl daemon-reload
Enable the Totalview3CXCore Daemon
systemctl enable Totalview3CXCore
Start the Totalview3CXCore Daemon
systemctl start Totalview3CXCore
Verification¶
To verify that Totalview3CX Connector service is starting and running without errors, view the logs in /bin/3CXCore/Logs
.
The connector should also show up in Totalview Admin as running.
Service Control Commands¶
Start Daemon¶
sudo systemctl start Totalview3CXCore
See Status¶
sudo systemctl status Totalview3CXCore
Stop Daemon¶
sudo systemctl stop Totalview3CXCore
Config.xml Example for Linux Daemon¶
<startupparameters>
<ServerIpAddress>localhost</ServerIpAddress>
<MaximumRetries>-1</MaximumRetries>
<ServerPort>3333</ServerPort>
<ConnectionTimeout>15</ConnectionTimeout>
<ConnectorName>3CX</ConnectorName>
<FileLogLevel>4</FileLogLevel>
<ConnectorType>3CX</ConnectorType>
<ReconnectInterval>20</ReconnectInterval>
<PhoneSystemBinPath>../../../var/lib/3cxpbx/Bin</PhoneSystemBinPath>
</startupparameters>
Install and/or Verify .NET Core 3.1 Installation¶
Install .NET Core 3.1¶
Follow Linux installation instructions on Download .NET Core 3.1.
Verify Installation¶
Run command:
dotnet --list-runtimes
If .NET Core 3.1 is installed, it should be shown in the output of the previous command.