Skip to content
Easy-to-use SIP library for IoT/ToT applications
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

FleXoSIP — A comfortable High-Level SIP API to eXosip and osip

The goal of FleXoSIP — Fast Lane for eXosip is to make eXosip and osip easy to use for common tasks involving a single inbound or outbound voice channel.

Even though the name might imply flexibility, it does not add any flexibility, as eXosip and osip already provide it all. Instead, it limits the use cases, trying to make the interface easier. Unfortunately, I did not find anything pronouncible denoting comfort and ending in -exo.

It uses eXosip, oRTP, and libsndfile to provide basic single-channel SIP functionality for building your own simple devices and/or applications.


Installation on Ubuntu 18.10

apt install libexosip2-dev libc-ares-dev libortp-dev libsndfile1-dev libinih-dev

Installation on Raspbian Stretch

libinih is not part of Debian Stretch, so we need to compile it ourselves.

apt install libexosip2-dev libc-ares-dev libortp-dev libsndfile1-dev
git clone

Why another SIP library?

I was looking for a simple, high-level SIP library for an ToT (Telephony of Things 😉) device, a motion detector who could be controlled by SIP calls and would call back on events. (The result is cowbell.) If you insist, you may also call it an IoT (Internet of Things) device…

Inspired by the ease of a solution based on Asterisk, I have been trying to use PJSIP (PJSUA2) with Python, but I never got beyond crashes. Nothing else seemed to be available in Python, so I looked for a plain C solution. I found eXosip, but couldn't make head or tails of the documentation and did not consider the API to be newbie-friendly. So I decided to start my own library, flexosip, following a simple API of

  • Register to the PBX
  • Make a call or accept a call (only one call at a time)
  • Send audio files
  • Receive DTMF tones
  • Hang up

This is all I needed and I guess it brings ToT devices a big step ahead (and also helps the beginner to softly make his feet wet with the complex world of SIP, SDP, and RDP).


The API is described in


  • Currently only handles IPv4 addresses (partly, because global c=/o= parameters do not allow multiple addresses)
  • DTMF digits are only sent/received in outdated INFO format, not in RTP telephone-event format
  • Does not yet do audio format negotiation (requires the caller to be able to receive PCMA/8000 aka A-Law 8 kHz audio)
You can’t perform that action at this time.