3

How to use a SipServlet with Spring such as the available on http://www.javaworld.com/article/2071781/java-web-development/sip-programming-for-the-java-developer.html?page=2 ?

I'm using Spring MVC to map HTTP requests so for any given function I can use the annotation @RequestMapping. Is there any way to map the requests like spring MVC?

To summarize: From where can I start to implement a SIP endpoint in my current Spring project that already serves as a HTTP endpoint?

SkyWalker
  • 28,384
  • 14
  • 74
  • 132
andrepcg
  • 1,301
  • 7
  • 26
  • 45

1 Answers1

2

You can't use Spring MVC for your SIP handling code. Spring's DispatcherServlet extends HTTPServlet, and does not handle SIP calls. You will have to implement SIPServlet's methods yourself and register the servlet properly with the app, either with sip.xml or SIP annotations. You still can utilize Spring Framework in your service layer.

jny
  • 8,007
  • 3
  • 37
  • 56
  • I'm setup a SipServlet but it's not starting. I've tried with sip.xml and with annotations and the init function is not running. Is there any example SipServlet integration with Spring that I can follow? – andrepcg Mar 08 '16 at 12:11