What is SIP – Session Initiation Protocol?

SIP (Session Initiation Protocol) is a signaling protocol used to establish a “session” between 2 or more participants, modify that session, and eventually terminate that session. It has found its MAJOR use in the world of IP Telephony. The fact that SIP is an open standard has sparked enormous interest in the telephony market, and manufacturers shipping SIP-based phones have seen tremendous growth in this sector.

sip diagram

The SIP Protocol is text-based, and bears significant resemblance to the HTTP protocol. The messages are text-based, and the request-response mechanism makes for easier troubleshooting. The actual data transmission is done by the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP) on layer 5 of the OSI model. The Session Description Protocol (or SDP) controls which of the protocols is used.

The SIP messages describe the identity of the participants in a call, and how the participants can be reached over an IP network. Encapsulated inside the SIP messages we can sometimes also see an SDP declaration. SDP (Session Description Protocol) will define the type of media channels that will be established for the session – typically this will declare which codecs are available, and how the media engines can reach each other over an IP network.

Once this exchange of setup messages is completed, the media is exchanged using yet another protocol, typically RTP (Real-Time Transmission Protocol).

SIP was developed by the IETF and published as RFC 3261, and its flexibility has allowed it to replace almost completely the H.323 protocol in the VoIP world.

What is an example of a SIP call session?

SIP calling is the process of transmitting voice calls over a SIP trunk or a SIP channel. SIP calls use a specific route to connect parties. A SIP call session between two phones is established as follows:

SIP Call between 2 lines Diagram
  • The calling phone sends out an INVITE.

  • The called phone sends an information response 100 – Trying – back.

  • When the called phone starts ringing a response 180 – Ringing – is sent back.

  • When the caller picks up the phone, the called phone sends a response 200 – OK.

  • The calling phone responds with ACK – acknowledgement.

  • Now the actual conversation is transmitted as data via RTP.

  • When the person calling hangs up, a BYE request is sent to the calling phone.

  • The calling phone responds with a 200 – OK.

It’s as simple as that! The SIP protocol is logical and very easy to understand.

Further reading