15
votes

I want to implement the SIP protocol in java and would want to be able to create different clients (5 or more) and make them connect to a proxy server. This is all for testing purposes so I would like to be able to see well what's happening on a rather low level.
The clients should first be able to communicate trough text and later on maybe also by audio. (If I ever get that far)

I already read a bit about the JAIN libraries and what I understood from that is that they are not really well suited for the server side? I also didn't really find any proxy server examples, tutorials, using JAIN.
I also found this SIP Servlet Tutorial book, I used HTTP servlets in the past but should I prefer servlets or JAIN or ...?

I'm quite new to SIP so I don't really know where to start or what to choose in combination with java.

2

2 Answers

13
votes

If the intention is to incorporate your SIP stack into a production application then my advice to you would be to do everything you can to avoid writing your own from scratch. It's not an exaggeration to say it will take you over years to get your stack working smoothly with all the different SIP devices and servers out there. If you have a very narrow set of integration requirements then maybe you could do it quicker but it would still be a big undertaking.

Here's a good list of available SIP stacks. If on the other hand you do decide to implement your own start by looking over the SIP RFC list. RFC 3261 is the core protocol specification but it's been updated by a number of other RFC's so you'll need to implement a minimum of half a dozen just for the core SIP functionality. After that if you want to support things like transfers, presence, message waiting etc. then that's even more RFCs to implement. Here's that list of SIP stacks again.

6
votes

A Sip Servlets platform will help you build Converged applications, that is HTTP and SIP applications. A Sip end user device would interact with a Sip Servlet application. A Sip Servlet application could be a B2BUA or a SIP Proxy for example.

I would suggest you to try Mobicents Sip Servlet which is a complete Sip Servlet platform on top of Java Servlets, certified to the JSR289 spec and using Jain Sip for SIP Stack.

There is an active community around the project and you will find useful examples to get started.

By choosing a platform to get started you are able to concentrate on the business logic and you don't have to mess with the details of