SailFin Application Server 

Click here to go back to SailFin Sample Home Page

SailFin Sample Applications - CallSetup

This demo ("CallSetup") combines a Java EE 5 Application with Sip Servlets. Incoming SIP registrations are processed by a SipServlet that utilizes Java EE 5 annotations and EJB 3.0 to store in to a database. The web interface in the same application looks up a SipFactory and places calls, with the help of B2B User Agent SipServlet. This application illustrates how to utilize the powerful component model, IDEs, and Tools of Java EE 5 to write Sip applications. It also shows how Java EE Web components can add communication capabilities to existing web interfaces, with the help of Sip.


Instructions to deploy the sample application CallSetup

Note: For executing sailfin samples user must have configured SailFin server. Here 'INSTALL_HOME' is the sailfin installation directory.

  1. % cd INSTALL_HOME/bin

  2. % ./asadmin start-domain domain1
    It would start the server.

  3. % ./asadmin start-database
    It would start the database.

  4. % cd INSTALL_HOME/samples/sipservlet/CallSetup
    It would point to the sailfin sample 'CallSetup' direcotry which contains 'ant script' for doing build,deploy and undeploy 'CallSetup' sample.

    Script contains individual targets for doing build and create sar file (INSTALL_HOME/lib/ant/bin/ant sar), deploy(INSTALL_HOME/lib/ant/bin/ant deply) and undeploy(INSTALL_HOME/lib/ant/bin/ant undeploy).

  5. % INSTALL_HOME/lib/ant/bin/ant all
    It would build all available java files and going to create sar file (CallSetup.sar). It would deploy sar file on sailfin server.

  6. % INSTALL_HOME/lib/ant/bin/ant undeploy
    It would undeploy sar file (CallSetup.sar).


Instructions to execute the sample application CallSetup

  1. Download and install a SIP softphone from www.xten.com. The SIP softphone is avaialble only for Linux and Windows. We used X-Lite Client (Version 3.0 omn Windows)

    Could not get SIP softphone when the SIP UAclient and SIP Server were on same machine. So we placed the clients on separate machines. Also, we turned off Wireless Network interface on the machine hosting the server.

  2. Once the softphone is installed, open the menu and add the following in the Menu option, SIP Account Settings

    a. Add a name , display name
    b. Add a domain name test.com
    c. On windows the domain proxy setting should point the IP address of machine hosting the Telco AS , suffixed with the port 5060, to the proxy. i.e. Set the radio button option to proxy and enter the the IP address of your machine hosting the Telco AS , suffixed with the port 5060 as the address.
    On Linux, you need to look at ServerSettings->SIPProxy option. The outbound SIP proxy and Proxy should point to the IP address of your machine hosting the Telco AS , suffixed with the port 5060 .

  3. Your sip phone should attempt to register with the application in the telco AS. For this demo, at least two clients must register with the GlassFish/SIP Server

  4. You can test that the registration is successful by pointing browser to

    http://localhost:8080/CallSetup/RegistrationBrowserServlet

    You should see a table with all registered clients.

  5. Click on the check box next to two registered users and click submit. The phone should ring sequentially at the two selected end points.

Send any support requests or technical queries to dev@sailfin.dev.java.net


Copyright © 2007 Sun Microsystems, Inc. All rights reserved.