Commit e3cfc5ef by 万齐军

上报处理与call fail处理

parent 6b85513f
...@@ -341,7 +341,7 @@ class AudioHomeActivity : ...@@ -341,7 +341,7 @@ class AudioHomeActivity :
} }
Apm.reportEvent("agora_android", "occur_error", "$err") Apm.reportEvent("agora_android", "occur_error", "$err")
AudioApiRequestUtil.reportCallEvent(channelId, RtcEvent(RtcEvent.Event.errorOccurred), errorCode = err) AudioApiRequestUtil.reportCallEvent(channelId, RtcEvent(RtcEvent.Event.errorOccurred), errorCode = err)
channelId?.let { YDLavManager.instances.callEndStatusUpdate(it, 60, "频道错误回调$err") } // channelId?.let { YDLavManager.instances.callEndStatusUpdate(it, 60, "频道错误回调$err") }
} }
override fun onApiCallExecuted(error: Int, api: String?, result: String?) { override fun onApiCallExecuted(error: Int, api: String?, result: String?) {
......
...@@ -184,20 +184,6 @@ class YDLavManager { ...@@ -184,20 +184,6 @@ class YDLavManager {
) )
onConfideEvent(dimension, response?.ChannelId) onConfideEvent(dimension, response?.ChannelId)
val act = ActivityManager.getInstance().getTopTaskActivity() val act = ActivityManager.getInstance().getTopTaskActivity()
//专家离线或者30 秒后仍未收到专家响应,重新再邀请一次
when (errorCode) {
//被叫不在线 呼叫邀请发出 30 秒后被叫仍未 ACK 响应呼叫邀请
RtmStatusCode.LocalInvitationError.LOCAL_INVITATION_ERR_PEER_OFFLINE, RtmStatusCode.LocalInvitationError.LOCAL_INVITATION_ERR_PEER_NO_RESPONSE -> {
if (act is AudioHomeActivity) {
act.runOnUiThread {
act.rtcCall()
}
}
}
RtmStatusCode.LocalInvitationError.LOCAL_INVITATION_ERR_INVITATION_EXPIRE -> {
//呼叫邀请过期。被叫 ACK 响应呼叫邀请后 60 秒呼叫邀请未被取消、接受、拒绝,则呼叫邀请过期。
}
}
//呼叫失败日志输出 //呼叫失败日志输出
if (act is AudioHomeActivity) { if (act is AudioHomeActivity) {
act.runOnUiThread { act.runOnUiThread {
......
...@@ -395,9 +395,11 @@ class ConsultantAudioHomeActivity : ...@@ -395,9 +395,11 @@ class ConsultantAudioHomeActivity :
//110:生成的 Token 无效 //110:生成的 Token 无效
//123:此用户被服务器禁止 //123:此用户被服务器禁止
runOnUiThread { runOnUiThread {
var report = false
when (err) { when (err) {
3, 7, 109, 110 -> { 3, 7, 109, 110 -> {
showToast("请退出应用,重新打开") showToast("请退出应用,重新打开")
report = true
close(RESULT_NOT_ANSWERED_CODE, "咨询师已挂断") close(RESULT_NOT_ANSWERED_CODE, "咨询师已挂断")
callEventSave( callEventSave(
"80", "80",
...@@ -408,17 +410,20 @@ class ConsultantAudioHomeActivity : ...@@ -408,17 +410,20 @@ class ConsultantAudioHomeActivity :
10 -> { 10 -> {
callEventSave("80", "err:${err} 专家网络较差") callEventSave("80", "err:${err} 专家网络较差")
showToast("当前网络较差,请更换网络") showToast("当前网络较差,请更换网络")
report = true
close(RESULT_NOT_ANSWERED_CODE, "专家网络较差") close(RESULT_NOT_ANSWERED_CODE, "专家网络较差")
} }
101 -> { 101 -> {
callEventSave("80", "err:${err} 不是有效的 APP ID") callEventSave("80", "err:${err} 不是有效的 APP ID")
showToast("安装包有问题,请联系技术") showToast("安装包有问题,请联系技术")
report = true
close(RESULT_NOT_ANSWERED_CODE, "安装包有问题,请联系技术") close(RESULT_NOT_ANSWERED_CODE, "安装包有问题,请联系技术")
} }
102 -> { 102 -> {
callEventSave("80", "err:${err} 不是有效的 频道名") callEventSave("80", "err:${err} 不是有效的 频道名")
showToast("频道错误,请联系技术") showToast("频道错误,请联系技术")
report = true
close(RESULT_NOT_ANSWERED_CODE, "频道错误,请联系技术") close(RESULT_NOT_ANSWERED_CODE, "频道错误,请联系技术")
} }
123 -> { 123 -> {
...@@ -433,11 +438,13 @@ class ConsultantAudioHomeActivity : ...@@ -433,11 +438,13 @@ class ConsultantAudioHomeActivity :
if (err == 0 || err == 18) { if (err == 0 || err == 18) {
return@runOnUiThread return@runOnUiThread
} }
YDLavManager.instances.callEndStatusUpdate( if (report) {
mAudioMessageBean?.channelId!!, YDLavManager.instances.callEndStatusUpdate(
60, mAudioMessageBean?.channelId!!,
"频道错误回调${err} " 60,
) "频道错误回调${err} "
)
}
} }
} }
......
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