Question

I am asking to create an SIP client, but I am totally lost ... After some researches I found the Jain SIP API in java, and I think that I will use it. However I don't really know what classes I should use and what interfaces I should implement or not.

I have read this article : http://www.oracle.com/technetwork/articles/entarch/introduction-jain-sip-090386.html

And this : http://hudson.jboss.org/hudson/job/jain-sip/lastSuccessfulBuild/artifact/javadoc/javax/sip/package-summary.html#package_description

But I don't understand which part should I implement for an SIP client ? The SipListener OR the SipStack and the SipProvider ?

Thanks.

Was it helpful?

Solution

You need to implement both of those classes.

The SipProvider class will connect to your endpoint (Aterisk, for example). Note that this class must be on an static context, because only one connection is allowed per client.

You cant create a SipProvider instance calling a SipStack class, on sipStack.createSipProvider(listeningPoint). After this, you be able to create transactions and send requests to you endpoint.

The SipListener is the class that will process all responses from your server. This means that every request that you send to the server (Via SipProvider) will receive a response on SipListener. So, you must have this listener to process all data returned by your endpoint.

Try to implement the code that was described on oracle article that you cite. I started to develop based on this article, and works very fine!

OTHER TIPS

Check the examples at the Reference Implementation https://java.net/projects/jsip/sources/svn/show/trunk/src/examples?rev=2279 to help you moving forward faster

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top