gpt4 book ai didi

android - 在听者摘机前结束通话

转载 作者:行者123 更新时间:2023-11-30 02:53:53 24 4
gpt4 key购买 nike

我已经为 Android 制作了自己的 SIP 客户端。我遇到了一个问题。我在SipDroid上做过测试:如果我调用某人,在他未挂机前挂断,双方通话结束。对于我的客户,当我挂断电话时,接收方的通话并未结束,从而导致一侧的通信。

这是我结束通话的代码:

if (call != null)
{
Log.i(TAG, "Trying to end call");

try
{
call.endCall();
}
catch (SipException e)
{
Log.i(TAG, "Service failed to end the call", e);
}

call.close();

updateStatus("Call Ended");
}

其中 call 是 SipAudioCall。我接到这样的电话: call = manager.makeAudioCall(profile.getUriString(), sipAddressToCall, listener, _Params.callWait);

最佳答案

我不知道你的 API,但 SIP 协议(protocol)本身有一个“取消”请求,可以在调用被应答之前“挂断”。

在正常的持续通话中,您发送“BYE”。

关于android - 在听者摘机前结束通话,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23659316/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com