Voice

SIP

SIP (Session Initiation Protocol) is the IETF signaling protocol for initiating, modifying, and terminating multimedia sessions. RFC 3261 is the core specification. SIP sets up the call; the voice itself travels over RTP.

Updated August 27, 2026

SIP is a text-based, request/response protocol modeled in spirit on HTTP: methods, headers, URIs, and a message body. Endpoints are called User Agents; they send requests to one another, often through proxy servers that route on the Request-URI. A successful call setup is a dialog (identified by Call-ID plus tags) that lasts until someone sends BYE.

The protocol became the default control plane for business VoIP because it is extensible and because vendors converged on it for SIP trunks. It is not the only signaling protocol (H.323, Jingle, and proprietary APIs still exist), but it is the one you will see on a wire capture between a phone and a carrier.

What SIP does and does not do

SIP locates a party, offers a session, and agrees to change or end that session. The offer is usually an SDP body (Session Description Protocol, RFC 8866, formerly RFC 4566) that lists media types, codecs, IP addresses, and ports. Once both sides agree, they send media on those addresses. The media is almost always RTP (RFC 3550), not SIP.

  • SIP: signaling. INVITE to start, re-INVITE or UPDATE to change, BYE to stop.
  • SDP: a description of the media session nested in SIP (or in WebRTC signaling).
  • RTP: the actual audio or video packets. Quality problems live here. See call quality.

Confusing SIP with the phone call itself leads to misdirected troubleshooting. A 200 OK to INVITE means the session was accepted. It does not mean the callee can hear you. Frozen audio is an RTP, NAT, or codec problem until proven otherwise.

A call in SIP terms: INVITE, ACK, BYE

A successful call setup follows a three-way handshake: INVITE, a final 2xx response, and ACK. ACK is a separate method, not an implicit TCP ack, because SIP can run over UDP and because proxies may need to see the confirmation. After the dialog is established, either party sends BYE to hang up. CANCEL aborts an INVITE that has not yet received a final response (the callee has not answered).

  1. Alice sends INVITE with an SDP offer (codecs, RTP port).
  2. Bob's phone rings (often after 180 Ringing). Bob answers with 200 OK and an SDP answer.
  3. Alice sends ACK. RTP flows both ways.
  4. When finished, either side sends BYE; the other responds 200 OK.

Provisional responses (1xx) can be important in practice. 100 Trying suppresses retransmissions. 180 Ringing drives local ringback. 183 Session Progress may include early media (SDP) so the caller hears a carrier message before answer. PRACK (RFC 3262) acknowledges reliable provisionals when both sides require it.

SDP and the media path

SDP is a session description, not a transport. Lines such as m=audio, a=rtpmap:0 PCMU/8000, and a=rtpmap:9 G722/8000 tell the peer which payload types map to which codecs. ICE attributes appear when the endpoint is WebRTC or a SIP user agent that implements trickle ICE. DTMF is often advertised as telephone-event (RFC 4733) alongside the audio codec. See DTMF.

The IP address in SDP may not be reachable. Enterprise phones sit behind NAT. Session Border Controllers (SBCs) rewrite SDP so media anchors on a public address. That is normal in SIP trunking. It also means a packet capture on the phone and a capture on the carrier will show different RTP tuples.

Registration and trunks

A SIP phone typically REGISTERs an Address of Record (AoR) such as sip:[email protected] to a contact URI that includes its current IP and port. Registrars store that binding so inbound INVITEs can be routed. Registration expires and must be refreshed. This is how a device stays reachable even as its network address changes.

A SIP trunk is a standing peering arrangement, not a physical circuit. The PBX may REGISTER as a single account, or it may use IP-authenticated trunks with no REGISTER, only INVITEs between known addresses. Carriers terminate and originate E.164 numbers over that peer. Capacity is measured in concurrent calls and often in calls per second, not in T1 timeslots, though many trunks are still sized in analog-line equivalents.

SIP methods

A User Agent does not need to implement every method. Interoperability problems often come from optional extensions.
MethodSpecified inRole
INVITERFC 3261Initiate or re-negotiate a session (re-INVITE)
ACKRFC 3261Confirm a final response to INVITE
BYERFC 3261End a dialog
CANCELRFC 3261Abort a pending INVITE
OPTIONSRFC 3261Query capabilities without offering a session
REGISTERRFC 3261Bind an Address of Record to a contact
UPDATERFC 3311Modify session parameters without the INVITE transaction rules
PRACKRFC 3262Acknowledge a reliable provisional response
INFORFC 6086Mid-dialog application data (sometimes DTMF, better sent via RFC 4733)
REFERRFC 3515Ask the peer to send a request (call transfer)
SUBSCRIBE / NOTIFYRFC 6665Event state (voicemail waiting, dialog events)
MESSAGERFC 3428Pager-mode instant messaging, not RTP audio

SIP compared with WebRTC

WebRTC reuses RTP, SDP, and ICE. It does not require SIP. Browser sessions are often signaled over HTTPS with an application-specific schema, then the same ICE/DTLS-SRTP media path runs. A gateway can translate SIP to WebRTC so a browser agent can join a SIP conference. Treat them as two signaling styles over a shared media toolkit, not as mutually exclusive networks.

SIPWebRTC
Primary standardsIETF RFC 3261 and extensionsW3C WebRTC, IETF RTCWEB / JSEP
Typical clientDesk phone, softphone, PBX, SBCBrowser or embedded mobile SDK
Signaling transportUDP/TCP/TLS to port 5060/5061 (or SRV)Whatever the app chooses (often WSS or HTTPS)
NAT traversalSTUN, rport, SBC, sometimes ICEICE required; STUN and TURN expected
Media securityOptional SRTP; many trunks still RTP inside a private networkDTLS-SRTP required in browsers
Numberingsip: URIs and E.164 via trunksApplication identity; numbers via a SIP/CPaaS gateway