0% found this document useful (0 votes)
62 views

SIP and The Java Platforms

Uploaded by

pratap bana
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

SIP and The Java Platforms

Uploaded by

pratap bana
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

White Paper

SIP and the Java Platforms

    Print-friendly Version

by Phelim O'Doherty
June 2003

Contributions from:
Anders Kristensen - dynamicsoft
Chris Bouret - Nokia Corporation
1 Introduction
The goal of this whitepaper is to identify the key specifications to the Session Initiation Protocol
(SIP) [1] defined through the Java Community Process (JCP) [2]. This document inspects each
SIP specification describing the functionality, architecture, platform supported and how each
specification relates to the other Java specifications to SIP. This is not a tutorial on SIP or the
Java language [3] and it is assumed that the reader has a reasonable understanding of both the
Java language and the SIP protocol and their potential functions within an IP Communications
network.

The Java language defines three platforms, namely Java 2 Platform, Standard Edition (J2SE),
Java 2 Platform, Enterprise Edition (J2EE) and Java 2 Platform, Micro Edition (J2ME).
Targeting the three Java platforms are three key Java Specification Requests (JSRs) for SIP.
These are:

 JAIN SIP [4]: JSR 32 defines the JAIN SIP specification. Sun Microsystems is the
specification lead along with the following expert companies and individuals: British
Telecom, Cisco Systems, dynamicsoft, Ericsson, Nortel Networks, Open Cloud, Telcordia
Technologies, Ranganathan Mudumbai, and Ulticom.
 SIP Servlet [5]: JSR 116 defines the SIP Servlet specification. dynamicsoft is
specification lead along with the following expert companies, 8x8, Ericsson, IBM, Nokia
Networks, Nortel Networks, Siemens AG, Sun Microsystems and Ubiquity.
 SIP for J2ME [6]: JSR 180 defines the SIP for J2ME specification. Nokia Corporation is
specification lead along with the following expert companies and individuals: AGEA
Corporation, Aplix Corporation, AromaSoft Corporation, Cingular Wireless, Cisco Systems,
dynamicsoft, Anupama Hegde, Hutchinson 3G UK, Leapstone Systems, Motorola,
Panasonic, Siemens AG, Sun Microsystems, Symbian, Tata Consultancy Services, Tira
Wireless and Ubiquity.

The substantial overlap in the experts and companies defining the SIP specifications through the
JCP helps ensure consistent API specifications across the various expert groups.

The collection of Java SIP specifications does not redefine or modify the SIP protocol. They
simply define standardized API's specific to the Java environment, with the goal of simplified
application development and application portability across different implementations of the SIP
protocol. Within the JCP there are also efforts to define Java interfaces to the SIMPLE protocol
[7] and a generic protocol agnostic API [8] that will layer on any presence and instant messaging
protocol. These Java interfaces are covered in a separate arcticle. Additionally Java interfaces
also exist for SDP [9], MGCP [10], Megaco [11] and ENUM [12].

2 SIP specifications
2.1 JAIN SIP
The JAIN SIP specification was the first SIP specification standardized through the JCP. The
JAIN SIP specification is a general purpose stateless, transaction stateful and dialog stateful
based Java interface to the SIP protocol. It is rich both semantically and in definition to the SIP
protocol. The motivation behind JAIN SIP is to develop a standard interface to the SIP protocol
that can be used independently to program SIP applications or be used by higher level
programming entities and container based environments. JAIN SIP can be used in multiple ways:

 As an API for the J2SE platform that enables the development of stand alone user agent,
proxy and registrar applications.
 A base SIP implementation for a SIP Servlet container that enables the development of
user agent, proxy and registrar applications in a web tier based environment.
 A base SIP implementation for a JAIN Service Logic Execution Environment (SLEE)
container that enables the development of user agent, proxy or registrar applications in an
event-driven component-model business tier environment.
 A base SIP implementation for an Enterprise JavaBeans (EJB) container that enables the
development of user agent, proxy or registrar applications in a traditional business tier
environment.

JAIN SIP provides a standardized interface that can be used by communications developers as a
minimum to support SIP in their applications. The JAIN SIP reference implementation provides
a fully functional SIP implementation that can be used by developers to communicate SIP from
the Java environment. The target community for JAIN SIP is developers that are familiar with
the SIP protocol and require transactional and/or dialog control over the SIP implementation.

2.1.1 Architecture overview


JAIN SIP supports RFC 3261 functionality and the following SIP extensions; the INFO method
(RFC 2976), Reliability of provisional responses (RFC 3262), Event Notification Framework
(RFC 3265), the UPDATE method (RFC 3311), the Reason Header (RFC 3326), the Message
method (RFC 3428) and the REFER method (RFC 3515) [1].

JAIN SIP standardizes the interface to the generic transactional model defined by the SIP
protocol, providing access to dialog functionality from the transaction interface. The architecture
is developed for the J2SE environment therefore is event based utilizing the Listener/Provider
event model. The specification is asynchronous in nature using transactional identifiers to
correlate messages. It defines various factory classes for creating Request and Response
messages and SIP headers.  JAIN SIP defines an interface for each Header supported, which can
be added to Request or Response messages respectively. These messages are passed to a
Transaction to be sent onto the network, while the SipListener listens for incoming Events that
encapsulate messages that may be responses to initiated dialogs or new incoming dialogs.

JAIN SIP is extensible by design. It defines a generic extension header interface that can be used
by applications that utilize headers that are not supported directly by JAIN SIP. The design also
defines a mechanism to support future dialog creation methods in a JAIN SIP environment via
the use of Java Properties. JAIN SIP can be managed statically with regards to IP addresses and
router function, and dynamically specific to ports and transports.

The default handling of message retransmissions in JAIN SIP is dependent on the application.
Stateful proxy applications need not be concerned with retransmissions as these are handled by
the JAIN SIP implemtation. Typically User Agent applications must handle retransmissions of
ACK's and 2xx Responses, however JAIN SIP provides a convenience function that ensures all
retransmissions are handled by the JAIN SIP implementation, reducing the complexity for
applications acting as user agents. This function may also be useful if JAIN SIP is used as a base
implementation for a SIP Servlet container, JAIN SLEE container or EJB container.

2.2 SIP Servlet


The SIP Servlet API specification defines an environment for execution of network based SIP
applications. It is implemented on application servers that support SIP and optionally also HTTP
and the J2EE platform. It builds on the HTTP Servlet API [13] and like HTTP Servlet defines
both an API and a file format for application packaging. SIP Servlet supports baseline SIP as
defined in RFC 3261 and also supports the following SIP extensions; the Event Notification
framework (RFC 3265) and the Message method (RFC 3428) for instant messaging.

At the heart of SIP Servlet lies the ability of applications to perform SIP signaling, either as an
endpoint (user agent) or as an non-endpoint (proxy or registrar). The API aims to allow
applications complete control over SIP signaling while at the same time hiding much of the non-
essential complexity of SIP, which is not relevant to application developers.

The main difference between a non-application server based SIP API and an application server
based SIP API is that with the latter an application server itself creates and manages resources,
whereas with the former the application creates and manages resources. SIP Servlet containers
manage resources like listening points, threads, transactions and dialogs, session state, and
application components.

2.2.1 Architecture overview


Applications can act as user agents, proxies or registrars. Proxying can be done in a transaction
stateless or stateful manner. The SIP Servlet container maintains the underlying SIP transactions
as well as established dialogs. There is no attempt to provide a SIP independent signaling API;
the philosophy is that applications will frequently need access to SIP specific headers. SIP
Servlet defines a SIP deployment descriptor that can be used for converged applications, which
is very similar to the deployment descriptor defined by the HTTP Servlet API. Its most important
role is to declare Servlets and to define a set of rules governing when the servlet may be invoked.
Rules are essentially predicates over incoming SIP requests. If a rule matches an incoming
request, the container may invoke the corresponding servlet, i.e. initial incoming requests are
dispatched to servlets whose rules match the request.
SIP Servlet allows multiple servlets to be invoked for the same request. The choice of application
composition functionality and the choice of multiple matching rules are left to the application.
However, if application composition is implemented, the specification requires the cascaded
services model, which implies that applications are independent and each follow standard SIP
rules.

A Servlet application may contain both SIP and HTTP components (and components specific to
other protocols as they are defined). Converged containers deploy both SIP and HTTP Servlets
and allow state to be shared between them. SIP Servlet also includes declarative and
programmatic security features along the lines of the HTTP Servlet API. State maintenance in
the SIP Servlet API builds on and generalizes the session model of the HTTP Servlet API.
Session objects hold application state and are automatically persisted and/or replicated by the
container. The SipSession interface corresponds to SIP dialogs and plays a similar role as the
HttpSession interface in HTTP Servlet as both represent point-to-point “signaling” relationships.
In addition to these "protocol sessions", there is a notion of an application session which binds
together multiple protocol sessions.

2.3 SIP for J2ME


The SIP for J2ME API defines a SIP interface for small platforms. SIP's acceptance as the
protocol of choice by the IP Multimedia Subsystem (IMS) architecture [14] within the Third
Generation Partnership Project (3GPP), highlights the value of mobile devices understanding and
communicating SIP. The goal of the SIP for J2ME API is to address this need.

The SIP for J2ME is based on the Connected Limited Device Configuration (CLDC) [15]
framework within the J2ME platform and will typically be used in conjunction with the Mobile
Information Device Profile (MIDP) [16] however is not limited to this profile.

2.3.1 Architecture overview


CLDC based terminals have stringent memory requirements; therefore attention is required in the
design of this specification to ensure a small memory footprint. The implementation of the SIP
for J2ME API will be integrated in the mobile phone and will make the link between the
terminal's native SIP implementation and the MIDP environment.

As more and more small devices are supporting the J2ME platform, it is essential that any
specification targeting that domain extends the Generic Connection Framework (GCF) pattern to
integrate easily with that platform. This means every new SIP Connection can be obtained
through the unique Connector factory. SIP for J2ME also follows the simple and lightweight
structure that all the other protocol frameworks standardized in MIDP do, i.e. HttpConnection,
SocketConnection. This ensures a very flat class structure that inherently simplifies usage.

Similar to HttpConnection in the J2ME platform, SIP for J2ME is defined at the transaction
level. This choice makes the API multipurpose and does not limit its use by including any
assumptions of its intended usage, e.g. Voice over IP. As a consequence, a MIDlet that is
implemented at the transaction level must handle the flow of messages. The HTTP like
functionality has been extended to support the receiving of Requests that exist in SIP and HTTP
e.g. blocking calls are extended with an event mechanism that allow application developers to
choose the optimal programming style. For the sake of reducing the MIDlet code size some
helper functions are provided to assist in the basic SIP tasks. Note that a MIDlet is free to ignore
these helper functions to make previous flexibility requirements possible. Examples of helper
functions include:

 Automatic initialization of mandatory headers in requests


 Creation of pre-initialized responses and acknowledgments
 Support for subsequent SIP dialogs
 Support for automatic request refreshes

Like SIP Servlet, SIP for J2ME is concentrating on building of the momentum of existing HTTP
interfaces that exist in the Java platform, with the focus of application convergence and
developer adoption.

3 Relationships between the SIP specifications


The SIP APIs being standardized for the Java platform may be viewed as overlapping in
functionality with regards to the type of applications that can be implemented on each
specification i.e. one can build a user agent on each specification, however they differ
dramatically in the developer niche they target. SIP Servlet targets web tier application
developers for the J2EE platform building of the momentum of HTTP Servlet. SIP for J2ME
targets mobile phone application developers for the J2ME platform building of the momentum of
HTTP Connection. JAIN SIP targets application developers for the J2SE platform and business
tier application developers for the J2EE platform and JAIN SLEE platform with the help of the
Java Connector Architecture. Care has been taken by the expert groups to align these
technologies with regards to addressing, headers, parameters and data-types to ensure a
consistent programming view is presented to the developer.

3.1 JAIN SIP and SIP Servlet


JAIN SIP and SIP Servlet are complimentary technologies in the sense that a JAIN SIP
implementation could be the standardized base SIP implementation of a SIP Servlet container.
This enables different base SIP implementations to be plugged in and out of a SIP Servlet
implementation. However an application could be implemented on either technology with the
same effect, in that a container environment is not required for all application development. SIP
servlet is a server side technology as is JAIN SIP.

3.2 JAIN SIP and SIP for J2ME


SIP for J2ME is a client-side technology that is fully integrated into the CLDC profile. Likewise
JAIN SIP is also a client technology for the desktop. The key difference between these two
technologies is that SIP for J2ME explicitly targets mobile phones, while JAIN SIP explicitly
targets the desktop. Either techonology may be used for mid-size client devices depending on the
device capabilities.

3.3 SIP Servlet and SIP for J2ME


SIP Servlet and SIP for J2ME are two distinct technologies. SIP for J2ME is a client side
technology for limited devices and SIP servlet is a server side technology designed to service
client side requests.
4 Possible end-to-end architecture using the SIP specifications
Network architectures are often unique unto themselves and network requirements often
determine architecture choices. However, it is foreseen that the SIP specifications will be used as
follows in end-to-end network architectures:

 SIP for J2ME will be implemented in mobile handsets.


 JAIN SIP will be implemented on PDA's, SIP phones, desktops. It may also be the base
SIP implementation for a SIP Servlet container or alternatively as a resource to an enterprise
application server i.e. EJB or an event driven application server i.e. JAIN SLEE .
 SIP Servlet will be implemented in web tier enterprise application servers, bringing the
benefit of converged SIP and HTTP applications.
 SIP Servlet, JAIN SIP and JAIN SIP as a resource into JAIN SLEE, will co-exist in the
core telecom network as the backbone for SIP network signaling and custom based SIP
servers.

The diagram below shows how existing SIP API's map onto the IP Multimedia Subsystem (IMS)
architecture as defined by 3GPP.

 
Figure 1: IMS architecture and the applicability of the SIP specifications
5 Considerations and Limitations
Education of developers is important; few enterprise developers have heard of SIP and the type
of applications that can be developed with it. Time needs to be spent educating and marketing
SIP to the enterprise development community.

Efforts must focus on establishing a unified developer community around SIP for the Java
language. Today numerous specifications exist; however developers need additional resources
that aid adoption of these specifications, such as sample implementations, developer tools,
applications that will entrench the SIP protocol into the enterprise development environment.
This is an achievable goal, which will be worked on in the future by the JCP expert groups and
others leading the industry adoption of SIP.

6 The Future of SIP and the Java platforms


The SIP protocol was designed with Internet thinking, which compliments the enterprise
thinking of many Java developers. This commonality should help lower the barrier of
convergence between the telephony and Internet worlds.

The communications industry is behind the success of both SIP and the Java platforms,
highlighted by the numerous SIP specifications being standardized through the JCP. The
acceptance of SIP as the universal signaling language for internet communications, coupled with
the acceptance of the Java language as a preferred alternative to C or C++ as a development
language for communication protocols demonstrates an inherent shift in thinking. The rapid
growth of the Java language and the use of SIP for communications offer a great formula for
communication network architectures.

The Java language has a number of features that make it very attractive for the SIP protocol. The
dynamic loading features make it easy to deploy and update applications at runtime; errors can
be caught and handled gracefully; the built in security framework allows containers to restrict
applications in what actions they can perform. The Java platform also provides access to a large
set of useful functionality, such as JDBC for database access, JNDI for directory lookups and
JMF for handling streamed media. Furthermore integration of the SIP protocol with the J2EE
platform ensures SIP applications can plug into backend infrastructure already in some networks
today.

The Java SIP standards are also important for the success of the SIP protocol. Communications
protocols traditionally are standardized in text document or unified modeling language (UML)
format only. This leaves scope for interpretation when realizing an API for a specific
programming environment, which has been the downfall of many good protocols in the past. The
Java SIP standards unify the SIP communications development community and drives SIP into
the enterprise domain by providing standardized API's to the SIP protocol specific to each Java
platform.

When the SIP protocol gains widespread adoption, a strong case will be presented to bundle SIP
functionality into the J2SE platform. Acceptance of SIP in the J2SE platform may in turn lead to
SIP being adopted by both the J2EE platform and the J2ME platform (similar to HTTP) in the
future.

It is expected in the coming years that the J2EE platform will experience the biggest growth of
SIP enabled applications; however acceptance of SIP in the J2EE platform indirectly means
success for SIP in the J2SE platform. The production of SIP applications on the J2ME platform
may take a little longer due to air interface bottlenecks and limited processing power on the
mobile handset.

3 References
[1] Request for Comments: 2976, 3261, 3262, 3265, 3311, 3326, 3428. Internet Engineering
Task Force (IETF) Network Working Group, 2002. See http://www.ietf.org/rfc.html

[2] Sun Microsystems, "Java Community Process Program - JSR 171", 2002. See
http://jcp.org/en/jsr/detail?id=171.

[3] Sun Microsystems, "The Java Programming Language", 1996. See http://java.sun.com.

[4] Sun Microsystems, "JAIN SIP Specification - JSR 32", 2002. See http://jcp.org/en/jsr/detail?
id=32.

[5] dynamicsoft, Sun Microsystems, "SIP Servlet Specification - JSR 116", 2002. See
http://jcp.org/en/jsr/detail?id=116.

[6] Nokia Corporation, Sun Microsystems, "SIP for J2ME Specification - JSR 180", 2002. See
http://jcp.org/en/jsr/detail?id=180.

[7] Panasonic, Sun Microsystems, "JAIN SIMPLE Presence Specification - JSR 164", 2002. See
http://jcp.org/en/jsr/detail?id=164. Panasonic, Sun Microsystems, "JAIN SIMPLE Instant
Messaging Specification - JSR 165", 2002. See http://jcp.org/en/jsr/detail?id=165.

[8] Panasonic, Sun Microsystems, "JAIN Presence Specification - JSR 186", 2002. See
http://jcp.org/en/jsr/detail?id=186. Panasonic, Sun Microsystems, "JAIN Instant Messaging
Specification - JSR 187", 2002. See http://jcp.org/en/jsr/detail?id=187.

[9] dynamicsoft, Sun Microsystems, "SDP Specification - JSR 141", 2002. See
http://jcp.org/en/jsr/detail?id=141.

[10] Telcordia Technologies, Sun Microsystems, "JAIN MGCP Specification - JSR 23", 2001.
See http://jcp.org/en/jsr/detail?id=23.

[11] Hughes Software Systems, Sun Microsystems, "JAIN Megaco Specification - JSR 79",
2002. See http://jcp.org/en/jsr/detail?id=79.

[12] NetNumber, Sun Microsystems, "JAIN ENUM Specification - JSR 161", 2002. See
http://jcp.org/en/jsr/detail?id=161.

[13] Sun Microsystems, "Java Servlet Specification - JSR 154", 2002. See
http://jcp.org/en/jsr/detail?id=154.

[14] 3GPP TS 23.228: "IP Multimedia Subsystem (IMS) - Stage 2" - http://www.3gpp.org.

[15] Sun Microsystems, "Connected Limited Device Configuration - JSR 139", 2002. See
http://jcp.org/en/jsr/detail?id=139.

[16] Motorola, Sun Microsystems, "M obile Information Device Profile - JSR 118", 2002. See
http://jcp.org/en/jsr/detail?id=118.

You might also like