I want to know if it's possible to implement the SIP stack outside the servlet container and interact between them with an interface. I want to have SIP transactions and dialogs for the first part and can host the servlet inside the servlet container like Tomcat.
Whenever a SIP request comes, the first part receives it, parses it, SIP transaction and dialog will be created, the servlet and application which should be invoked is chosen and the the message is sent to the servlet container through an interface. Then the servlet that is hosted in the servlet container is invoked and creates a response. Then the response goes back to the first part and will be sent to the destination.
Any idea how to accomplish this stack?