FleXoSIP — A comfortable High-Level SIP API to eXosip and osip
The goal of FleXoSIP — Fast Lane for eXosip is to make
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
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.
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 https://github.com/benhoyt/inih
Why another SIP library?
I was looking for a simple, high-level SIP library for an ToT
(Telephony of Things
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,
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).
- 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)