Skip to content

Latest commit

 

History

928 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elixip

Elixip is a personal project to write a multipurpose SIP application layer.

It provides the Finite State Language (FSL), a domain specific language specialized to describe call scenarios. It is vaguely inspired by the K language developed by the N-SOFT company as part of their Rekoll product. The scenario itself is an .exs file and takes advantage of the Elixir syntax to provide a finite state machine (FSM) programming model. This is to me the most explicit way to handle cleanly the asynchronous logic of programmable telecommunication.

The scenario engine itself is a framework similar to ExUnit. It sits on top of a SIP stack fully developed in Elixir. Such call / telecom scripts are actually Elixir scripts so they can take full advantage of the SIP stack and interact at dialog / transaction or event message level if needed. Furthermore, external libs and APIs can be easily called and used within such scenarios as long as they comply with the asynchronous nature of finite state machines.

The framework will also provide a control interface to the Medooze media server in order to handle the media part of telecommunication over IP. A clean abstraction (Behaviour) is defined and other media servers could easily be interfaced as well if needed.

Background reading

The reasoning behind the project is developed in three articles:

The roadmap

The project will provide in the long term:

  • a testing tool called elixipp, similar to sipp, capable of running elixip scenarios to test other SIP servers.
  • a mini scriptable Session Border Controller, called borderline, using FSL to fine-tune message handling.
  • a scriptable and extensible SIP application inspired by kamailio. Called kelixip.

In terms of capabilities, the emphasis will be on:

  • support for Total Conversation calls with any combination of audio/video/realtime text media including using the WebRTC bitstream — how each medium's codec is chosen
  • support for SIP over UDP, TCP, TLS and WSS
  • support for clustering and load sharing

What is available, what is not.

Framework

Testing tool: elixipp

  • Interactive command elixipp for testing tools: done
  • Interactive display for elixipp: done
  • multiple calls + max duration of test and final reporting: done
  • Interface with Medooze Media server: done

Scriptable SIP server kelixip

  • Loadable .beam modules: done,
  • declarative TOML config with hot-reloadable: done
  • a CLI + REST control API, and Prometheus metrics: done.
  • domains/dial-plan
  • digest auth (stateless nonce, HA1 via the auth_db module)
  • a multi-domain registrar via the registrar module and the registrar.exs script
  • NAT/flow for WebRTC — a media-server pool
  • a Total Conversation capable conferencing (MCU): done
  • MCU: hardware acceleration watchdog and delegated codec negotiation: done
  • kelixip B2BUA and call processing: in progress

Roadmap

  • FSL: Service Building Blocks concept inspired by Jain SLEE 1.1

  • kelixip and elixip presence support including some level of LoST support

  • kelixip distributed cluster tech

  • FSL: formal proof of scenario correctness

  • Total Conversation call recorder

  • Automated call captioning

  • Push notification support

  • borderline SBC:

    • very good integration with fail2ban
    • liveview based management interface
    • signed and armored configuration files
    • signed beams modules and scenarios
    • anti DDOS + hardened SIP and RTP application firewall.
  • kelixip 2.0:

    • domain based partitions of transaction and dialog layers
    • use of RabbitMQ as link to the mediaserver
    • Wesh Wesh Mesh network with auto discovery feature
    • full IP V6 support
    • XMPP support as first class citizen
    • Matrix protocol support as first class citizen

The Finite State Language

Elixip provides the Finite State Language (FSL), a domain specific language to describe SIP / call scenarios as finite state machines, written as .exs files. It covers the config block, the state / on_events / goto / stay finite-state-machine model, the scenario context (sip_ctx), sub-scenarios (spawn_fsm) and cooperative shutdown, exception handling, how the engine works under the hood, and the SIP.Session.* macro helpers — for both client (UAC) scenarios and server (UAS) scenarios (a REGISTER registrar, or a call server that answers incoming INVITEs with the reply_invite* macros).

👉 The full FSL reference lives in FSL.md.

elixipp: the testing tool

elixipp is the test tool of the project: a sipp replacement that runs FSL scenarios as a client (UAC) or a server (UAS), and can drive a media server to fully simulate SIP calls. It covers running scenarios from mix or as a standalone escript, the built-in scenarios, the command-line options, the live --monitor view, external JSON parameterisation and account files, logging and the sequence diagram.

👉 The full elixipp guide lives in ELIXIPP.md.

kelixip: the application server

kelixip is the productized SIP server built on the same stack

  • 👉 TOML-declared domains,
  • 👉 script-per-function dispatch,
  • 👉 loadable modules ,
  • 👉 a control CLI / REST API,
  • 👉 and Prometheus metrics.

Design documentation

How it is built, and why. Six documents under docs/design/, each covering what is implemented and running:

Document Covers
DESIGN-SIPSTACK.md transport, message, transaction and dialog layers
DESIGN-FRAMEWORK.md session layer, mixins, B2BUA, media and the media-server adapters
DESIGN-FSL.md the language, its macros and the FSM engine
DESIGN-ELIXIPP.md the test tool
DESIGN-KELIXIP.md the application server and its module system
DESIGN-MCU.md the conferencing module

The other documents in that directory are designs not yet implemented; docs/design/notes/ holds source studies and investigation records.

License

Elixip is distributed under the Business Source License 1.1 (BSL 1.1), a source-available license. See LICENSE.md for the full terms.

A French translation is available in LICENSE_fr.md for convenience; the English LICENSE.md is the only legally binding version.

About

A distributed SIP application server written in Elixir language

Topics

Resources

Stars

14 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages