Asterisk and the SIP protocol

Hello everyone! I'm Benoît, application developer at NetDevices, specializing in application development. Today, I'd like to introduce you to the principle ofAsterisk and the SIP protocol.

What is Asterisk?

Asterisk is a private branch exchange (PABX) under Linux. The PABX enables complete management of internal and external communications for a group of extensions. For example, in an insurance group, a company or a hospital.  

Asterisk offers a wide range of features to meet the vast majority of telephony needs. For example, it enables direct calls (like a conventional telephone line), as well as voicemail, call queuing, call conferencing, call redirection to the appropriate department according to customer choice (call center)...

These features will certainly be complemented by protocols to enhanceUX telephone and mobile.

A possible protocol: SIP.

What is the SIP protocol?

SIP (Protocol Initiation Session) is a protocol for establishing multimedia calls (audio, video, messages). Calls are first initiated in audio mode. Then it's a matter of switching to video mode without interrupting the call. Another example: in the event of a loss of connection or bandwidth, the call is renegotiated to keep it in progress while reducing call quality.

This is made possible by the codec.

What is Codec?

The Codec ("encoding-decoding") is a device capable of compressing and/or decompressing a digital signal. Each codec can have several modes of operation that will change its performance. The choice of codec to use therefore depends on whether it can be used end-to-end (in a VOIP call, both terminals need to be able to encode and decode the signal, so the codec must be installed), and on network quality. A codec with a high compression ratio (and therefore a loss of quality) will be chosen when network quality is insufficient. On the other hand, higher-quality codecs will be used with good-quality connections.

Some examples of codecs

The most famous codec in audio is: The MP3

However, when making audio/video calls, the most commonly used codecs are:

  • G711 G723 G726 G729 GSM iLBC for the audio (we can find the GSM which is used for calls on mobile networks)
  • H.261 H.263/ H.263+ / H.263++ MPEG-4 H.264 for the video

Of course, there are many others, some free, some proprietary.

Project made in NetDevices

Within NetDevices, we have been brought to use these technologies for one of our customers. Our client (VideoDesk) is a start-up that allows e-commerce sites to integrate a chat interface (text, audio or video) between customers and sellers. VideoDesk was already offering their services in website integration and contacted us to create a SDK allowing to integrate their service into mobile applications. The SDK was developed for integration on iOS and Android. To carry out the various tests, we set up a SIP server within our company in order to have control over the end-to-end exchanges.