What is a SIP Parser

advertisement
Cmpe 491 / 492
Graduate Project
Java Based SIP Agent
By
Alp Eren YILMAZ
Serdar YALCINKAYA
Table of Content
................................................. 3
What is a SIP Parser?
What is ANTLR?
What is ABNF?
..................................................... 3
...................................................... 4
What does Oxygen (O2) try to do?
References:
....................................... 4
......................................................... 4
2
What is a SIP Parser?
The SIP parser is used in the SIP hierarchy to process the input streams
to construct proper SIP messages. The headers in the incoming messages are
trimmed to construct SIP messages by the SIP parser. Later the constructed
SIP message in the parser is sent to Client / Server for further processing. The
parser may read the data from a buffer or directly form the input stream. SIP as
designed by IETF can be implemented on both of TCP and UDP; the SIP
parser should both support these protocols by constructing the structured SIP
messages from either the packets in TCP or UDP.
These two kinds of underlying protocols, TCP and UDP, need two
different kinds of parsers. TCP as a connection oriented, that allows a byte
stream originating on one machined to be delivered without errors to the
destination machine, needs pipelined message parsers. The TCP based input
handling parsers don’t need to concern about the buffering as in case of UDP
based one. On the other hand, the UDP is designed as a connectionless
protocol that implies buffering and re ordering of incoming byte streams. The
follow control of the incoming byte streams should be handled by the
applications; therefore, the UDP based parsers as called string message parsers
read the incoming stream from a buffer (memory) and construct the SIP
messages.
Until now a comprehensive Java based SIP parser is not available.
However National Institute of Standards and Technology (NIST) recently
released significant SIP parser to be used in SIP software development and
testing. [1]
What is ANTLR?
The abbreviation ANTLR stands for ANother Tool for Language
Recognition. The ANTLR is an open source parser and translator generator for
high-level languages. The software supported by jGuru organization. [2]
The parsers or translators are constructed for the database formats,
graphical data files or text processing files. The SIP parsers are not the
exception because the SIP is designed as a text based signaling protocol for IP
telephony. The SIP parsers should handle the message traffic between the
client/server within a definite parsing scheme. The ANTLR is used to
construct Java or C++ source codes for the SIP parser based on the pre
determined parsing scheme.
3
What is ABNF?
The Augmented Backus – Naur Form (ABNF) is an Internet technical
specification format that is described in detail by the RFC 2234[3]. The ABNF
is used to format a given technical specification. The format definitions are in
RFC 2234 as mentioned before.
The SIP has its own specifications, and these are represented in ABN
Form. For instance; the SIP-URL, host and hostname [4] of any SIP message
have to be in the ABNF as below:
SIP-URL
: "sip:" [userinfo "@"] hostport url-parameters [headers]
Host
: hostname | IPv4address | IPv6reference
Hostname
: *( domainlabel "." ) toplabel ["."]
What does Oxygen (O2) try to do?
Oxygen firm tries to construct its parser in C++. It would be a parser
class generated by the using ANTLR. The generated parser would be used for
their text based ABNF language. The firm is in charge with developing SIP
software that definitely needs its own parser. As one can understand from the
e-mail the firm prefers C++ language to code the software and uses ANTLR
for generating the SIP parser.
References:
[1] Project: Internet Telephony, NIST, Documents and Related Software can be
downloaded from, http://www.antd.nist.gov/proj/iptel/
[2] ANTLR Website, http://www.antlr.org/
[3] IETF Request for Comment, RFC, 2234, http://www.faqs.org/rfcs/rfc2234.html
[4] IETF Draft for SIP- RFC 2543, draft-ietf-sip-rfc2543bis-00.abnf,
http://www.cs.columbia.edu/sip/syntax/draft-ietf-sip-rfc2543bis-00.html
4
Download