O'Reilly logo

The IMS: IP Multimedia Concepts And Services, Second Edition by Aki Niemi, Hisham Khartabil, Georg Mayer, Miikka Poikselka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12.4. Message format

As shown in Figure 12.3, the SIP message is made up of three parts: the start line, message headers and body.

The start line contents vary depending on whether the SIP message is a request or a response. For requests it is referred to as a "request line" and for responses it is referred to as a "status line".

An example SIP request looks like:

INVITE sip:bob.smith@nokia.com SIP/2.0
Via: SIP/2.0/UDP cscf1.example.com:5060;branch=z9hG4bK8542.1
Via: SIP/2.0/UDP [5555::1:2:3:4]:5060;branch=z9hG4bK45a35h76
Max-Forwards: 69
From: Alice <sip:alice@nokia.com>;tag=312345
To: Bob Smith <sip:bob.smith@nokia.com>
Call-ID: 105637921
CSeq: 1 INVITE Contact: sip:alice@[5555::1:2:3:4]
Content-Type: application/sdp
Content-Length: 159

[body]
Figure 12.3. SIP message format.

12.4.1. Requests

SIP requests are distinguished from responses using the start line. As indicated earlier, the start line in the request is often referred to as the request line. It has three components: a method name, a request-URI and the protocol version. They appear in that order and are separated by a single space character. The request line itself terminates with a Carriage Return–Line Feed (CRLF) pair:

  • Method – the method indicates the type of request. Six are defined in the base SIP specification [RFC3261]: the INVITE request, CANCEL request, ACK request and BYE request are used for session creation, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required