Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleSample .jettyrc file
# Where Cipango is installed
JETTY_HOME=/home/user/cipango

JAVA_HOME=/usr/local/jdk1.6.0

# Set max heap sise to 512MB and initial size to 256MB

JAVA_OPTIONS=="-Xmx512M -Xms256M -XX:+UseParNewGC -XX:+UseConcMarkSweepGC"

# Override the default SIP host
SIP_HOST=192.168.1.2

#Override the default SIP port
SIP_PORT=5060

#Override the default HTTP port
JETTY_PORT=8080

if [ ! -z "$SIP_PORT" ]
then
  JAVA_OPTIONS="${JAVA_OPTIONS} -Dsip.port=${SIP_PORT}"
fi

if [ ! -z "$SIP_HOST" ]
then
  JAVA_OPTIONS="${JAVA_OPTIONS} -Dsip.host=${SIP_HOST}"
fi

...

Property

Description

JETTY_HOME

Where Cipango is installed. If not set, the script will try go guess it by first looking at the invocation path for the script, and then by looking in standard locations as

  • $HOME/opt/jetty
  • /opt/jetty
  • /usr/local/jetty
  • ...
    The java system property "jetty.home" will be set to this value for use by configure.xml files, f.e.:
    Code Block
    xml
    xml
    <Arg><SystemProperty name="jetty.home" default="."/>/sipapps</Arg>
    

JAVA_HOME

Home of your Java installation

JAVA

Command to invoke Java. If not set, $JAVA_HOME/bin/java will be used.

JAVA_OPTIONS

Extra options to pass to the JVM

JETTY_CONSOLE

Where Jetty console output should go. Defaults to first writeable of

  • /dev/console
  • /dev/tty

JETTY_PORT

Override the default HTTP port for Cipango servers. If not set then the default value in the xml configuration file will be used. The java system property "jetty.port" will be set to this value for use in configure.xml files.

JETTY_RUN

Where the jetty.pid file should be stored. It defaults to the first available of /var/run, /usr/var/run, and /tmp if not set.

JETTY_PID

The jetty PID file, defaults to $JETTY_RUN/jetty.pid

JETTY_ARGS

The default arguments to pass to Jetty.

...

Code Block
xml
xml
titlecipango.xml


<Set name="applicationRouter">
    <New class="org.cipango.dar.DefaultApplicationRouter">
      <Set name="configuration"><SystemProperty default="." name="jetty.home"/>/etc/dar.properties</Set>
      <Set name="routeOutgoingRequests">false</Set>
    </New>
 </Set>

...

  • remove the default application library: delete the file ${jetty.home}/lib/ext/cipango-dar-VERSION.jar
  • or use the system property javax.servlet.sip.ar.spi.SipApplicationRouterProvider to define the custom SipApplicationRouterProvider
  • or define the application router in ${jetty.home}/etc/cipango.xml, for instance
    Code Block
    xml
    xml
    
    
    <Set name="applicationRouter">
        <New class="com.acme.MyApplicationRouter">
        </New>
     </Set>
    

...

JNDI support is similar to Jetty's one. Documentation on how to bind objects in JNDI tree is available here

SIP Connectors

TLS

To add TLS support, Cipango should be started with cipango-tls.xml configuration file:

...

To manage the keys, see Jetty SSL plugin

Web sockets

Cipango has done a prototype of the WebSocket Transport for Session Initiation Protocol Draft.
This prototype can be compiled and tested with the commands

No Format

cd extras
mvn install -P websocket

Then it could be installed in cipango distribution with the commands

No Format

cp cipango-websocket/target/cipango-websocket-2.1-SNAPSHOT.jar ../cipango-distribution/target/distribution/lib/ext/
cp cipango-websocket/src/main/config/etc/cipango-websocket.xml ../cipango-distribution/target/distribution/etc/

The SIP application should include the file test-cipango-websocket/src/main/webapp/WEB-INF/jetty-web.xml in the it WEB-INF directory.
Then Cipango just need to be started with java -Djetty.host=localhost -jar start.jar --ini=start-cipango.ini etc/cipango-websocket.xml

Note

The host name of the HTTP connector used by the SIP websocket connector MUST be set

System properties

In addition to system properties defined by Jetty, Cipango may use the following properties:

...