Programming SIP
SIP's intimate association with all things Internet establishes telephony as part of a continuum of Internet media options. Its similarities with HTTP and SMTP and its text-based format mean that SIP is familiar to web developers.
In order to develop services, programmers need APIs. There have been many advances in this area of SIP, resulting in numerous new interfaces.
CPL (Call Processing Language
This was the first API developed for SIP. Strictly speaking, it is not really an API at all, but rather an XML-based scripting language for describing and controlling call services. It is designed to be implemented on either network servers or user agent servers and is meant to be simple, extensible, easily edited by graphical clients, and independent of operating system or signalling protocol.
CPL is engineered for end-user service creation: a CPL interpreter is very lightweight and a server can easily parse and validate a CPL, guarding against malicious behaviour. It is suitable for running on a server where users may not be allowed to execute arbitrary programs, as it has no variables, loops, or ability to run external programs. It has primitives for making decisions and taking actions based on call properties, such as time of day, caller, called party etc.
The SIP-CPL draft can be found on the IETF website
In the World Wide Web, the Common Gateway Interface (CGI) has served as a popular means of programming web services. CGI scripts have been the initial mechanism to make websites interact with databases and other applications. Due to the similarities between the SIP and HTTP, CGI is a good candidate for service creation in a SIP environment.
Like HTTP CGI, a SIP CGI script resides in the server and passes message parameters through environment variables to a separate process. The process sends instructions back to the server through its standard output file descriptor. SIP CGI is almost identical to HTTP CGI and is particularly suitable for services that contain substantial web components.
A CGI script can be written in Perl, Tcl, C, C++ or Java making it accessible to a large community of developers.
The draft standard is on the IETF website
An HTTP servlet is a Java application that runs in a Web server or application server and provides server-side processing, typically to access a database or perform e-commerce processing. It is a Java-based replacement for CGI scripts, Active Server Pages (ASPs) and proprietary plug-ins written in C and C++. Servlets are similar to the CGI concept but, instead of using a separate process, messages are passed to a class that runs within a JVM (Java Virtual Machine) inside the server.
SIP Servlets are very similar to HTTP Servlets; they simply enhance the interface to support SIP functions.
Because they are written in Java, servlets are portable between servers and operating systems.
The specification being developed under the Java Community ProcessSM can be found on the JCP.org site.
JAIN(TM) APIs
The JAIN APIs are being specified as a community extension to the Java(TM) platform. By providing a new level of abstraction and associated Java interfaces for service creation across circuit switched and packet networks, JAIN is bridging IP and IN protocols to create an open market.
The objective of the JAIN initiative is to create an open value chain in the provisioning of telecom services by addressing service portability, network convergence and service provider access.
-
Service Portability: - Write Once, Run Anywhere. JAIN APIs reshape proprietary interfaces to enable truly portable applications.
-
Network Convergence: (Integrated Networks) - Any Network. JAIN technology allows services to run over any underlying network architecture, whether IP, ATM, TDM or wireless.
-
Service Provider Access - By Anyone! JAIN APIs specify mechanisms to allow abstracted services direct access to network resources and devices to carry out specific actions or functions.
JAIN SIP, SIP Lite, SIP Servlets
There are currently three SIP APIs that have either been developed or that are under development within the JAIN initiative:
-
JAIN SIP - JAIN SIP is a low level API that maps directly to RFC 2543 published by the IETF. JAIN SIP is at Final Release and the API specification, Reference Implementation and Technology Compatibility Kit (test suite) can be freely downloaded from the Java Community Process website.
-
JAIN SIP Lite - The JAIN SIP Lite API is a high-level API. The goal of this high-level API is to allow application developers to create applications that have SIP as their underlying protocol without having to have an extensive knowledge of the SIP protocol. This will allow developers to rapidly create applications, such as user agent type applications. JAIN SIP Lite is a thin Java API that can be used as a high-level wrapper around the SIP protocol that will provide application developers with an API that is easy to use.
-
SIP Servlets - See the SIP Servlets section for further information.
For further information see:
- the JAIN website at http://java.sun.com/products/jain
- the Java Community Process site at http://jcp.org/
- the JAIN SIP 1.0 API specification, RI and TCK
- the JAIN SIP Lite specification (under development)
Parlay
The Parlay Group was formed in 1998 to specify and promote open APIs that "intimately link IT applications with the capabilities of the communications world". Initial efforts have focused on call control, messaging, though the prime focus of Parlay is to allow applications to access the functionality of the telecoms network in a secure way.
Parlay APIs consist of two categories of interface:
-
Service interfaces offering applications access to a range of a network capabilities and information
-
Framework interfaces providing the supporting capabilities necessary for the service interfaces to be secure and manageable.
The Parlay APIs are defined in Universal Modeling Language (UML). The JAIN Service Provider APIs (SPA) define a full industry standard Java technology realization of the Parlay APIs. In addition to Java API specifications, JAIN SPA provide:
- Java Reference Implementations
- Technology Compatibility Kit (i.e., Java test suites)
- A complete API Certification program
See the Parlay and the JAIN websites for more information.






