如何通知对方通话结束了?
我正在开发一个 SIP 应用程序,但遇到一个问题:当我在对等端结束呼叫时,另一个呼叫并未结束。我该如何解决这个问题?我可以在 onCallEnded 函数中添加一些内容吗?:
public void onCallEnded(SipAudioCall call) {
updateStatus("Call ended.");
}
或者还有其他解决方案吗?
非常感谢。
I'm developping a SIP application and I'm facing a problem: When I end a call in a peer, the call is not ended in the other one. How can I solve this problem ? Can I add something to the function onCallEnded?:
public void onCallEnded(SipAudioCall call) {
updateStatus("Call ended.");
}
Or is there any other solution?
Thank you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的问题缺乏太多信息,无法得到真正的答案。您应该生成 tcpdump/wireshark 跟踪并查看 a) 是否发送了 BYE,b) 是否发送到了正确的地址(双方正常注册的 SIP 服务器),c) 另一端是否收到了 BYE,如果构建正确并且另一端不存在路由器关闭传入 SIP 端口的问题,并且 d) 如果 BYE 的 200 OK 返回到发送者。请注意,如果您在 INVITE 上使用了错误的路由选项,BYE 将尝试直接转到另一部电话,而不是 SIP 服务器。这通常不是一件好事。
Your question is lacking way too much info for a real answer. You should generate a tcpdump/wireshark trace and see a) if the BYE is sent, b) if it goes to the correct address (the SIP server you both registered with normally), c) if the other end receives the BYE, which it should if it's properly built and the other end doesn't have issues with a router closing the incoming SIP port, and d) if the 200 OK to the BYE gets back to the sender. Note that if you use the wrong routing options on the INVITE the BYE will try to go directly to the other phone, and not to the SIP server. This is usually not a good thing.