what seems to confuse you is that you think there is multiple dar
files. But actually there is only one containing all the applications
and their order
like this dar file
http://www.mobicents.org/speeddial-locationservice-dar.properties
which is the dar for speed dial and location service
(http://www.mobicents.org/speeddial_locationservice.html) which is
composed of 2 different applications each one containing a main
servlet.
So in this case the call flow is
UA1 wants to call UA2 so it starts a call and it goes through
Mobicents Sip Servlets
The Container asks the Application Router for the appplication to
invoke for the INVITE request.
The Application Router will lookup the file and check what is the
first application for the INVITE, in our case it will return
org.mobicents.servlet.sip.example.SpeedDialSipServlet (this is a
little confusing here because the name of the application ends with
SipServlet, org.mobicents.servlet.sip.example.SpeedDialApplication
would have been more correct as an application name).
The container will check in the list of the its deployed applications
if one is called
org.mobicents.servlet.sip.example.SpeedDialSipServlet.
When it has found the application it will check what is its main
servlet (in this case it would be SpeedDialSipServlet which is why I
said earlier that the application name was confusing and should have
been called org.mobicents.servlet.sip.example.SpeedDialApplication)
So now that it knows the main servlet of the application, it will inoke it.
The application will do its business logic and proxy the INVITE in this case.
So since the application proxied the INVITE (if the application would
have acted an an UAS and sent a final response the routing process
would have been stopped) the Container will call again the Application
Router to check if there is another application to call.
In our case there is another
org.mobicents.servlet.sip.example.LocationServiceSipServlet (again the
application should have been called
org.mobicents.servlet.sip.example.LocationServiceApplication to avoid
the confusion with the main servlet) so the container will look it up
and check its main servlet and will invoke it. The application do
again its business logic and proxies the INVITE.
the Container will call again the Application Router to check if
there is another application to call. In this case there is none so
the INVITE is routed outside the container to the route defined in the
request or to the request uri and will go to UA2.
Note that this selection process occurs only for initial requests and
subsequent requests and responses follow the application path that has
been built by the initial request.
hope this clarifies things a bit.
Jean
Regards
Aayush
If application A is invoked first, application B or C will be invoked.
again if application C is invoked right after application A,
application B won't be invoked. if application B is invoked however
application C might be invoked it depends of the behavior of
application B.
if application B is invoked first, it depends of its behavior, other
applications may be invoked.
So the order in which the AR returns the applications is very
important. This is why the sip servlets specification introduces the
deployer role that is the person that will be responsible for choosing
the applicaitons that will be invoked and in which order.
Jean
Although this might not be needed by everyone to have a custome AR and
this might be also a vendor specific requirement to wok with their own
PSI.
But we can still develop AR alternatives to the default current one
or make the current one more flexible if needed.
Correct me if I'm wrong but in this case the AR would just check the
userinfo portion of the SIP URI or in the telephone-subscriber portion
of the Tel URI to know to which sip servlets application to route the
request to, right ? if that is right, option 1 can be done easily.
I'm wondering if that may also mean that the Application Router needs
a way to be feed externally with the mappings between an application
and its PSI or the PSI would become the application name in this case
?
if it is the latter option 1 might be done quite easily.
On Mon, Sep 8, 2008 at 5:15 PM, aayush bhatnagar
On Fri, Sep 12, 2008 at 4:21 PM, aayush bhatnagar