From openSIPS

Development: TransportInterface

Transport Interface Design


This document contains the design of the new Transport Interface that will be deployed in OpenSIPS 2.1.


Description

The current transport protocols (UDP, TCP, TLS, etc.) are embedded directly in the OpenSIPS core. This makes the management of these protocols in script more difficult and also complicates the addition of new ones (such as WebSockets).

In order to simplify this, we designed a new Transport Interface that aims to provide a new transport layer in OpenSIPS's core. This interface will separate the network level transport protocols (such as TCP and UDP) from higher level, SIP aware, protocols (such as TLS, WebSocket, SCTP). This clear separation will facilitate the addition of higher level protocols while efficiently reusing the lower network level protocols implementations.

Design

The architecture of the new Transport Interface is presented in the picture below.

The picture can be split in three layers, from bottom up:

  1. Transport layer - contains the primitive network transport protocols, such as TCP and UDP. This layer will manage all the connections in an efficient and centralized manner.
  2. SIP layer - consists of several protocols that use the transport layer to send and receive messages to and from the network, while being SIP aware. These modules will not do any connection managing, but only process the data received from the transport layer according to SIP requirements. The protocols (SCTP, TLS, WebSocket) will be implemented as standalone modules and will be automatically loaded when listening interfaces are defined for them.
  3. Routing layer - here stand the OpenSIPS modules and core that will use a set of simple generic send/receive functions. The underneath transport protocol will be transparent for them.
Retrieved from https://www.opensips.org/Development/TransportInterface
Page last modified on December 19, 2014, at 12:51 PM