This documentation relates to an earlier version of Cipango.
visit the current release documentation home.

Configuring 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
  3. if the file is not found or is empty, the first deployed application in alphabetical order always matches

DAR configuration file

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

Sample 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.

Extension

The proprietary system property org.cipango.dar.matchOnNewOutgoingRequests has been added.
If an application servlet creates a new initial request in UAC mode, then the DAR matches on the request only if the property is set to "true" or not 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
     <Set name="applicationRouter">
        <New class="org.cipango.ar.DefaultApplicationRouter">
          <Set name="configuration"><SystemProperty default="." name="jetty.home"/>/etc/dar.properties</Set>
        </New>
     </Set>