Home arrow Blog arrow Running E4SS apps on Mobicents SIP Servlets
Running E4SS apps on Mobicents SIP Servlets Print
The Mobicents team has released version 1.0 GA of Mobicents SIP Servlets (MSS), which is a full JSR289-compliant container running on top of Tomcat 6 or JBoss 4. We have successfully tested all of the reusable features from E4SS v.2.5-beta on MSS. This post explains the steps necessary to get E4SS features, as well as the DFC Application Router, running on MSS 1.0.

Install Mobicents SIP Servlets

Follow the instructions to install MSS 1.0, either the Apache Tomcat version or the JBoss version. All further instructions assume a new MSS installation, rooted at $DOMAIN_HOME (if you wish to use these instructions verbatim, you will need to set this environment variable to the appropriate value). Also it is assumed you have the E4SS development kit (version 2.5-beta or later) installed at $EDK_HOME.

Instructions are provided for a Unix-based OS, though it should be straightforward to translate the steps for other OS types. (N.B. We have only tested the E4SS/MSS combo on Linux systems.)

Configure your MSS installation

Create logging.properties

E4SS relies on a logging.properties file to customize its logfiles. The following commands will create a simple version that will rotate logfiles at 5MB, and retain the latest ten:
$ cat > $DOMAIN_HOME/logging.properties
java.util.logging.FileHandler.limit = 5000000
java.util.logging.FileHandler.count = 10
<EOF>

Create a directory for E4SS logfiles

It may be convenient to create a directory to contain the logfiles created by E4SS applications. For example,
mkdir $DOMAIN_HOME/e4sslogs

Set MSS listen address

By default, MSS listens on the localhost interface. If you want MSS to listen on other addresses, you need to set the listen address.

For MSS on Apache Tomcat, edit $DOMAIN_HOME/conf/server.xml. Change the ipAddress parameter for the SIP Connector to the desired value (e.g., 0.0.0.0). For MSS on JBoss, you can specify the desired listen address at container startup time.

Set JVM properties

E4SS uses a number of JVM properties (see the E4SS manual). A convenient way to set these for MSS is to use the JAVA_OPTS environment variable. The example below assumes the existence of the logging.properties file and e4sslogs directory in the locations created above.
export JAVA_OPTS="-Dorg.echarts.debugging=true -Dorg.echarts.servlet.sip.logdir=e4sslogs -Dorg.echarts.servlet.sip.messagelog=true -D
org.echarts.servlet.sip.debugging=true -Dorg.echarts.system.transitionTimerManager.class=org.echarts.servlet.sip.TransitionTimerManag
er -Djava.util.logging.config.file=logging.properties -Dorg.echarts.machine.debugging.globalStateOutput=true"

Use DFC Application Router (optional)

MSS comes with a Default Application Router. If you prefer to use the DFC Application Router instead, follow these steps:
  • (For Apache Tomcat): cd $DOMAIN_HOME/lib
  • (For JBoss): cd $DOMAIN_HOME/server/default/deploy/jboss-web.deployer/
  • mv sip-servlets-application-router-1.0-GA.jar sip-servlets-application-router-1.0-GA.jar.save
  • cp $EDK_HOME/lib/dfcar.jar .
  • The approuter.xml configuration file for the DFC AR should be placed in $DOMAIN_HOME.

    Start container

    Apache Tomcat

    Start the container using a command like the one below.

    cd $DOMAIN_HOME
    ./bin/startup.sh

    JBoss

    Start the container using a command like the one below. Note that the SIP listen address may be specified via this command:

    cd $DOMAIN_HOME
    ./bin/run.sh -b 0.0.0.0 > console.out 2>&1 &

    Deploy E4SS applications

    The MSS container should now be running in a configuration appropriate for E4SS applications. You can then build and deploy E4SS applications to MSS using the steps below.

    Apache Tomcat

    From a directory containing build.xml for an E4SS application:

    ant fatsar
    cp *.war $DOMAIN_HOME/webapps/
    The application can be undeployed by removing the warfile from the above directory.

    JBoss

    From a directory containing build.xml for an E4SS application:

    ant fatsar
    cp *.war $DOMAIN_HOME/server/default/deploy/
    The application can be undeployed by removing the warfile from the above directory.

    UPDATE: MSS has changed its processing of deployment descriptors in a way that stock E4SS applications no longer deploy. See this bug report for information on how to modify sip.xml and web.xml to make MSS happy.

    Conclusion

    That's all it takes to get E4SS applications running on MSS. If you have any questions or comments, post them in the forums.

Last Updated ( Wednesday, 08 September 2010 )
 
< Prev   Next >
Copyright © 2006-2009 echarts.org