Search code examples
javaservletssipasteriskasteriskami

how do I test a Java SIP client?


SIP programming looks much simpler than I originally thought:

http://www.javaworld.com/article/2071781/java-web-development/sip-programming-for-the-java-developer.html

and

http://docs.oracle.com/cd/E13209_01/wlcp/wlss40/javadoc/jsr289/javax/servlet/sip/SipServlet.html

I would be interested in developing something along the lines of the Java World sample, but how do you test it? I would like to test it against a hosted Asterisk PBX, but that seems expensive.

The only other option I can think of would be to deploy Asterisk, but that doesn't sound like much fun.

While I'm aware that there is, or will be, a Java API for the Asterisk Manager Interface, I'm interested in just plain-vanilla SIP.


Solution

  • how do I test a Java SIP client?

    • If you have a SIP server in place then you try to register your client to the server by sending a SIP REGISTER message.
    • If you don't have a SIP server in place, then use SIPServlet to create a basic server with at least a doRegister implementation. Once you have that, you can test a client with registration process.
    • If you don't have both a client and a server. Then write a basic server using SIPServelt. You can use any SIP client(SIP soft phone) downloaded from internet to test your server.

    Your questions is not very clear, hence I have provided the answer for different situations.