Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sip Servlets - Control Not Passed to Next Servlet in Chain  RSS feed

 
Ron McLeod
Saloon Keeper
Posts: 1600
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with Mobicents Sip Servlets 3.0.0-SNAPSHOT. I have two servlets configured in the DAR; one to check to see if a third party registration is being attempted, and a second to perform the actual registration. I am finding that when the REGISTER arrives, it is passed to the first servlet (BlockerApp); but when that servlet completes and proxies to the next, that the second servlet (RegApp) is not called. Instead, the first servlet is called again, with the routing directive set to NEW.

Anyone that has worked with Sip Servlets that might be able to help with this?
Thanks - Ron

I have also posted this on Google Groups - Mobicents-Public

DAR configuration:

First Servlet:

Second Servlet:

Log:
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've no idea about Sip Servlets, but wouldn't this following piece of code just proxy back to the original request URI:



Perhaps you need to do:



or some such thing where you tell it the URI to redirect to.

Like I said, I have absolutely no idea about Sip servlets or its proxies, so I might be completely wrong.
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ignore my previous reply. Looking at that code again, that if block appears to be handling a specific case where touser == fromuser and isn't relevant for this specific case.

I guess, you have some configuration file(s) where you specify the servlet chain ordering? What does it look like?
 
Ron McLeod
Saloon Keeper
Posts: 1600
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Sip Servlets container has a Default Application Router (DAR) which manages the servlet chaining. My configuration for the REGISTER method is:

REGISTER=("RegApp","DAR\:From","ORIGINATING","","NO_ROUTE","1"),("BlockerApp","DAR\:From","ORIGINATING","","NO_ROUTE","0")

First app: ("BlockerApp","DAR\:From","ORIGINATING","","NO_ROUTE","0")
Second app: ("RegApp","DAR\:From","ORIGINATING","","NO_ROUTE","1")

The DAR does select the first app as expected (since this is the first time it is process the REGISTER message), but when the container asks it to select the next app, it behaves as if the REGISTER has not been seen before, and selects the first app again.

I've read the specs, gone-over several examples, read the only SipSerlvets book that I can find, but still can't get it to work. This is such a fundamental capability, I can't beleive that there is an issue with container or the DAR implementation that I am using.

Ron
 
Ron McLeod
Saloon Keeper
Posts: 1600
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I now understand why is was not working for me. SIP Servlet chaining using the DAR only works with methods which have dialogs usch as INVITE, SUBSCRIBE, NOTIFY, etc. I have tried using DAR with a multi-servlet application handling an INVITE, and it works as expected.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!