Note: Implementation of SIP involves implementation of user agents, proxies and configuring the proxies. This articles concerns with basic idea of programming the user agents and possibly proxies too. This article, however, does not concern with configuration of proxies and other proprietary user agents.

Introduction:

There is a growing interest, both in the Internet and in the telecommunication industries, in multimedia communication services. An increasing number of Internet users who used to just surf the web or send emails are now becoming addicted to services such as Instant Messaging (IM), online gaming, and voice and video on the Net. These are examples of multimedia communication services delivered over the Internet that are enabled by the Session Initialization Protocol (SIP) in conjunction with other protocols.

SIP not only enables voice on the Internet, but also a completely new universe of Total Communication services. SIP is defined and developed by the IETF. More specifically, the core SIP specification is documented in RFC 3261. It is an application level signalling protocol for creation and management of sessions over an IP network. The term “session” refers to the media plane aspect of the communication i.e. to the exchange of media (e.g. voice, video and so on) among an association of participants.

Sessions can be described using the Session Description Protocol (SDP) defined in RFC 4566.

SIP sessions utilize up to four major components: SIP User Agents, SIP Registrar Servers, SIP Proxy Servers and SIP Redirect Servers. Together, these systems deliver messages embedded with the SDP protocol defining their content and characteristics to complete a SIP session. Below is a high-level description of each SIP component.

1. SIP User Agents (UAs) are the end-user devices, such as cell phones, multimedia handsets, PCs, PDAs, etc. used to create and manage a SIP session. The User Agent Client initiates the message. The User Agent Server responds to it.

2. SIP Registrar Servers are databases that contain the location of all User Agents within a domain. In SIP messaging, these servers retrieve and send participants’ IP addresses and other pertinent information to the SIP Proxy Server.

3. SIP Proxy Servers accept session requests made by a SIP UA and query the SIP Registrar Server to obtain the recipient UA’s addressing information. It then forwards the session invitation directly to the recipient UA if it is located in the same domain or to a Proxy Server if the UA resides in another domain.

4. SIP Redirect Servers allow SIP Proxy Servers to direct SIP session invitations to external domains. SIP Redirect Servers may reside in the same hardware as SIP Registrar Severs and SIP Proxy Servers. 

A high level description of SIP can be found at http://www.sipcenter.com/sip.nsf/html/WEBB5YNVK8/$FILE/Ubiquity_SIP_Overview.pdf.

Programming SIP:

In order to ease the development of SIP applications, programmers typically use Application Programming Interfaces (APIs) that encapsulate specific aspects of the SIP functionality so programmers can concentrate on the application service logic. There are several SIP APIs available. A short list is presented below.

1. JAIN SIP

JAIN (Java APIs for Integrated Networks) SIP is a Java standard for a low-level SIP interface. Its programming constructs represent low-level concepts such as messages, headers, parameters, ports and IP addresses. It can be used to build SIP entities such as UAs, proxies and B2BUA.

JAIN SIP is specified in JSR 032 under the Java Community Process (JCP).

2. JAIN SDP

SIP programming almost always implies manipulation of SDP (Session Description Protocol) content. JAIN SDP defines a Java interface to facilitate such task. JAIN SDP corresponds to JSR 141.

3. SIP Servlets

The SIP servlets API represents an interface to a Java container for SIP applications, including the functional interface. The functional interface is a higher level than the one offered by JAIN SIP. The SIP servlets API is one of the most popular for creating server side pure SIP applications. It can also be combined with the HTTP servlets interface, and offers the programmer a convenient way to develop applications that combine SIP and HTTP protocols.

The SIP servlets API is specified in JSR 116 and JSR 289.

4. SIP API for J2ME

JSR 180 defines a multipurpose SIP API for the Java 2 Platform, Micro Edition. It enables SIP applications to be executed in memory-limited terminals, specially targeted to mobile phones.

5. IMS API

The IMS API is currently being developed under JSR 281. It is intended to be used by application developers who wish to build Java applications for terminals that use the IP Multimedia Subsystem. It is targeted at the Java Platform, Micro Edition (JME).

It offers the programmer access to the IMS enables such as presence, Push-to-Talk (PTT) and XML.

But all these are just specifications. Sun Microsystems does not provide implementation for these APIs. If you were to use any of these APIs, then you will require implementation. Some of the open source implementations are listed below.

1. The NIST (National Institute of Standards and Technology) reference implemenation of the JAIN SIP API is quite popular, and is being successfully used nowadays in a number of commercial projects. It can be downloaded from https://jain-sip.dev.java.net/. You can browse the JavaDoc for it at http://snad.ncsl.nist.gov/proj/iptel/jain-sip-1.2/javadoc/. Also a very nice example implemenation can be found at http://snad.ncsl.nist.gov/proj/iptel/.

2. The Mobicents initiative represents the open source approach for a JAIN SLEE as well as SIP Servlet implementation. It can be downloaded from http://www.mobicents.org/products.html.

3. The Jiplet API is a nonstandard SIP servlet-like API that uses JAIN SIP as the functional interface to the SIP protocol, and for which there exists an open source implementation. It can be downloaded from http://www.cafesip.org/projects/jiplet/index.html.

4. A reference implementation for “SIP for J2ME” is available from Nokia. It’s a pure Java implementation that’s built on CLDC 1.1 and MIDP 2.0. It supports real SIP messaging over a local area network, enabling applications to send SIP messages, receive SIP messages synchronously, and receive SIP message-listener notifications asynchronously.

To download the JSR 180 RI, you must be a member of Forum Nokia; registration is free. Once you’ve become a member, download and unpack the archive. Download link is http://www.forum.nokia.com/info/sw.nokia.com/id/b81fe286-720f-4133-b20a-5d8d21bee228/JSR-180_SIP_API_for_J2ME.zip.html. HTML documentation can be found at http://www.forum.nokia.com/info/sw.nokia.com/id/2e730963-6c3d-4400-b04c-8f5bde04230c/JSR-180_SIP_API_for_J2ME_HTML_javadoc_version.zip.html.

Other links regarding JSR 180 implementation are available at http://discussion.forum.nokia.com/forum/showthread.php?t=75183.

 

In addition to these, there are many open source implemenations of SIP entites – such as proxies, User Agents, and so on – that offer prorpietary interfaces for building applications or extending the functionality in the product. For instance, the OpenSER project offers an open source implemenation of a SIP server, and provides low-level, nonstandard APIs for SIP application development.

Other Links:

1. A SIP website: http://www.sipcenter.com/

2. SIP Communicator Project on java.net  – A soft phone built on JAIN-SIP

3. http://www.voipuser.org/forum_index.html VOIP Forum

4. http://sw.nokia.com/id/350158bf-b4ef-44b4-acd5-0cf685b5d858/MIDP_SIP_API_Developers_Guide_v1_1_en.pdf

5. http://sw.nokia.com/id/fa12d593-31b1-444c-bbc9-02f57cd8d4ea/IMS_white_paper.pdf

6. http://sw.nokia.com/id/fa12d593-31b1-444c-bbc9-02f57cd8d4ea/IMS_white_paper.pdf



4 Responses to “What is SIP and how to implement it?”  

  1. 1 MaxLee

    One company that I’ve found has several tools for SIP VoIP development. The company is called Brekeke and they have some free and trial downloads that you can use to play with SIP development.

    You can setup your own SIP network quickly. The academic version is free.

    http://www.brekeke.com/sip/

    To develop SIP applications in Java, try their JTAPI SDK. It will allow you to create full blown IVR applications.

    http://www.brekeke.com/telephony/

    They also have a Microsoft .NET control. It’s like an activex control that will let you create SIP applications that work with the IP PBX.

    http://www.brekeke.com/call-center/

    Have fun playing with SIP development!

  2. 2 prajwalan

    Thank you much MaxLee, for sharing these links.

  3. 3 mayank432

    I have to test the performance of SIP. My aim is to see the performance when a session is created/modified/destroyed. For that what will i need to do?
    Will I need to get a SIP network ready?
    And then maybe mointor using ethereal?
    Will I need to use Jiplet for the purpose?

    Please help me, I’m not sure what to do.
    * Also what is exactly is a SIP network..does it mean having the SIP components like UA, proxy etc?
    * Also, in the article above you first talk about several SIP APIs available. You then say that ‘all these are just specifications’. ‘If you were to use any of these APIs, then you will require implementation. ‘ Does that mean that the first list is of STANDARDS and the second is implementations of the standards?

    Your response will be very helpful.
    Thanks in advance for your help.

  4. 4 prajwalan

    Hi mayank432

    To my knowledge there are some tools that allow you to measure the performance of SIP entities and network. One such is SIPStone (http://www.sipstone.org/). You might find SIPit (https://www.sipit.net/Main_Page) also interesting.

    Yes, I believe a SIP network will consist of one or more SIP proxies, registrars and of course at the client end, UA’s will be there. These almost all the proxies provide registrar service also, so usually proxies and registrars are combined (not necessarily always).

    Sun Microsystems provided only the interfaces (or say abstract classes). So, they are only specifications. For programming, you will require implementation of these specifications. In other words, you will need full API and not just interfaces or abstract classes. NIST based API is full API that you can use for programming.


Leave a Reply