SIP: definition and a practical example
Short answer: SIP (Session Initiation Protocol), defined in RFC 3261, is the signaling protocol that sets up, modifies and ends voice calls over IP networks.
In Portuguese: SIP
What is SIP?
SIP (Session Initiation Protocol) is the protocol that opens, controls and ends VoIP calls. It plays the role of signaling in traditional telephony: it announces a call, makes the destination ring, reports the answer and marks the end. SIP is defined in RFC 3261 and uses text messages similar to HTTP’s, usually sent over port 5060.
SIP requests are called methods. The most used are INVITE (start a call), ACK (confirm the final response), BYE (end the call), CANCEL (give up before the answer), REGISTER (register a phone or trunk) and OPTIONS (check whether the other side responds).
Each request gets numbered responses in six classes: 1xx provisional, such as 180 Ringing; 2xx success, such as 200 OK; 3xx redirection; 4xx errors on the caller’s or the destination’s side, such as 486 Busy Here; 5xx server failure, such as 503; and 6xx global failure. A call’s final response is the one that best tells what happened. The full list is in SIP codes.
SDP
SIP does not carry audio. Inside the INVITE and the response, it carries a media description in SDP (Session Description Protocol), from RFC 4566, now replaced by RFC 8866. The SDP gives the IP and port where each side expects to receive RTP and which codecs it accepts. One side offers, the other answers, and the voice starts flowing along the agreed path.
In practice
A successful call exchanges these messages:
| Step | From | Message |
|---|---|---|
| 1 | Caller | INVITE with SDP |
| 2 | Destination | 100 Trying |
| 3 | Destination | 180 Ringing |
| 4 | Destination | 200 OK with SDP |
| 5 | Caller | ACK |
| 6 | Either side | BYE |
| 7 | The other side | 200 OK |
If the destination is busy, step 4 becomes 486 Busy Here, and the response may carry Q.850 cause 17, user busy, in the Reason header, as described in RFC 6432.
How Monitor uses this
Monitor reads the final SIP response and the Q.850 cause of every test call. With both, the incident says whether the destination refused the call, the network failed or the number does not exist. See SIP trunk monitoring.
Frequently asked questions
What is the difference between SIP and RTP?
SIP is the signaling: it says who is calling whom, whether the destination rings, whether it answers and when the call ends. RTP carries the audio. The two take different paths and ports, so a call can be answered in SIP and still have no voice, when RTP is blocked or diverted along the way.
What is the Q.850 cause in a SIP response?
It is a numeric code inherited from ISDN telephony that explains why the call ended, such as 16 for normal call clearing or 17 for user busy. Many carriers send it in the Reason header of the SIP response, as described in RFC 6432. It complements the SIP code, which is sometimes too generic to diagnose the failure.