SIP Express Router v0.8.8 - Developer's Guide | ||
---|---|---|
<<< Previous | Next >>> |
In this section we will discuss internals of the SIP message header parser implemented in the server. Message parsing is very important and one of the most time consuming operations of a SIP server. We have been trying to make the parser as fast as possible.
A header field parser can be either in the server core or in a module. By convention, parser that is needed by the core itself or is needed by at least two modules will be in the core. Parsers contained in modules will be not described in this section.
There is a parser subdirectory that contains all the parsers and related stuff.
The following parsers can be found under parser subdirectory:
A SIP message consists of message header and optional message body. The header is separated from the body with a empty line (containing CRLF only).
Message header consists of the first line and one or more header fields. The first line determines type of the message. Header fields provide additional information that is needed by clients and servers to be able to process the message.
Each header field consists of header field name and header field body. Header field name is delimited from header field body by a colon (":"). For example, "Server: SIP Express Router" - in this case "Server" is header field name and "SIP Express Router" is header field body.
<<< Previous | Home | Next >>> |
The Routing Engine | The Parser Organization |