简体   繁体   English

使用Java发送SIP请求

[英]Sending a SIP request using Java

I need to create an app which sends SIP requests to an existing sip server. 我需要创建一个将SIP请求发送到现有sip服务器的应用程序。 I need for now to only be able to send a registration request to the server. 我现在只需要能够向服务器发送注册请求。

I tried reading about it and found an example here: 我尝试阅读有关内容,并在此处找到一个示例:

http://alex.bikfalvi.com/teaching/upf/2013/architecture_and_signaling/lab/sip/ http://alex.bikfalvi.com/teaching/upf/2013/architecture_and_signaling/lab/sip/

however, almost all examples over the internet use this JAIN Sip API. 但是,互联网上几乎所有示例都使用此JAIN Sip API。 Isn't there also a sip package that comes with Java without installing additional things besides the Java SDK that will enable me to simply send a SIP request? 除了Java SDK之外,Java附带的sip软件包是否没有安装其他东西就使我能够简单地发送SIP请求? When I try to import javax.sip, I get an error saying the import cannot be resolved. 当我尝试导入javax.sip时,出现错误,提示无法解决导入。

No SIP is not including in the JDK. JDK中不包括SIP。 I would recommend going higher level and use the SIP Servlets Specification and use an open source container https://github.com/Mobicents/sip-servlets . 我建议更高级别使用SIP Servlet规范,并使用开源容器https://github.com/Mobicents/sip-servlets There is an example of what you want to achive here https://github.com/Mobicents/sip-servlets/tree/master/sip-servlets-examples/uac-register 这里有一个您想要实现的示例https://github.com/Mobicents/sip-servlets/tree/master/sip-servlets-examples/uac-register

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

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