Product SiteDocumentation Site

2.3.2. Application Routing and Service Configuration

The application router is called by the container—whether JBoss or Tomcat—to select a SIP Servlet application to service an initial request. It embodies the logic used to choose which applications to invoke. An application router is required for a container to function, but it is a separate logical entity from the container. The application router is solely responsible for application selection and must not implement application logic. For example, the application router cannot modify a request or send a response.
For more information about the application router, refer to the following sections of the JSR 289 specification: Application Router Packaging and Deployment, Application Selection Process, and Appendix C.
In order to configure the application router, you should edit the Service element in the container's server.xml configuration file:
  1 <Service
    	name="Sip-Servlets"
    	className="org.mobicents.servlet.sip.startup.SipStandardService"
    	sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl"
  5 	darConfigurationFileLocation="file:///home/silas/workspaces/mobicents-sip-servlets/sip-servlets-examples/reinvite-demo/reinvite-dar.properties">
    
Example 2.1. Configuring the Service Element in the Container's server.xml

Provided here is a description of the SIP Service element's attributes:
className
This attribute specifies that the servlet container is a converged (i.e. SIP + HTTP) servlet container. This attribute can also be used to handle load-balancing and failover.
sipApplicationDispatcherClassName
This attribute specifies the class name of the org.mobicents.servlet.sip.core.SipApplicationDispatcher implementation to use. The routing algorithm and application selection process is performed in that class.
darConfigurationFileLocation
The default application router file location. This is used by the default application router to determine the application selection logic. Refer to Appendix C of the JSR 289 specification for more details.