Skip to main content

Running SailFin CAFE applications on Oracle Communications Converged Application Server -- preliminary notes

Posted by bhavanishankar on February 26, 2010 at 7:44 PM PST

Installing OCCAS

Install OCCAS 4.0 under directory /opt/oracle (here in after referred to as OCCAS_HOME), and configure a domain by running OCCAS_HOME/wlserver_10.3/common/bin/ (with all default options). With that, you will have a domain created at OCCAS_HOME/user_projects/domains/base_domain

Installing CAFE on OCCAS

Get the latest CAFE promoted build from here. Unzip the downloaded sailfin-cafe-v1-b<number>_installer.jar under OCCAS_HOME/user_projects/domains/base_domain/lib

Set the environment variable EXTRA_JAVA_PROPERTIES="-Dwlss.local.serialization=false" and run OCCAS_HOME/user_projects/domains/base_domain/bin/ to start OCCAS.

With that, CAFE framework is all set on OCCAS to run your CAFE applications.

Running CAFE apps on OCCAS:

I will provide some example CAFE applications to run it on OCCAS.

(1) Simple two party call

Deploy the simple two-party-call.war CAFE application by dropping it under OCCAS_HOME/user_projects/domains/base_domain/autodeploy directory. Now the application is ready to make two party calls. Refer to the final section of binod's blog to test this application using X-Lite.

The two-party-call.war has the following contents:




public class SimpleCommsBean {


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi=""
xmlns="" xmlns:web="" xsi:schemaLocation=""
id="WebApp_ID" version="2.5">


<?xml version="1.0" encoding="UTF-8"?>
<sip-app xmlns="" xmlns:javaee="">

The app-name and servlet-name prefix should match the name of the .war file (two-party-call in this case)

This is the same CAFE application that you would have run on SailFin server, but with the addition of two deployment descriptors (WEB-INF/web.xml & WEB-INF/sip.xml).

(2) Conference application

In order to run conference application you need a media mixer. So, we need to first integrate the jvoicebridge (bundled with CAFE) with OCCAS, by following these steps :

  1. $ cd OCCAS_HOME/user_projects/domains/base_domain/lib/jvb/bridge
  2. Edit to change voicebridge.sip.port=5070. (Otherwise the port 5060 will conflict with OCCAS)
  3. Start jvoicebridge by running OCCAS_HOME/modules/org.apache.ant_1.6.5/bin/ant -f run.xml (make sure ANT_HOME is set to OCCAS_HOME/modules/org.apache.ant_1.6.5, and JAVA_HOME is set to OCCAS_HOME/jdk160_05)
  4. Deploy the jvoicebridge connector by copying OCCAS_HOME/user_projects/domains/base_domain/lib/jvb-ra.rar to OCCAS_HOME/user_projects/domains/base_domain/autodeploy directory.

With that, the jvoicebridge is integrated with OCCAS-CAFE. Now deploy your conf-app.war CAFE application by dropping it under OCCAS_HOME/user_projects/domains/base_domain/autodeploy directory.

Note :
Prior to deploying conf-app.war, undeploy two-party-call.war by deleting it from autodeploy directory.

Now your CAFE application is ready to handle the conference calls, and the configuration looks like this:

If you are using X-Lite phone, then type "" on the dial-pad of each each phone and click the dial button. You can see each one of them joining the conference, like this:

On the console where you started the jvoicebridge, you can see various control messages that are printed by the jvoicebridge.

Now to offer some insight into the deployed conf-app.war, it just has one simple communication bean (shown below), and the deployment descriptors:




public class YourCommunicationPOJO {

    @Context CommunicationSession sess;
    @Context CommunicationContext ctx;

    void handleInit() {
         Conversation call = (Conversation) ctx.getCommunication();
         String confName = call.getCallee().getName();
         if (confName.equalsIgnoreCase("")) {
             sess.createConference(confName, call);

The deployment descriptors are same as that of two-party-call.war with app-name and servlet prefix set as conf-app in WEB-INF/sip.xml

(3) Accessing communication session from jsp and http servlet

If you want to do something as in binod's blog with CAFE on OCCAS, then you can access the communication session from jsp or http servlet like this:

public class SimpleTestServlet extends HttpServlet{

    @Context CommunicationSession session; // as of now, this injection does not work on OCCAS

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            if(session == null) {
                session = (CommunicationSession)request.getSession().getAttribute(CommunicationSession.NAME);

Ditto for jsp:

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<%@page import=""%>
    CommunicationSession commSession = (CommunicationSession) session.getAttribute(CommunicationSession.NAME);


Continue reading MSRP on OCCAS with CAFE

conf-call.png165.96 KB
occas-jvoicebridge.png12.44 KB