Call Initiation (INVITE)
When User A wants to call User B, their SIP client sends an INVITE request to User B.
This INVITE includes:
SIP headers: Caller/called party addresses (phone numbers or SIP URIs), routing paths (Via, Route headers).
SDP body: Media capabilities (e.g., supported codecs like G.711/G.729), IP/port for RTP streams.
Provisional Responses
User B’s SIP proxy immediately responds with 100 Trying to acknowledge receipt and indicate processing.
When User B’s phone begins ringing, a 180 Ringing response is sent back to User A to signal this state.
Call Acceptance (200 OK)
When User B answers, their SIP client sends a 200 OK response:
0Includes B’s SDP answer (selected codec, media IP/port) to finalize negotiation.
This establishes agreed-upon media parameters for the call.
Call Confirmation (ACK)
User A’s client sends an ACK to confirm receipt of the 200 OK.
At this point, RTP media streams begin using the negotiated settings (codec, ports).
Call Termination (BYE)
When either party hangs up, their SIP client sends a BYE request.
The other party confirms with 200 OK, terminating the session and stopping RTP streams.
Key Concepts Highlighted
SDP Negotiation: Critical for aligning media capabilities (codecs, ports) before RTP starts.
SIP Responses: 1xx (provisional), 200 (success), ACK (confirmation) follow a strict handshake.
Stateless vs Stateful: Proxies may generate 100 Trying statelessly, while endpoints handle stateful responses (180, 200).
A Proxy B
| --- INVITE (SDP) ---> | |
| <--- 100 Trying ------ | |
| | --- INVITE (SDP) ---> |
| | <--- 180 Ringing ---- |
| <--- 180 Ringing ---- | |
| | <--- 200 OK (SDP) --- |
| <--- 200 OK (SDP) --- | |
| --------- ACK ------> | |
| | --------- ACK ------> |
| [RTP Media Begins] | |
| -------- BYE -------> | |
| <----- 200 OK ------- | |