Cipango goals

Design goals of Cipango are the following:

Overall architecture

Cipango architecture is depicted on the following picture. The SIP processing layer is very similar to the HTTP one, with several classes extending their HTTP counterparts to add SIP capabilities.

Main classes of interest are the following:

SIP Processing

Cipango architecture originally evolved from a traditional (non-SIP) call processing platform we developed in a former life. As a result, SIP processing in Cipango remains very call-centric which is something we wanted to keep as it has proven a sound approach to simplicity, performance and reliability.

One of Cipango goals is to be able to host a variety of SIP elements. To support this goal, the SIP layer is organized as a pipeline of handlers. The first handler to be called after a message has been received is the Server which then delegates the actual processing to a configured chain of handlers. Depending on how this chain is configured, Cipango may run a variety of SIP elements, from stateless proxies to fully stateful SIP Servlets engine.

The architecture of Cipango configured as a Servlet engine is represented on the following figure:

The chain of handlers contains all stateful handlers needed to provide SIP Servlets support. It starts from the SipContextHandlerCollection in charge of application selection and includes CallSessionHandler, TransactionHandler and SessionHandler responsible respectively for concurrency control, transactional state processing and SIP session management.

Threading Model

JSR 289 does not specify a threading model for SIP Servlets Application Servers. Cipango uses a simple and flexible model based on SipApplicationSession. This means that only one thread can execute an activity (servlet doRequest or doResponse handler, servlet timer ...) related to a given SipApplicationSession at the same time.

This allows in particular to have a consistent model in proxy or b2b (back-to-back) applications. Indeed, in proxy mode upstream and downstreams legs belong to the same SipSession whereas in b2b mode, each leg belongs to a different SipSession. If these SipSession are created within the same SipApplicationSession, the behaviour is similar in both modes, i.e. all received message are processed in a sequential way at the servlet level. If you would like to handle incoming messages from different SIP calls concurrently in b2b mode, you only have to use a different SipApplicationSession for each SipSession.