How to install FreeSwitch PBX on Ubuntu 20.04 | 18.04

The
You can download this article in PDF format to support us through the following link.

Download the guide in PDF format

turn off
The

The
The

PBX is short for Private Branch Exchange. It is a dedicated telephone system used within an organization and can be customized according to the needs of a particular organization. The organization’s PBX users can communicate internally or externally with the outside world. Channels such as VoIP (Voice over IP), ISDN (Integrated Services Digital Network) or analog facilitate external communication.

The advantage of using a PBX phone system is that you can get more calls than physical lines, toll-free calls between users, and a large number of functions such as call queues, digital receptionists, call forwarding, voice mail, and phone recording. Some examples of PBX phone systems include FreeSwitch, 3cx, Elastix, FreePBX and Asterisk.

In this guide, we will study how to install FreeSwitch PBX on Ubuntu 20.04 / 18.04.

What is FreeSwitch PBX?

FreeSwitch is a free open source communication platform. It can realize real-time communication, video and voice over IP and WebRTC. It can run on Windows, MacOS, Linux and FreeBSD. It is used to build a PBX system with the following functions, such as Web conference with chat and screen sharing, IVR, session border controller, routing with the lowest wholesale cost, etc.

What are the functions of the FreeSwitch PBX system?

  • Runs on Windows, Linux and FreeBSD
  • IVR API
  • WebRTC support
  • Call recording (left/right in stereo caller/called party)
  • High-performance multi-threaded core engine
  • Parallel hunting
  • Continuous hunting
  • Auto attendant
  • Basic functions of IP/PBX
  • Custom ringback tone (early media)

Install FreeSwitch PBX on Ubuntu 20.04/18.04

Update your system package first

sudo apt -y update

Next, install the dependencies required to run FreeSwitch PBX on Ubuntu 20.04/18.04

sudo apt install -y git subversion build-essential autoconf automake libtool libncurses5 libncurses5-dev make libjpeg-dev libtool libtool-bin libsqlite3-dev libpcre3-dev libspeexdsp-dev libldns-dev libedit-dev yasm liblua5.2-dev libopus-dev cmake

The following packages are optional, but we can install them.

sudo apt install -y libcurl4-openssl-dev libexpat1-dev libgnutls28-dev libtiff5-dev libx11-dev unixodbc-dev libssl-dev python-dev zlib1g-dev libasound2-dev libogg-dev libvorbis-dev libperl-dev libgdbm-dev libdb-dev uuid-dev libsndfile1-dev

Install the handle and signal cable

sudo apt install -y cmake
cd /usr/src
sudo git clone https://github.com/signalwire/libks.git
cd libks
sudo cmake .
sudo make
sudo make install

cd /usr/src
git clone https://github.com/signalwire/signalwire-c.git
cd signalwire-c
sudo cmake .
sudo make
sudo make install

Next, get the latest FreeSwitch version from Publish page Use wget:

cd /usr/src
sudo wget https://files.freeswitch.org/freeswitch-releases/freeswitch-1.10.3.-release.zip
sudo apt -y install unzip
sudo unzip freeswitch-1.10.3.-release.zip
cd freeswitch-1.10.3.-release/

note If you did not install decompression, please install it by running apt -y install unzip

sudo apt -y install unzip

Now run the standard installation process

sudo ./configure -C
sudo make

If you encounter an error during compilation, you can comment out any modules that caused the error or install missing dependencies. In my case, I initially commented out language/mod_lua and applications/mod_signalwire, but you can comment more based on the errors you receive. After that, restart the compilation as follows:

sudo ./configure && sudo make clean && sudo make

For a successful compilation, you will see the following output:

Next, install freeswitch:

sudo make install

Output

How to install FreeSwitch PBX on Ubuntu 20.04 | 18.04

Now compile the sound

sudo make all cd-sounds-install cd-moh-install

Create simlink to easily use the service.

sudo ln -s /usr/local/freeswitch/bin/freeswitch /usr/bin/
sudo ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin

Add new groups and users with less privileges to run FreeSWITCH service.

cd /usr/local
sudo groupadd freeswitch
sudo adduser --disabled-password  --quiet --system --home /usr/local/freeswitch --gecos "FreeSWITCH Voice Platform" --ingroup freeswitch freeswitch
sudo chown -R freeswitch:freeswitch /usr/local/freeswitch/
sudo chmod -R ug=rwX,o= /usr/local/freeswitch/
sudo chmod -R u=rwx,g=rx /usr/local/freeswitch/bin/

We need to add FreeSwitch as a systemd unit file. Use your favorite editor to open the new file /etc/systemd/system/freeswitch.service and paste the following:

sudo vim /etc/systemd/system/freeswitch.service

Paste the following

[Unit]
Description=freeswitch
Wants=network-online.target
Requires=syslog.socket network.target local-fs.target
After=syslog.socket network.target network-online.target local-fs.target

[Service]
Type=forking
Environment="DAEMON_OPTS=-nonat"
EnvironmentFile=-/etc/default/freeswitch
ExecStartPre=/bin/chown -R freeswitch:freeswitch /usr/local/freeswitch
ExecStart=/usr/bin/freeswitch -u freeswitch -g freeswitch -ncwait $DAEMON_OPTS
TimeoutSec=45s
Restart=always
RestartSec=90
StartLimitInterval=0
StartLimitBurst=6

User=root
Group=daemon
LimitCORE=infinity
LimitNOFILE=100000
LimitNPROC=60000
LimitSTACK=250000
LimitRTPRIO=infinity
LimitRTTIME=infinity
IOSchedulingClass=realtime
IOSchedulingPriority=2
CPUSchedulingPolicy=rr
CPUSchedulingPriority=89
UMask=0007
NoNewPrivileges=false

[Install]
WantedBy=multi-user.target

Start the FreeSwitch service and enable it at startup

sudo chmod ugo+x freeswitch.service
sudo systemctl start freeswitch.service
sudo systemctl enable freeswitch.service

Now check the status of the FreeSWITCH service

sudo systemctl status freeswitch.service

If freeswitch is properly installed and running, the output should look like this

How to install FreeSwitch PBX on Ubuntu 20.04 | 18.04

Now you can use the following client to connect to FreeSWITCH

# fs_cli -r

You will see the following output:

How to install FreeSwitch PBX on Ubuntu 20.04 | 18.04

PBX related courses.


Build a free VoIP PBX and call center on Asterisk 16 Issabel.

Build a free VoIP PBX and call center on Asterisk 16 Issabel.

★★★★☆
(324)

$ 14.86

$ 45.70

In stock

Buy now

How to install FreeSwitch PBX on Ubuntu 20.04 | 18.04Udemy.com


Installing and setting up FreeSWITCH: basic knowledge

Installing and setting up FreeSWITCH: basic knowledge

★★★★☆
(66)

$ 14.86

$ 45.70

In stock

Buy now

How to install FreeSwitch PBX on Ubuntu 20.04 | 18.04Udemy.com

This is a guide on how to install FreeSwitch PBX on Ubuntu 20.04/18.04. See more guides below!

  • How to install and configure 3CX PBX on Debian
  • How to install FreePBX on CentOS 8
  • How to install FreePBX 15 on CentOS 7
  • How to install FreePBX 15 on Ubuntu

The
You can download this article in PDF format to support us through the following link.

Download the guide in PDF format

turn off
The

The
The

Sidebar