Carrier Grade Voice Over IP, Second Edition

As mentioned, SIP is a signaling protocol. As such, it has a particular syntax. In the case of SIP, the syntax is text-based, using the International Organization for Standardization (ISO 10646) character set, and has a similar look and feel to the Hypertext Transfer Protocol (HTTP). One advantage of this approach is that programs designed for the parsing of HTTP can be adapted relatively easily for use with SIP. One obvious disadvantage, compared to a binary encoding, is that the messages themselves consume more bandwidth.
SIP messages are either requests from a client to a server or responses (which are also known as status messages) from a server to a client. Each message, whether a request or a response, contains a start-line, possibly followed by headers and a message body:
message = start-line *message-header CRLF [message-body]
Given that SIP defines only request and status messages, the start-line is
Start-line = request-line status-line
The request-line specifies the type of request being issued, while the response line indicates the success or failure of a given request. In the case of failure, the status line indicates the type of failure or the reason for failure.
Message headers...