Commit 86e42944 by 严久程

声网

parent 8571b087
...@@ -571,17 +571,14 @@ class AudioHomeActivity : ...@@ -571,17 +571,14 @@ class AudioHomeActivity :
writeAgoraLog("未接通挂断:60s等待倒计时结束挂断") writeAgoraLog("未接通挂断:60s等待倒计时结束挂断")
//提示切换传统线路 //提示切换传统线路
//发送消息通知专家用户已挂断 //发送消息通知专家用户已挂断
YDLRTMClient.instances.cancelCall( YDLRTMClient.instances.cancelCall(listenerUid, channelId,object :CancelCallStatusListener{
listenerUid, override fun onFailure(errorMsg: String?, errorCode: Int) {
channelId, YDLRTMClient.instances.cancelCall(listenerUid, channelId,null)
object : CancelCallStatusListener { }
override fun onFailure(errorMsg: String?, errorCode: Int) {
YDLRTMClient.instances.cancelCall(listenerUid, channelId, null) override fun onSuccess() {
} }
})
override fun onSuccess() {
}
})
//通话结束或挂断时,上传日志文件 //通话结束或挂断时,上传日志文件
uploadLog() uploadLog()
...@@ -631,29 +628,21 @@ class AudioHomeActivity : ...@@ -631,29 +628,21 @@ class AudioHomeActivity :
*/ */
private fun userCloseCalling() { private fun userCloseCalling() {
writeAgoraLog("未接听时:主叫主动挂断,取消呼叫") writeAgoraLog("未接听时:主叫主动挂断,取消呼叫")
//通话结束或挂断时,上传日志文件
uploadLog()
handler!!.postDelayed({
leaveChannel()
}, 100)
//发送消息通知专家用户已挂断 //发送消息通知专家用户已挂断
YDLRTMClient.instances.cancelCall(listenerUid, channelId,object :CancelCallStatusListener{
override fun onFailure(errorMsg: String?, errorCode: Int) {
writeAgoraLog("未接听时:主叫主动挂断失败,msg=$errorMsg($errorCode),再次挂断")
YDLRTMClient.instances.cancelCall(listenerUid, channelId,null)
}
override fun onSuccess() {
}
})
//通话结束或挂断时,上传日志文件 //通话结束或挂断时,上传日志文件
uploadLog() uploadLog()
handler!!.postDelayed({ handler!!.postDelayed({
YDLRTMClient.instances.cancelCall( leaveChannel()
listenerUid, }, 100)
channelId,
object : CancelCallStatusListener {
override fun onFailure(errorMsg: String?, errorCode: Int) {
writeAgoraLog("未接听时:主叫主动挂断失败,msg=$errorMsg($errorCode),再次挂断")
YDLRTMClient.instances.cancelCall(listenerUid, channelId, null)
}
override fun onSuccess() {
}
})
}, 500)
} }
/** /**
...@@ -739,21 +728,15 @@ class AudioHomeActivity : ...@@ -739,21 +728,15 @@ class AudioHomeActivity :
//未连接成功,切换axb时:需发送消息通知专家端用户已挂断 //未连接成功,切换axb时:需发送消息通知专家端用户已挂断
//发送消息通知专家用户已挂断 //发送消息通知专家用户已挂断
//发送消息通知专家用户已挂断 //发送消息通知专家用户已挂断
leaveChannel() YDLRTMClient.instances.cancelCall(listenerUid, channelId,object :CancelCallStatusListener{
handler!!.postDelayed({ override fun onFailure(errorMsg: String?, errorCode: Int) {
YDLRTMClient.instances.cancelCall( YDLRTMClient.instances.cancelCall(listenerUid, channelId,null)
listenerUid, }
channelId,
object : CancelCallStatusListener {
override fun onFailure(errorMsg: String?, errorCode: Int) {
writeAgoraLog("未接听时:主叫主动挂断失败,msg=$errorMsg($errorCode),再次挂断")
YDLRTMClient.instances.cancelCall(listenerUid, channelId, null)
}
override fun onSuccess() { override fun onSuccess() {
} }
}) })
}, 200) leaveChannel()
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment