Child pages
  • Configuring and Running Cipango

This documentation relates to last stable version of Cipango.
visit the last unstable documentation home.

Skip to end of metadata
Go to start of metadata

Running Cipango

Cipango may be started and stopped as follows:

Command Line

The most straightforward way to start Cipango is to go to your Cipango installation directory and type:

java -jar start.jar --ini=start-cipango.ini

To stop, simply use Ctrl-C in the same terminal. You may also start Cipango so that it listens on a local port for stop commands:

java -DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar --ini=start-cipango.ini

The server can then be stopped using a different terminal window on the same machine:

java -DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar --stop

If you omit the stop port or key, they are displayed on the standard output so that you may know their values.

Unix daemon

To start Cipango under *nix system,

  1. set in ${jetty.home}/etc/jetty.conf
    (The line --pre=etc/jetty-logging.xml must be removed)
  2. go to ${jetty.home} and type:
    ./bin/ start

This script allows also the commands stop, run, restart, check and supervise.

shell commands lookup for

  • /etc/default/jetty
  • $HOME/.jettyrc

If they exist, these files are read at script startup. It may perform any sequence of shell commands, like setting relevant environment variables

Sample .jettyrc file
# Where Cipango is installed


# Set max heap sise to 512MB and initial size to 256MB
JAVA_OPTIONS=="-Xmx512M -Xms256M -XX:+UseParNewGC -XX:+UseConcMarkSweepGC"

# Override the default SIP host

#Override the default SIP port

#Override the default HTTP port

if [ ! -z "$SIP_PORT" ]

if [ ! -z "$SIP_HOST" ]

Environnement properties




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.:
    <Arg><SystemProperty name="jetty.home" default="."/>/sipapps</Arg>


Home of your Java installation


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


Extra options to pass to the JVM


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

  • /dev/console
  • /dev/tty


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.


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


The jetty PID file, defaults to $JETTY_RUN/


The default arguments to pass to Jetty.


It also search for jetty.conf in

  1. /etc/jetty.conf
  2. ${jetty.home}/etc/jetty.conf

This file will be used as this script's configuration.
Each line in the file may contain:

  • A comment denoted by the pound (#) sign as first non-blank character.
  • The path to a regular file, which will be passed to Cipango as a config.xml file.
  • The path to a directory. Each *.xml file in the directory will be passed to Cipango as a config.xml file.

If more than one argument is passed to the script ( start etc/cipango.xml), jetty.conf is not read

Absolute path must be used if Cipango is not started from ${jetty.home}/bin

Configuring Cipango

Application Router

Default Application Router

The Default application Router (DAR) looks for its configuration file in the following order:

  1. system property specifying the path to the configuration file
  2. if not set the default value ${jetty.home}/etc/ is used

If the configuration file is not found or is empty, the Default Application Router always selects the first deployed application in alphabetic order.

DAR configuration file

The DAR configuration file format is defined in SIP Servlets 1.1 specification in annex C.1.

# Default Application router configuration
# Properties file in which the name of the property is the SIP method and the value is a simple comma separated stringified value for the SipApplicationRouterInfo object
# Example:
INVITE: ("OriginatingCallWaiting", "DAR:From", "ORIGINATING", " ", "NO_ROUTE", "0"), ("CallForwarding", "DAR:To", "TERMINATING", " ", "NO_ROUTE", "1")

In this example, the DAR is setup to invoke two applications on INVITE request, the first in the originating part and the second in the terminating half. The applications are identified by their names as defined in the application deployment descriptors. The subscriber identity returned in this case is the URI from the From and To header respectively for the two applications. The DAR does not return any route to the container and maintains the invocation state in the stateInfo as the index of the latest application in the list.

Routing Outgoing Requests

As defined in JSR289, the Application Router is invoked to route both incoming and outgoing requests. Since it may be useful not to use the Application Router on outgoing requests, it is possible to configure the Default Application Router to prevent it from processing outgoing requests.
To do so, you can set the System property org.cipango.dar.routeOutgoingRequests to false, for instance:

java -Dorg.cipango.dar.routeOutgoingRequests=false -jar start.jar etc/cipango.xml

Alternatively, you can use the setRouteOutgoingRequests on the Default Application Router in the cipango.xml configuration file, as shown below:

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

Custom application router

To add a custom application router, drop the jar file containing your application router in the directory ${jetty.home}/lib/ext.

To make Cipango load your custom application router, you can either:

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


JNDI is not enabled by default in Cipango.

To add JNDI and SIP Servlet annotation support, Cipango should be started with cipango-plus.xml configuration file:

java -jar start.jar --ini=start-cipango.ini etc/cipango-plus.xml

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

SIP Connectors


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

java -jar start.jar --ini=start-cipango.ini etc/cipango-tls.xml

To manage the keys, see Jetty SSL plugin

System properties

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

Property name

default value



host on which SIP connector is listening



port on which SIP connector is listening



MTU (Maximum Transmission Unit) used to define if the request is sent on UDP or TCP. (See RFC 3261 §18.1.1)

Application Router


URI to the default application router configuration file.


Class name of the SipApplicationRouterProvider.



if set to false, the Cipango DAR will not match on a new outgoing request created by Cipango


host on which SNMP connector is listening



port on which SNMP connector is listening


host on which SNMP traps are sent



port on which SNMP traps are sent


host on which Diameter connector is listening



port on which Diameter connector is listening

For instance to set the SIP port to 5070, use:

java -Dsip.port=5070 -jar start.jar  --ini=start-cipango.ini

Some properties like the port can be set in /etc/default/cipango. For more information, see Running Cipango

  • No labels