NetComposer / nksip

Erlang SIP application server
Apache License 2.0
358 stars 127 forks source link

Introduction

NkSIP is an Erlang SIP framework or application server, which greatly facilitates the development of robust and scalable server-side SIP applications like proxy, registrar, redirect or outbound servers, B2BUAs, SBCs or load generators. NkSIP takes care of much of the SIP complexity, while allowing full access to requests and responses.

A single NkSIP instance can start any number of SIP Services, each one listening on a specific set of transports (udp, tcp, tls, sctp, ws or wss), ip addresses and ports. A Service can provide a callback module where it can implement a number of callback functions. All of them are optional, having sane defaults in case they are not implemented. For outgoing-only SIP applications, a callback module is not necessary.

NkSIP also includes a powerful plugin mechanism, that can be used to modify its behaviour without having to fully understand or modify the core engine, and with virtually zero overhead, even if the Service uses a large number of plugins.

NkSIP is very stable and robust. Thanks to its Erlang roots it can perform many actions while running: starting and stopping Services, hot code upgrades, configuration changes and even updating your application behavior, used plugins and function callbacks on the fly.

NkSIP scales automatically using all of the available cores on the machine. Using common hardware (4-core i7 MacMini), it is easy to get more than 3.000 call cycles (INVITE-ACK-BYE) or 10.000 registrations per second. A disributed, highly available version of NkSIP will be a service of the upcoming NetComposer platform.

Features

Standard plugins

Documentation

1. User Guide
2. Reference Guide
3. API Guide
4. Standard Plugins
5. Cookbook
6. Advanced Concepts
7. Roadmap
8. Changelog

Quick Start

NkSIP has been tested on OSX and Linux, using Erlang 21. It should work from Erlang 17, but it tested only on 21.

> git clone https://github.com/kalta/nksip
> cd nksip
> make
> make tests

Now you can start a simple Service using the included default callback module:

> make shell
1> nksip:start(test, #{sip_listen=>"sip:all, sips:all"}).
{ok,b746wle}
2> nksip_uac:options(test1, "sip:sip2sip.info", []).
{ok,200,[]}

You can check now the tutorial and sample applications on nksip_samples.

Contributing

Please contribute with code, bug fixes, documentation fixes, testing with SIP devices or any other form. Use GitHub Issues and Pull Requests, forking this repository.