困惑于使用什么常量

发布于 2024-11-07 05:42:05 字数 284 浏览 3 评论 0原文

我只是希望我的 SIP 应用程序检测其他对等方是否已接听我的拨出电话,如果是,我想编写一些代码(例如振动电话或类似的东西)。 我验证了文档,发现这个。我不知道应该使用什么常量以及将其放在哪里(通常在 onCallEstablished(SipAudioCall call) 函数中?。

谢谢您的帮助。

I just want that my SIP application detects if the other peer has answered my outgoing call, if yes, i want to make write some code(like vibrating the phone or something like this).
I verified the documentation and i find this. I don't know what constants should i use and where to put it(normally in the onCallEstablished(SipAudioCall call)function ?.

Thank you for your help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紧拥背影 2024-11-14 05:42:05

该文档表示,在会话建立后立即调用 onCallEstablished(SipAudioCall call) ,因此对等方此时已应答呼叫(并且 200OK,ACK 通过)。因此,您可以将“振动”或任何代码挂在该回调上。此外,call 对象应处于的状态是 IN_CALL
如果您不想处理呼叫建立,而只是对等方按下“应答”按钮(这不能保证呼叫将建立,因为可能会丢失 200OK 或 ACK 消息、编解码器不兼容或无法启动由于 NAT 或其他一些网络问题而导致的媒体流),那么我想您将必须覆盖 onChanged(SipAudioCall call) 并检查状态INCOMING_CALL_ANSWERING

干杯

The doc says that onCallEstablished(SipAudioCall call) is called right after the session has been established so the peer has answered the call by that time ( and 200OK, ACK went through ). So you can hang your "vibrate" or whatever code right on that callback. Also the state that the call object should be in is IN_CALL.
If you don't want to process the call establishment but rather just a peer pressing "Answer" button (that does not guarantee that the call will be established since there might be loss of 200OK or ACK message, codec incompatibility or failure to bring up media streams due to NAT or some other networking problems) then I guess you will have to override onChanged(SipAudioCall call) and check the state for INCOMING_CALL_ANSWERING.

Cheers

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文