What is SIP Protocol

Session Initiation Protocol(SIP) is an application layer protocol which is used mainly for Voice/Video/IM over internet. In simple words SIP is main standard behind all VoIP communication.

Although SIP is main protocol behind the VoIP communication but you will be surprised that SIP only does following things:

  • User location: determine the end users;
  • User availability: check if end points are available
  • User capabilities: determine the media and media parameters
  • Session setup: setting up session between endpoints
  • Session management: managing the session like transfer, termination etc.

SIP doesn’t transmit the media but needs other protocols to transfer media

SIP is a standard protocol which maintains the session but in order to transmit media it relies on other application layer protocols like:

1. SDP (Session Description Protocol)

2. RTP (Realtime Transfer Protocol)

3. RTCP (Realtime Transmission Control Protocol)

SDP is another high level application layer protocol which acts as part of SIP packet payload. SDP is nothing but a standard which holds the information about the session like, session id ,originator, media descriptions etc.

SIP uses some codecs to encode/decode the Audio/Video streams in binary format and most popular one are G.711 and G.729.

RTP is another protocol which is used to send/receive media between two end points but RTP works in parallel with SIP. It means once session is established RTP will start transmitting media. RTP works in conjunction with RTCP.

RTCP is another protocol who is very important in VoIP communication because this guy monitos the RTP trafic like how may packets transmitted, how many got discarded and how was the quality of service(QoS)

Since SIP is an application layer protocol which means we can forward the SIP packets to the endpoints using transport layer protocols. So SIP packets can be transmitted using:

  • UDP
  • TCP

Since voice is very critical thing to be delivered as quickly as possible to the endpoints so UDP becomes obvious choice for the SIP applications but since UDP is stateless so there might be some packet loss which may lead to call quality issues. TCP has other problems like being stateful protocol if there is lag in the network it may delay in voice and may lead to call drop.

Hence on high level SIP packets with other streams in parallel flow as follows:

A Typical SIP packet looks like below, we will discuss the SIP packet in the next post:

I hope you got some theory about SIP now. We will discuss about the SIP.

Happy reading!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store