CSS Prepare

optional · CSS study notes

Session Initiation Protocol (SIP) (2017)

🧭

On this page — click any heading below to jump straight to it. ⬅️ Back to P-II.II. Computer Communications & Networks


OSI Layer: Application Layer (L5–L7)

Definition

SIP (Session Initiation Protocol), defined in RFC 3261, is an Application-layer signalling protocol used to initiate, modify, and terminate real-time multimedia sessions — voice, video, and instant messaging — over IP networks (VoIP). SIP itself only handles session signalling; it never carries the actual media stream.

SIP Components (Classification of Entities)

  • User Agent (UA) — the endpoint software/device making or receiving a call, acting as both User Agent Client (UAC), which initiates requests, and User Agent Server (UAS), which responds to them.
  • Proxy Server — routes SIP requests toward the destination, potentially forwarding through multiple proxies, without participating in the actual media session.
  • Registrar Server — accepts REGISTER requests and records a user's current location (which IP/device they are currently reachable at), enabling calls to reach a user regardless of which device they're using.
  • Redirect Server — instead of forwarding a request itself, tells the caller's client the correct destination to contact directly.

Types of SIP Methods (Requests)

  • INVITE — initiates a session/call, carrying session-description information about proposed media.
  • ACK — confirms that a final response to an INVITE has been received, completing the three-way handshake for session setup.
  • BYE — terminates an established session.
  • CANCEL — cancels a pending request (e.g., an INVITE) before the session is established.
  • REGISTER — registers a user's current contact address with a registrar server.
  • OPTIONS — queries a server's capabilities without actually establishing a session.

Types of SIP Responses (Classification by Code Range)

Modelled directly on HTTP's response-code structure:

  • 1xx — Provisional (e.g., 180 Ringing) — request received, processing continues.
  • 2xx — Success (e.g., 200 OK) — request was successfully processed.
  • 3xx — Redirection — further action needed, request should be retried elsewhere.
  • 4xx — Client Error (e.g., 404 Not Found) — the request contains bad syntax or cannot be fulfilled by this server.
  • 5xx — Server Error — the server failed to fulfil an apparently valid request.
  • 6xx — Global Failure — the request cannot be fulfilled at any server (e.g., 603 Decline).

Working with SDP (Session Description Protocol)

  • SIP messages carry an SDP body to negotiate the actual media parameters — codec choice, IP address and port for the media stream, media type (audio/video) — before the media itself starts flowing.
  • Once SDP negotiation completes (via the INVITE/200 OK/ACK exchange), the actual media is carried separately by RTP (Real-time Transport Protocol), not by SIP.

Addressing

  • Uses URIs structurally similar to email addresses: sip:user@domain (or sips: for a secure/TLS-protected variant), identifying endpoints independent of their current physical network location.

SIP vs RTP — a Key Distinction

BasisSIPRTP
RoleSignalling (setup/teardown/modify)Actual media transport
LayerApplicationApplication (runs over UDP typically)
CarriesCall control messages, SDP negotiationVoice/video payload data
AnalogyDialling and ringing a phoneThe actual voice conversation once connected

CSS Exam Angle

  • Appeared in CSS 2017 — a fairly technical/niche topic; a precise, well-classified answer (components, methods, response-code ranges) plus a simple call-flow diagram (INVITE → 180 Ringing → 200 OK → ACK → media via RTP → BYE) scores well without needing to over-elaborate.
  • Explicitly stating that SIP only signals, RTP carries media is the single most examinable distinguishing fact.
  • Naming the response-code classification (1xx–6xx, mirroring HTTP) demonstrates the protocol-design lineage examiners may probe.

Example

Skype/WhatsApp-style VoIP calls and enterprise IP-PBX systems use SIP for call setup and teardown (dialling, ringing, hanging up), exactly analogous to how a traditional telephone exchange used out-of-band signalling to set up a circuit-switched call before conversation could begin.

Practice Question — Not the Exact 2017 Wording

"What is SIP? Explain its role in establishing VoIP sessions."

Other Likely Questions

  1. List the core SIP methods and explain the purpose of each.
  2. Differentiate the role of SIP from RTP in a VoIP call.
  3. Explain the SIP response code classification (1xx–6xx) with one example from each range.

📜 Past-Paper Questions & Structured Answers

Questions are paraphrased; answer focus is suggested guidance, not an official marking scheme.

2017 · Paper-II · Q3(a)(i) · within Q3(a) · 8 marks

Question (paraphrased): Explain HTTP and SIP; the companion part asks about TCP and UDP.

Answer focus: Eight marks cover four protocols, not SIP alone. Include a concise call flow for SIP.

SIP (Session Initiation Protocol) is application-layer signalling for establishing, modifying and terminating multimedia sessions. User agents originate and answer requests; a registrar records contact locations and proxies help route signalling. SDP describes session/media parameters.

Caller                 Callee
  |------ INVITE -------->|
  |<--- 180 Ringing ------|
  |<----- 200 OK ---------|
  |-------- ACK --------->|
  |<==== RTP media ======>|
  |-------- BYE --------->|
  |<----- 200 OK ---------|

Key distinction: SIP sets up the session; RTP typically carries the actual audio/video. SIP can use UDP or TCP; port 5060 is conventional for ordinary SIP and TLS commonly uses 5061.

HTTP: web request/response protocol; a client requests resources and the server returns status, headers and content. HTTP/1.1 and HTTP/2 use TCP, while HTTP/3 uses QUIC over UDP.

Complete the shared question: TCP provides a reliable ordered stream with connection setup, acknowledgements, retransmissions and control. UDP provides independent datagrams with low protocol overhead but no built-in delivery/order/congestion guarantees. The four-protocol comparison is also in Connectionless Transport with UDP (2017).