Corporation Server User Manual

SIP Servlets in OCMS
SIP Servlets 2-19
Servlet 1 matches all requests.
All of these applications have been deployed into the SIP container, but no default
application has been specified. The SIP container then designates all of the SIP
applications that it locates as the default application. For example, when the SIP
container receives an INVITE request which does not designate which application to
invoke, the SIP container checks for default applications. However, because none of
the applications deployed to the container have been configured as default
applications, the container retrieves all of the applications. These applications are in
the following order:
Application B
Application D
Application C
Application E
Application A
The SIP container reviews the list of applications sequentially, starting with
Application B. It queries each application for a servlet that can process the incoming
request. If the application contains the appropriate servlet, then the servlet is invoked
and no other applications can be considered for this request.
Example 2–11 illustrates
the concept code for the SIP container’s application evaluation process.
Example 2–11 Evaluating SIP Applications for Incoming Requests
List allDeployedApplications = retrieve all applications that have been deployed;
for each application in allDeployedApplications do:
SipServlet servlet = application.match(incoming request);
if servlet is not null then:
servlet.processIncomingRequest(request);
return;
end if
end for
In this case, the SIP container selects Application B to serve the incoming INVITE
request. If the SIP container received a PUBLISH request, it retrieves the list again and
queries Application B (the first application). Since Application B does not match the
request, the SIP Container moves to the next application, Application D. Because this
application contains a servlet that processes this request, the SIP container selects
Application D.
Application A can never be invoked, as it is the last on the list of deployed
applications and will always be starved out by Application C, which accepts all
incoming events. Application C starves out all of the subsequent applications as well,
as its first servlet processes all REGISTER requests and its second servlet processes all
other requests.
Implementation Decisions
The following sections describe implementation options in the SIP Servlet
specification:
"Protocol Sessions"
"Extended doRequest Methods"
"Asynchronous Send"