Wednesday Nov 25, 2009

SailFin CAFE - Maven Archetype

The CAFE Maven Archetype is now available for creating maven based projects for Sailfin CAFE. The project created will have a maven project metadata(pom.xml) and sample code for a basic click to call CAFE Application.

Steps to start developing SailFin-CAFE applications using Netbeans and Maven CAFE Archetype :

-- Create a new project : File --> New Project
-- Under maven category, select maven project.
-- Click on Add, to add the Maven CAFE Archetype to the list of available archetypes.
-- The following archetype details can be entered:
       \* GroupId : org.glassfish.cafe.archetypes
       \* ArtifactId : cafe-archetype
       \* Version : 1.0-SNAPSHOT
       \* Repository : http://download.java.net/maven/2

cafe-archetype details

-- Now, select cafe-archetype and click next.
-- Enter the project details as shown in figure

cafe-archetype project details

-- Click Finish to create a Maven CAFE Application.
-- Right click on the project and Build it.
-- Your cafe application is ready to be deployed !!

Sunday Nov 22, 2009

Developing Sailfin CAFE Applications using Netbeans

Developing Sailfin CAFE Application with Netbeans is easier then ever. Resolve dependencies and build the project without any hassles.

Here's a quick guide to it:

- Create a new Netbeans project : File --> New Project
- In maven category, choose Maven Web Application, you will get the following window:


click finish to create a project.
- Right click on mavenproject1 - Source Packages and select new -> Java Class, to create a new Java Class.
- Make the class as CAFE CommunicationBean, by adding the following annotation:

@CommunicationBean
public class NewClass {
}

- For resolving the missing dependency, select the tooltip next to @CommunicationBean annotation and click on Search Dependency at maven repositories.

searching maven dependency

- the following suggestion box will appear, select cafe-communication-api and select Add.

select cafe-communication-api

- Save the project, click on the tooltip next to @CommunicatioBean and select import org.glassfish.cafe.api.bean.CommunicationBean

- Build the project and your CAFE Application is ready !!

- Steps to install and run the App:

  • Download and install latest SailFin V2 promoted build.
  • Download and install latest SailFin CAFE build.
  • Start SailFin and deploy the application. (eg: asadmin deploy mavenproject1.war)
  • Register two SIP phones with the help of steps mentioned here.
  • Click on Alice's phone and type "bob@example.com". Then click on green dial button. The bob's phone is ringing !!
  • Thursday Sep 03, 2009

    Integrating SailFin-CAFE with OpenIMS

    This entry demonstrates the procedure for installing OpenIMS and integrating Sailfin-CAFE with it. The attached sailfin-cafe application could then be used to establish a call between two clients registered with open-ims.

    Overview

    • Install OpenIMS core.
    • Install Sailfin-CAFE, integrate it with OpenIMS.
    • Register IMS clients with OpenIMS core.
    • Deploy the cafe-app.
    • Establish call between the clients.

    Lets get started

    Installing OpenIMS core

    -- Install instructions can be found here.

    Note: If you are running the DNS on the same machine as OpenIMS core, then while configuring the DNS server, edit the file /etc/dhcp3/dhclient.conf and uncomment this line: prepend domain_name_servers 127.0.0.1;

    -- Start OpenIMS core components viz: pcscf, scscf, icsfc and FHoSS startup as given in the installation guide.

    Setting up SailFin and SailFin-CAFE

    -- Download and install SailFin from here.

    -- Use SailFin CAFE promoted build 05 or latest. The download and install instructions are available here.

    -- Register SailFin with OpenIMS core:

    • Go to http://localhost:8080 and enter hssAdmin as username & hss as password. This will lead you to FHoSS - FOKUS Home Subscriber Server webpage.
    • Click on create(Application Server) under the servcies tab.
    • The server setting parameters will be: Server Name - sip:hostname:5060, DiameterFDQN - hostname, Default Handling - Session-continued.
    • Attach the default_ifc to the newly created server.

    IMSClient setup

    -- UCT IMS Client can be dowloaded at http://uctimsclient.berlios.de/

    -- OpenIMS Core has Alice and Bob as the users registered by default. Use two different IMS clients to login as Alice and Bob respectively.

    Deploying test application and establishing the call

    -- Download and deploy the sample application using sailfin asadmin deploy.

    -- Call Establishing logic of the test App:

        public class NewServlet extends HttpServlet {      
             @Context CommunicationSession session;
                     ----------

             protected void processRequest(HttpServletRequest request, HttpServletResponse response) {

                     ----------

                Call call  = session.createCall(party1);
                call.addParticipant(party2);

                    -----------

              }

        }

    -- Access the url : http://localhost:8080/esswebv2

    -- Enter user ids : Alice@open-ims.test  and Bob@open-ims.test

    -- Click on the call button and listen the IMS Clients ringing !!

    Screencast

    The screencast for the complete setup can be viewed here !!

    About

    Mohit Gupta

    Search

    Categories
    Archives
    « April 2014
    SunMonTueWedThuFriSat
      
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
       
           
    Today