Voice Over IPv6: Architectures for Next Generation VoIP Networks

SIP is a text-based protocol and uses the UTF-8 charset (RFC 2279). A SIP message is either a request from a client to a server, or a response from a server to a client. Both Request and Response messages use the basic format of RFC 2822, even though the syntax differs in character set and syntax specifics. (SIP allows header fields that would not be valid RFC 2822 header fields, for example.) Both types of messages consist of a start-line, one or more header fields, an empty line indicating the end of the header fields, and an optional message-body.
generic-message = start-line *message-header CRLF [message-body]start-line = Request-Line / Status-Line
The start-line, each message-header line, and the empty line must be terminated by a Carriage-Return LineFeed sequence (CRLF). Note that the empty line must be present even if the message-body is not. Except for the above difference in character sets, much of SIP's message and header field syntax is identical to HTTP/1.1. Rather than repeating the syntax and semantics here, we use [HX.Y] to refer to Section X.Y of the HTTP/1.1 specification (RFC 2616). However, it should be noted that SIP is not an extension of HTTP.
SIP requests are distinguished by having a Request-Line for a start-line. A Request-Line contains a method name, a Request-URI, and the protocol version separated by a Single Space (SP) character. The Request-Line ends with CRLF. No CR...