简体   繁体   English

如何阅读SIP服务器响应

[英]How can I read SIP server response

I am using Jain SIP to send a register request to a server using SipProvider.sendRequest(request) . 我正在使用Jain SIP使用SipProvider.sendRequest(request)将注册请求发送到服务器。

How can I listen for the 200 OK response from the server? 如何收听服务器发出的200 OK响应?

You can use the netcat command and listen on the port (and ip-address) where the client is listening. 您可以使用netcat命令并在客户端正在侦听的端口(和ip地址)上侦听。 Syntax 句法

nc -l nc -l

You must create a listener and then add the litener to the sip provider 您必须创建一个侦听器,然后将Liteener添加到Sip提供程序

sipProvider.addSipListener(listener);

Here is a full example https://svn.java.net/svn/jsip~svn/trunk/src/examples/simplecallsetup/Shootist.java 这是一个完整的示例https://svn.java.net/svn/jsip~svn/trunk/src/examples/simplecallsetup/Shootist.java

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

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