困惑于使用什么常量
我只是希望我的 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该文档表示,在会话建立后立即调用
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 thecall
object should be in isIN_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 forINCOMING_CALL_ANSWERING
.Cheers