...
The most straightforward way to start Cipango is to go to your Cipango installation directory and type:
No Formatcode |
---|
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:
No Formatcode |
---|
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:
No Formatcode |
---|
java -DSTOP.PORT=8079 -DSTOP.KEY=secret -jar start.jar --stop |
...
- set in
${jetty.home}/etc/jetty.conf
(The lineNo Formatcode --ini=start-cipango.ini
--pre=etc/jetty-logging.xml
must be removed) - go to
${jetty.home
} and type:No Formatcode ./bin/jetty.sh start
This script allows also the commands stop, run, restart, check and supervise.
...
/etc/default/jetty
$HOME/.jettyrc
If it existsthey exist, these files are read at the start of script startup. It may perform any sequence of shell commands, like setting relevant environment variables
Code Block | ||
---|---|---|
| ||
# 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
| |||||||
JAVA_HOME | Home of your Java installation | |||||||
JAVA | Command to invoke Java. If not set, | |||||||
JAVA_OPTIONS | Extra options to pass to the JVM | |||||||
JETTY_CONSOLE | Where Jetty console output should go. Defaults to first writeable of
| |||||||
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 | |||||||
JETTY_RUN | Where the jetty.pid file should be stored. It defaults to the first available of | |||||||
JETTY_PID | The jetty PID file, defaults to | |||||||
JETTY_ARGS | The default arguments to pass to Jetty. |
...
Code Block |
---|
java -Dorg.cipango.dar.routeOutgoingRequests=false -jar start.jar etc/cipango.xml
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<Set name="applicationRouter"> <New class="org.cipango.ardar.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 customSipApplicationRouterProvider
- or define the application router in
${jetty.home}/etc/cipango.xml
, for instanceCode Block xml xml <Set name="applicationRouter"> <New class="com.acme.MyApplicationRouter"> </New> </Set>
JNDI
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:
No Format |
---|
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
TLS
To add TLS support, Cipango should be started with cipango-tls.xml
configuration file:
No Format |
---|
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 | description | |||||
---|---|---|---|---|---|---|---|
SIP |
|
| |||||
sip.host | 127.0.0.1 | host on which SIP connector is listening | |||||
sip.port | 5060 | port on which SIP connector is listening | |||||
sip.mtu | 65536 | MTU (Maximum Transmission Unit) used to define if the request is sent on UDP or TCP. (See RFC 3261 §18.1.1) | |||||
|
| ||||||
javax.servlet.sip.ar.dar.configuration |
| URI to the default application router configuration file. | |||||
javax.servlet.sip.ar.spi.SipApplicationRouterProvider | null | Class name of the | |||||
org.cipango.dar.routeOutgoingRequests | true | if set to | |||||
|
| ||||||
snmp.host | 0.0.0.0 | host on which SNMP connector is listening | |||||
snmp.port | 161 | port on which SNMP connector is listening | |||||
snmp.trap.host | localhost | host on which SNMP traps are sent | |||||
snmp.trap.port | 162 | port on which SNMP traps are sent | |||||
|
| ||||||
diameter.host | 0.0.0.0 | host on which Diameter connector is listening | |||||
diameter.port | 3868 | port on which Diameter connector is listening |
For instance to set the SIP port to 5070, use:
No Format |
---|
java -Dsip.port=5070 -jar start.jar --ini=start-cipango.ini
|
Info |
---|
Some properties like the port can be set in /etc/default/cipango. For more information, see Running Cipango |