简体   繁体   English

如何测试Java SIP客户端?

[英]how do I test a Java SIP client?

SIP programming looks much simpler than I originally thought: SIP编程看起来比我最初想象的要简单得多:

http://www.javaworld.com/article/2071781/java-web-development/sip-programming-for-the-java-developer.html 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 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? 我将对按照Java World示例进行开发有兴趣,但是您如何测试呢? I would like to test it against a hosted Asterisk PBX, but that seems expensive. 我想针对托管的Asterisk PBX进行测试,但这似乎很昂贵。

The only other option I can think of would be to deploy Asterisk, but that doesn't sound like much fun. 我唯一想到的其他选择是部署Asterisk,但这听起来并不那么有趣。

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. 虽然我知道Asterisk Manager接口已经或将会有一个Java API,但我只对普通SIP感兴趣。

how do I test a Java SIP client? 如何测试Java SIP客户端?

  • If you have a SIP server in place then you try to register your client to the server by sending a SIP REGISTER message. 如果有SIP服务器,则尝试通过发送SIP REGISTER消息将客户端注册到服务器。
  • If you don't have a SIP server in place, then use SIPServlet to create a basic server with at least a doRegister implementation. 如果没有适当的SIP服务器,请使用SIPServlet创建至少具有doRegister实现的基本服务器。 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. 然后使用SIPServelt编写基本服务器。 You can use any SIP client(SIP soft phone) downloaded from internet to test your server. 您可以使用从Internet下载的任何SIP客户端(SIP软电话)来测试服务器。

Your questions is not very clear, hence I have provided the answer for different situations. 您的问题不是很清楚,因此我提供了针对不同情况的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM