Jain-sip 自动发送 sip 消息
我编写了一个可以与 PBX 通信的软件电话(由 SIPp 模拟)。为此,我使用 java 的 jain-sip 框架。我的问题是,jain-sip 自动发送 sip 消息。例如,在收到 RE-INVITE 消息后,我的程序会发回 OK 消息,但 jain-sip 会自动发回 TRYING 消息。为什么???
Jain-sip 还会自动发送一些 OK 消息。请参阅下面的呼叫流程(PBX 正在向我的软件电话应用程序发送 INVITE 消息):
- INVITE -->
- <-- 尝试
- <-- 振铃
- <-- OK/SDP(端口号 2000)
- ACK -->
在端口 2000 上发送 RTP
RE-INVITE -->
- <-- 尝试
- <-- OK/SDP(端口号 2002)
- ACK -->
- 在端口 2002 上发送 RTP
- <-- OK/SDP(端口号 2000)// jain-sip 自动发送此消息!!!
- ACK -->
- 在端口 2000 上发送 RTP // 现在 rtp 数据发送到错误的端口
- <-- OK/SDP(端口号 2000)// 再次 jain -sip自动发送ok消息
- ACK -->
- 在端口 2000 上发送 RTP // rtp 数据发送到错误的端口
- BYE -->
- <-- OK
为什么 jain-sip 会自动发送消息?我是否做错了什么,或者是否可以禁用 sip 消息的自动发送?
I have written a softphone which can communicate with a PBX (simulated by SIPp). For this I use the jain-sip frameworkt for java. My problem is, that jain-sip sends sip messages automatically. For example, after receiving a RE-INVITE message my program sends an OK message back, but jain-sip sends automatically a TRYING message back. Why???
Jain-sip sends also some OK messages automatically. See call flow below (the PBX is sending the INVITE message to my softphone app):
- INVITE -->
- <-- TRYING
- <-- RINGING
- <-- OK/SDP (port number 2000)
- ACK -->
Sending RTP on port 2000
RE-INVITE -->
- <-- TRYING
- <-- OK/SDP (port number 2002)
- ACK -->
- Sending RTP on port 2002
- <-- OK/SDP (port number 2000) // jain-sip sends this message automatically!!!
- ACK -->
- Sending RTP on port 2000 // now the rtp data go to the wrong port
- <-- OK/SDP (port number 2000) // and again jain-sip sends an ok message automatically
- ACK -->
- Sending RTP on port 2000 // rtp data go to the wrong port
- BYE -->
- <-- OK
Why does jain-sip send messages automatically? Have I done something wrong, or is it possible to disable the automatic sending of sip messages?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现可以通过将参数“javax.sip.AUTOMATIC_DIALOG_SUPPORT”设置为“off”来停止自动发送消息。我也知道,为什么 jain-sip 有时会自动发送 TRYING 消息。当我的软件电话应用程序需要太长时间才能将 OK 消息发送回 PBX 时,就会发生这种情况。我仍然不明白的是我在上面的呼叫流程中描述的 OK 消息的自动发送。也许有人知道?
I found out that I can stop the automatic sending of the messages by setting the parameter "javax.sip.AUTOMATIC_DIALOG_SUPPORT" to "off". I also know, why jain-sip sometimes sends a TRYING message automatically. This happens when my softphone app needs too long for sending the OK message back to the PBX. What I still don´t understand is the automatic sending of the OK messages I described in the call flow above. Perhaps someone knows?
对于 200 OK,我不确定,但 JAIN SIP 和 JAIN SIP 似乎无法理解远程方发送的 ACK。它将重新传输为第一个 INVITE 生成的 OK。
您可以通过查看 via 标头中的交易 ID 来进行检查。
否则,您可以检查 JAIN-SIP 堆栈的日志。
For 200 OK I am not sure but it seems that ACK send by remote party is not understand by JAIN SIP & it will retransmit OK which is generated for first INVITE.
You can check by looking to transaction ID in via header.
Otherwise you can check with logs of JAIN-SIP stack.