RFC 3261: SIP: Setting up sessions over the internet

Summary

In July 2002, Jonathan Rosenberg, Henning Schulzrinne and six other authors published RFC 3261, the still authoritative version of the Session Initiation Protocol. SIP finds participants and sets up, modifies and terminates multimedia sessions such as internet phone calls, while the media themselves run over other protocols such as RTP. With 269 pages and dozens of extensions, SIP became the basis of internet telephony and at the same time the epitome of a complex standard.

Signalling modelled on HTTP

SIP adopts the request-response model and header syntax of HTTP/1.1. A call begins with INVITE, is confirmed with ACK and ended with BYE; REGISTER signs a device on with a registrar so that it can be reached under its address. Proxies forward requests across domain boundaries, and responses such as 180 Ringing or 200 OK deliberately recall HTTP.

RFC 3261 names five tasks: locating participants, clarifying availability, negotiating capabilities and media, setting up the session and managing it. Which codecs and ports are used is described by SDP in the message body; the voice itself flows over RTP directly between the end devices.

Flexible and hard to operate

Separating signalling and media is elegant but collides with NAT: the addresses in the SDP are often private addresses under which the other party cannot be reached. One-way audio is therefore a classic of VoIP troubleshooting.

Default ports are 5060 for UDP and TCP and 5061 for TLS. Openly reachable SIP servers are a constant target of automated attacks that guess credentials and dial expensive numbers at the operator’s expense.

Ideas

  • SIP signals sessions but does not carry media.
  • INVITE, ACK and BYE form the core of a call.
  • REGISTER links a SIP address to the current device.
  • Proxies forward requests across domain boundaries.
  • SDP describes codecs and ports in the message body.
  • Syntax and status codes follow HTTP.

Insights

  • Modelling SIP on HTTP made it easy to read but not easy to operate, because real-time media place different demands on networks than web pages.
  • A protocol that carries addresses in the message body always needs extra help in networks with NAT.

Facts

  • RFC 3261 appeared in July 2002 and replaces RFC 2543 from March 1999.
  • The document has 269 pages and eight authors.
  • Default ports are 5060 for UDP and TCP and 5061 for TLS.
  • SDP is now described in RFC 8866 from January 2021.

References

Remarks

  • Henning Schulzrinne is also the lead author of RTP; together SIP and RTP form the backbone of most VoIP phone systems.

Recommendations

  • Do not expose SIP services openly to the internet, or secure them with fail2ban and strong passwords.
  • Encrypt signalling via TLS on port 5061 and media via SRTP.
  • With one-way audio, first check the addresses in the SDP and the NAT settings.

Read the RFC at the RFC Editor

Search the Web Archive

Found a mistake or have something to add? Get in touch.