Flexisip

Last modified by François Grisez on 2019/11/14 11:30

Introduction

Flexisip is a complete, modular and scalable SIP server suite written in C++11, comprising proxy, presence and group chat functions. It also includes a push gateway, to deliver SIP incoming calls or text messages on mobile device platforms where push notifications are required to receive information when the app is not active in the foreground.

Flexisip instances can be deployed on server machines to run a SIP VoIP service. The free linphone.org SIP service has run on Flexisip since 2011, and enables Linphone users to create SIP addresses in order to connect with each other.

It can also be embedded and run perfectly on small hardware systems.

Flexisip offers the following main features:

PROXY

  • Transport protocols: SIP/UDP, SIP/TCP and SIP/TLS
  • Digest and TLS client certificate authentication
  • Routing based on a registrar database or static route file, with forking
  • Interconnected with push notifications systems for reliably notifying mobile apps of incoming calls or messages
  • “Store and forward” logic for SIP MESSAGE (IM) so that text messages can be delivered when the recipient connects to the network
  • NAT-aware with a built-in media relay module and ICE/STUN support for high level event logging for activity monitoring
  • Real-time statistics available through a command line interface
  • High availability and cluster mode for large deployments

PRESENCE

Flexisip manages SIP SUBSCRIBE and PUBLISH from client applications, in order to

  • Identify users of the service within the address book
  • Provide users with real-time presence status

GROUP CHAT

  • Entirely SIP-based solution
  • Efficient management of groups and participants
  • Multi-device support
  • Notifications of group events (users joining or leaving, new admins etc.)

The project was started by Belledonne Communications in 2011. The focus was to develop a SIP proxy solution easy to install, configure and maintain, and offering “out of the box” all the required behaviours to deploy a SIP service tuned for mobile applications.

License

Copyright © Belledonne Communications

Flexisip is dual licensed, and can be licensed and distributed:

  • under a GNU Affero GPLv3 license for free (see COPYING file for details)
  • under a proprietary license, for closed source projects. Contact Belledonne Communications for any question about costs and services.

Design

Flexisip is designed around the concept of modules taking in charge a particular processing: authentication, registration, media-relay, routing... All requests and responses go through a chain of modules in order to be processed. Modules are listed and documented here.

Flexisip's underlying SIP stack is a forked version of sofia-sip, that provides excellent performance and robust, asynchronous transport layer. The fork simply adds a few maintainance patches.

Configuration and operation

The configuration of flexisip is defined by a single /etc/flexisip/flexisip.conf ini-style configuration file. A template configuration file with full documentation of sections and keys, and their default values, is generated by invoking

flexisip --dump-default all

and installed in /etc/flexisip/flexisip.conf.sample, in order to be filled and tuned by the administrator.

In addition to the configuration file, a command-line called flexisip_stats.py and an SNMP interface are available, allowing remote administration or run-time reconfiguration of the server. Both flexisip_stats.py and SNMP allow to list and fetch in real-time internal statistics of the Flexisip process.

Note: due to the complexity of configuration of the SNMP daemon and tools in Linux, the flexisip_stats.py tool is the recommended way of interacting with flexisip statistics and configuration (such as verbosity of logs) at run-time. This tool simply uses an UNIX socket to connect to the Flexisip daemon.

Flexisip outputs warning, error or debug logs via syslog, which goes to journald logs on systemd-capable systems.

Additionally, event logs can be enabled to log call, message, register activity, per user, in a mysql database.

Clustering

Flexisip is designed to work with several instances running on different server, communicating through Redis backend in which routing information of users is stored. Several Flexisip instances can be used together in order to scale a large deployment and tolerate faults. This is achieved without load balancer (the load balancer would be a single point of failure): instead we recommend to use DNS-SRV records to define priorities between flexisip server and client-based load-balancing (using DNS-SRV weights).

 

Created by SandrineAvakian on 2017/01/05 16:20