SIP (Session Initiation Protocol) is the IETF signaling protocol, defined in RFC 3261, that creates, modifies and ends sessions such as internet phone calls. SIP does not carry the voice itself. It lets the two ends agree on media settings, usually described in SDP, and the audio then travels separately, usually in RTP packets.
What does SIP do?
RFC 3261 describes SIP as an application-layer control (signaling) protocol for creating, modifying and terminating sessions with one or more participants. It finds the person or device being called, carries the offer and answer that describe the media, and tears the call down at the end.
SIP is not a complete phone system on its own. The RFC says SIP provides primitives used to build services, and that it is meant to work with other protocols, such as RTP for the media and SDP for describing the session.
The main SIP methods and responses
RFC 3261 defines six methods. Extensions published as standards-track RFCs may add more.
- Responses use classes: 1xx provisional (for example 180 Ringing), 2xx success, 3xx redirection, 4xx client error, 5xx server error and 6xx global failure.
| Method | Purpose |
|---|---|
| REGISTER | Registers a device's current contact address |
| INVITE | Starts a session (a call) |
| ACK | Confirms the final response to an INVITE |
| CANCEL | Cancels a pending INVITE |
| BYE | Ends a session |
| OPTIONS | Asks a server or device about its capabilities |
A simple call flow
The caller sends INVITE with an SDP offer listing its codecs and media address. The far end replies 180 Ringing, then 200 OK with an SDP answer. The caller sends ACK, and audio starts flowing in RTP between the agreed addresses. Either side ends the call with BYE, which gets its own 200 OK.
Because signaling and media take separate paths, a call can connect and still have no audio in one direction. That usually points to the media addresses or firewall rules, not to SIP itself.
What to test before going live
Test SIP behavior with real call scenarios, not only a single successful call.
- Inbound and outbound calls, including caller ID presentation.
- Codec negotiation on both legs.
- Transfers, holds and conference calls.
- DTMF delivery to your IVR.
- Behavior on busy, no answer and failed routes.
Questions about SIP
Does SIP carry the voice?
No. SIP carries signaling: who is calling, which media formats to use and when the call starts or ends. The voice normally travels in RTP packets, as defined in RFC 3550, between the media addresses the two sides agreed on in their SDP exchange.
What is the difference between SIP and VoIP?
VoIP is the general idea of carrying voice over IP networks. SIP is one specific protocol used to set up and manage those calls. Most business VoIP and contact-center platforms use SIP for signaling and RTP for the audio.
Why does a SIP call have one-way audio?
The SIP exchange can succeed while the RTP media is blocked or sent to the wrong address. Common causes are NAT, firewall rules or a private IP address written into the SDP. Check the media addresses in the SDP and the firewall path for both directions.
Sources
- IETF RFC 3261: SIP: Session Initiation Protocol
- IETF RFC 3550: RTP, a transport protocol for real-time applications