音视频问题,A拨号时,B中获取CallSession为空,

nicklee 3月前 176

你好,我拨号时能看到 PCRTCClient 类的日志,但是接收方却看不到任何该类日志,使用你们的demo时,接收的时候能看到很多的 PCRTCClient类的日志,并且看到触发了 reciveCall 函数,但我这里没有触发,可能是什么原因?接听方的 日志 下面时我拨号方的日志

拨号方的日志

最新回复 (14)
  • nicklee 3月前
    引用 2
    拨号时能看到到 PCRTClient 输出了 newSession日志,
  • x86 3月前
    引用 3
    看不出问题来。
    请附上双方 adb logcat 抓取的日志
  • nicklee 3月前
    引用 4

    流程1:启动app,然后等待另外一部手机的呼叫。另外一部呼叫了几秒后点击挂断,对应日志为 melogIncoming.txt

    流程2:启动app,然后呼叫另外一部手机。几秒后点击挂断 对于对应日志 为melogouting.txt

    感谢

    上传的附件:
  • nicklee 3月前
    引用 5
    x86 看不出问题来。 请附上双方 adb logcat 抓取的日志
    日志附上了,请看上一条我自己的回复
  • HeavyRain 3月前
    引用 6
    2个客户端之间能互相发送消息吗
  • HeavyRain 3月前
    引用 7
    来电的事件是通过消息发过来的,没有看到收消息的日志
  • nicklee 3月前
    引用 8
    HeavyRain 2个客户端之间能互相发送消息吗
    消息发送时正常的
  • nicklee 3月前
    引用 9

    下面日志的呼入方A的 流程是: A 启动APP-> B 发送IM消息给A(能正常接收)-> B发送语音电话给A,A没有触发reciveCall回调 ,avengineKT拿到的callsession为空

    上传的附件:
  • nicklee 3月前
    引用 10

    我 看你们的demo在被呼入时,都会第一个触发一个PCRTClient的日志 2024-07-17 08:43:14.132 22104-22104 PCRTCClient cn.wildfirechat.chat D onReceiveCallMessage 400 我这被呼入的时候 一行 PCRTClient 的日志都没看到,呼出的时候是能看到一堆 PCRTClient的日志的。

  • nicklee 3月前
    引用 11

    有没有可能因我消息是自定义的?也不能说是自定义吧,im的消息发送时,我通过给TextMessageContent的 content 设置个json字符的,方法发送的,收到在解析的这个json,但是音频通过直接调用的startCall函数,没设置啥呢 下面时我调用startcall的代码

        override fun call(targetId: String, callType: CallType, token: String, channelName: String) :Boolean{
            //真正的音频入口
            userCoroutineScope.launch(Dispatchers.Main){
                val isAudioOnly = callType==CallType.VOICE
                val conversation = Conversation(Conversation.ConversationType.Single, targetId)
              val session = AVEngineKit.Instance().startCall(conversation, listOf(targetId), isAudioOnly, null)
    
                Timber.i("${TAG}  call: $session")
            }
    
            return true
        }

    下面是我发送IM消息的代码

      override suspend fun sendCustomMessage(
            msg: String,
            receiverId: String,
            isGroup: Boolean
        ): Boolean {
            Timber.i("发送消息: msg = ${msg} receiverId = ${receiverId} isGroup = ${isGroup}")
            val conversation = Conversation()
            var targetId: String
            if (isGroup) {
                targetId = imConvertor.groupWildfireImId(receiverId)
                conversation.type = Conversation.ConversationType.Group
            } else {
                targetId = imConvertor.individualImId(receiverId)
                conversation.type = Conversation.ConversationType.Single
            }
            Timber.i("野火 targetId = $targetId")
            conversation.target = targetId
            val message = Message().also {
                //先用TextMessageContent 试试,不行再去自定义消息内容
                it.content = TextMessageContent(msg)
                it.conversation = conversation
               if (conversation.type ==Conversation.ConversationType.Single){
                   it.toUsers = arrayOf(targetId)
               }
            }
    
            return suspendCancellableCoroutine {
                ChatManager.Instance().sendMessage(message, object :
                    SendMessageCallback {
                    override fun onSuccess(messageUid: Long, timestamp: Long) {
                        Timber.i("发送消息成功 uid = ${messageUid}")
                        it.resume(true)
                    }
    
                    override fun onFail(errorCode: Int) {
                        Timber.e("发送消息失败 code =${errorCode}")
                        it.resume(false)
                    }
    
                    override fun onPrepare(messageId: Long, savedTime: Long) {
                        Timber.e("发送消息onPrepare")
    
                    }
    
                })
            }
        }
  • HeavyRain 3月前
    引用 12
    日志看不出来什么原因,上面代码也看不出来,你能不能发给我们一个能复现这个问题的demo,发送到邮箱support@wildfirechat.cn 我们运行起来看看
  • nicklee 3月前
    引用 13
    HeavyRain 日志看不出来什么原因,上面代码也看不出来,你能不能发给我们一个能复现这个问题的demo,发送到邮箱support@wildfirechat.cn 我们运行起来看看
    APK吗 还是要源码??
  • nicklee 3月前
    引用 14
    HeavyRain 日志看不出来什么原因,上面代码也看不出来,你能不能发给我们一个能复现这个问题的demo,发送到邮箱support@wildfirechat.cn 我们运行起来看看
    不行,我发给你也用不了,我们有配套硬件的
  • HeavyRain 3月前
    引用 15
     要源码,你可以把代码处理一下,可以android手机上运行的。相当于你写一个demo,把相关野火的摘出来放到这个demo中,复现这个问题,就可以把代码发给我们了
返回