Versions Compared

Key

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

...

Note

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. javax.servlet.sip.ar.dar.configuration system property specifying the path to the configuration file
  2. if not set the default value ${jetty.home}/etc/dar.properties 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.

Code Block
titleSample dar.properties

# 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:

Code Block

java -Dorg.cipango.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:

Code Block
xml
xml
titlecipango.xml

 <Set name="applicationRouter">
    <New class="org.cipango.ar.DefaultApplicationRouter">
      <Set name="configuration"><SystemProperty default="." name="jetty.home"/>/etc/dar.properties</Set>
      <Set name="routeOutgoingRequests">false</Set>
    </New>
 </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 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>