Requirements

Operating system : CentOS, Debian, Ubuntu.

The hardware should be chosen according to the workload you want to be able to sustain. Although flexisip is not quite CPU intensive (unless you are transcoding), you should make sure that your machine has enough RAM.
Up to about 10000 connections, you should be OK with 8 GB of RAM.

Installation from our repositories

Centos

Only Centos 7 is supported.

1. Install “Extra Packages for Enterprise Linux (EPEL)” repository ; it is used for some Flexisip dependencies like Hiredis library.

yum -y install epel-release

2. Add Belledonne Communications' repository by creating /etc/yum.repos.d/BelledonneCom.repo with following content:

# keep this repository enabled even if you enable beta/alpha repositories
[Belledonne-stable]
name=Belledonne-stable
baseurl=http://www.linphone.org/snapshots/centos/$releasever/stable
enabled=1
gpgcheck=0

# enable this if you want pre-release packages
[Belledonne-beta]
name=Belledonne-beta
baseurl=http://www.linphone.org/snapshots/centos/$releasever/beta
enabled=0
gpgcheck=0

# enable this to have development (unstable) packages
[Belledonne-alpha]
name=Belledonne-alpha
baseurl=http://www.linphone.org/snapshots/centos/$releasever/alpha
enabled=0
gpgcheck=0
No release of Flexisip has been made since the creation of “stable” repository. Please, use “beta” repository until Flexisip 2.0.0 is published. 

3. Perform the actual installation:

yum update
yum install bc-flexisip

The installation is completed. You can directly go to Post-installation instructions section.

Debian/Ubuntu

No release of Flexisip has been made since the creation of “stable” repository. Please, use “beta” repository until Flexisip 2.0.0 is published. 

Only Debian 8, Debian 9 and Ubuntu 18.04LTS are supported.

1. Create the Belledonne Communications APT repo in /etc/apt/sources.list.d/belledonne.list.

# For Debian 8
deb [arch=amd64] http://linphone.org/snapshots/debian stretch stable beta # alpha

# For Debian 9
deb [arch=amd64] http://linphone.org/snapshots/debian jessie stable beta # alpha

# For Ubuntu 18.04 LTS
deb [arch=amd64] http://linphone.org/snapshots/ubuntu bionic stable beta # alpha

You may uncomment 'beta' and/or 'alpha' branches if you need access to pre-release and/or development packages, but keep in mind that stable branch must always be enabled because some external dependencies of Flexisip are provided by this.

2. Install Belledonne Communications' PGP key for package sign checking

# For Debian
wget https://linphone.org/snapshots/debian/keyring.gpg -O - | sudo apt-key add -

# For Ubuntu
wget https://www.linphone.org/snapshots/ubuntu/pubkey.gpg -O - | sudo apt-key add -

3. Update APT cache and install Flexisip and its dependencies

apt update
apt install bc-flexisip

The installation is completed. You can directly go to Post-installation instructions section.

Installation from sources using git

The source code of Flexisip is available on our GitLab instance here.

1. Fetch the source code by cloning the repository recursively:

git clone https://gitlab.linphone.org/BC/public/flexisip --recursive -b <branch_name>

Replace <branch_name> by one of the following:

  • A release tag name if you want a specific release (e.g. "2.0.0").
  • A release branch name if you want a specific release plus all post release fixes (e.g. "release/2.0")
  • "master" if you want the development version.

2. Follow instructions in README.md file at the root of the project.

Post-installation instructions

Generate the configuration file

Make Flexisip to generate its default configuration file:

# as root
/opt/belledonne-communications/bin/flexisip --dump-default all > /etc/flexisip/flexisip.conf

This generated file contains all the available settings with their respective documentation.

By default, Flexisip behaves as a simple forwarding proxy. See Configuration chapter for more information about how to customize it.

Starting the needed services

Flexisip's executable is installed in /opt/belledonne-communications/bin/flexisip . Running it without any argument will make Flexisip to behave as a SIP proxy, but ti can provide other kind of services. This can be chosen by using --server command-line argument, which takes three values :

  • proxy : launch Flexisip as a SIP proxy (default behaviour).
  • presence : launch Flexisip as a presence server.
  • conference : launch Flexisip as a conference server (group chat).

Flexisip is also furnished with several SystemD scripts in order to be run as system daemon. There is one Systemd service for each kind of server. For instance, the following command will run the proxy and the presence server:

systemctl start flexisip-proxy flexisip-presence

By default, Flexisip isn't scheduled for starting on system boot. You may do so by calling:

# Make the proxy and presence servers to start on system boot
systemctl enable flexisip-proxy flexisip-presence

The three services (proxy, presence, conference) run in their own process. They can be together running on the same machine or spread on several hosts.

Firewall configuration

On a fresh RedHat or CentOS installation, the firewall is turned ON by default, with almost all ports forbidden. Flexisip won't be able to operate at all under these conditions.

Simply turning off the firewall will allow full operation:

sudo systemctl stop firewalld

however your system administrator may not like this approach, and will prefer enabling selective ports. A Flexisip server will generally need:

  • the TCP ports for SIP/SIPS: these are the ports mentionned in the transports definition of global section of flexisip.conf ;
  • the 3478 UDP port for the builtin STUN server that helps clients to use ICE for efficient media stream transmissions ;
  • the media relay UDP ports, for the media relay service of Flexisip, which uses randomly selected ports in a configurable range.
Created by François Grisez on 2020/02/20 11:34