The SIP Servlet Tutorial

About the Examples

This section tells you everything you need to know to install, build, and run the examples included in the tutorial bundle.

Required Software

The following software is required to run the examples.

Java Platform, Standard Edition

To build, deploy, and run the examples, you need a copy of Java Platform, Standard Edition 5.0 (Java SE 5.0) or higher. You can download the Java SE 5.0 software from http://java.sun.com/javase/downloads/index_jdk5.jsp. Download the current JDK update that does not include any other software (such as the NetBeans IDE or Java EE).

Communications Application Server 1.5

Communications Application Server 1.5 is targeted as the build and runtime environment for the tutorial examples. Communications Application Server 1.5 is based on the GlassFish and SailFin open-source projects.

NetBeans IDE

The NetBeans integrated development environment (IDE) is a free, open-source IDE for developing Java programming language applications, including enterprise applications. NetBeans IDE supports the Java EE 5 platform. You can build, package, deploy, and run the tutorial examples from within NetBeans IDE.

SIP Modules for NetBeans IDE

Integrate the SailFin plug-in modules, which add SIP application development functionality to NetBeans IDE. The modules are bundled with Communications Application Server 1.5.

  1. In NetBeans IDE, select Tools->Plugins.

  2. Click the Downloaded tab and click Add Plugins.

  3. Navigate to the Install/tools/netbeans directory and select all the files in this directory.

  4. Click Install, then Next.

  5. Select I Agree in the License Agreement window and click Install.

  6. Click Continue to install the unsigned modules, then click Finish.

Sample Applications

The tutorial uses several sample applications available on the SailFin website.

  1. Go to the following URL: http://wiki.glassfish.java.net/gfwiki/Wiki.jsp?page=SipExamples.

  2. Follow the instructions to download the SipProxy and SIP Servlet 1.1 Click-To-Dial sample applications.

SIPp Test Application

SIPp is an application to test SIP clients and servers. It is available from http://sipp.sourceforge.net/.

X-Lite Soft Phone

X-Lite is a free multi-platform soft phone used in the examples. It is available from http://www.counterpath.com/x-lite.html&active=4.

Apache Ant

Ant is a Java technology-based build tool developed by the Apache Software Foundation (http://ant.apache.org), and is used to build, package, and deploy the tutorial examples. Ant is included with the Communications Application Server 1.5. To use the ant command, add JAVAEE_HOME/lib/ant/bin to your PATH environment variable.

Building the Examples

The tutorial examples are distributed with a configuration file for either NetBeans IDE or Ant. Directions for building the examples are provided in each chapter. Either NetBeans IDE or Ant may be used to build, package, deploy, and run the examples.

ProcedureBuilding the Examples Using NetBeans IDE

To run the tutorial examples in NetBeans IDE, you must register your Communications Application Server 1.5 installation as a NetBeans Server Instance. Follow these instructions to register the Communications Application Server 1.5 in NetBeans IDE.

  1. Select Tools-->Server Manager to open the Server Manager dialog.

  2. Click Add Server.

  3. Under Server, select Sun Java System Application Server and click Next.

  4. Under Platform Location, enter the location of your Application Server installation.

  5. Select Register Local Default Domain and click Next.

  6. Under Admin Username and Admin Password, enter the admin name and password created when you installed the Application Server.

  7. Click Finish.

Tutorial Example Directory Structure

To facilitate iterative development and keep application source separate from compiled files, the tutorial examples use the Java BluePrints application directory structure.

Each application module has the following structure:

The Ant build files (build.xml) distributed with the examples contain targets to create a build subdirectory and to copy and compile files into that directory; a dist subdirectory, which holds the packaged module file; and a client-jar directory, which holds the retrieved application client JAR.