SIP Servlet 1.1 specifies the Application Router component. The Application Router is responsible for selecting the SIP Servlet applications that will process an initial request.
In other words, it determines how applications are composed. The servlet applications themselves do not have any knowledge of the Application Router, so they can be developed independently, and then composed together at deployment time, by configuring the Application Router for a particular scenario.
The Application Router is, by design, a separate component to the SIP Servlet container. This means that users are free to use third-party Application Routers, or write their own. An Application Router may use any criteria for selecting applications, such as source or destination addresses, SIP header fields, time of day, database lookup, and so on.
All SIP Servlet 1.1 containers must provide a Default Application Router, which is specified in SIP Servlet 1.1 Appendix C. Rhino SIP Servlet includes a Default Application Router, and users may also deploy their own.
Default application router
The default application router (DAR) supplied with Rhino SIP Servlet implements the behaviour specified in SIP Servlet 1.1 Appendix C. It is configured using the properties file format described in the appendix. Configuration files are installed in the DAR using Rhino SIP Servlet’s console or Ant commands.
A DAR configuration file is a properties file, where each line begins with a SIP request method (such as INVITE, REGISTER), followed by a list of applications that will process that type of request. For example:
REGISTER: ("Registrar", "DAR:From", "ORIGINATING", "", "NO_ROUTE", "0"), ("Presence", "DAR:From", "ORIGINATING", "", "NO_ROUTE", "1") INVITE: ("CallBarring", "DAR:From", "ORIGINATING", "", "NO_ROUTE", "0"), ("LocationServiceProxy", "DAR:From", "ORIGINATING", "", "NO_ROUTE", "1")
This says that REGISTER requests will be processed by the "Registrar" application, then the "Presence" application. INVITE requests will trigger the "CallBarring" application, then the LocationServiceProxy" application. (The other arguments are described in SIP Servlet 1.1 Appendix C.)
The installed DAR configuration is used for all initial requests; there is no support for conditional or per-user rules.
Custom application routers
A custom application router can be used if more advanced application composition logic is required, such as subscriber lookup, or inspecting SIP header fields. See the Installation and Administration Guide for information on installing custom Application Routers.