|
@@ -100,7 +100,6 @@ class WdKeepAliveService : AbsWorkService() {
|
|
|
if (tcpModel.action == TcpAction.VoiceAction.SUCCESS) { //拨出成功
|
|
|
Log.i(TAG, "拨出成功 ${interactionVO.fromMemberName} ${interactionVO.id}")
|
|
|
DeviceChannel.calling = true
|
|
|
- DeviceChannel.callId = if (tcpModel.toId==Constants.deviceId) tcpModel.fromId else tcpModel.toId
|
|
|
intent.setClass(this, WebRTCVoipAudioActivity::class.java)
|
|
|
intent.putExtra("targetId", interactionVO?.toSipId)
|
|
|
intent.putExtra("TcpModel", tcpModel)
|
|
@@ -109,7 +108,7 @@ class WdKeepAliveService : AbsWorkService() {
|
|
|
startActivity(intent)
|
|
|
} else if (tcpModel.action == TcpAction.VoiceAction.CALL) { //有来电
|
|
|
DeviceChannel.calling = true
|
|
|
- DeviceChannel.callId = if (tcpModel.toId==Constants.deviceId) tcpModel.fromId else tcpModel.toId
|
|
|
+ DeviceChannel.callId = if (interactionVO.fromDeviceId.equals(Constants.deviceId)) interactionVO.toDeviceId else interactionVO.fromDeviceId
|
|
|
Log.i(TAG, "来电:" + JSON.toJSONString(interactionVO))
|
|
|
intent.setClass(this, WebRTCVoipAudioRingingActivity::class.java)
|
|
|
intent.putExtra("targetId", interactionVO?.fromSipId)
|
|
@@ -125,9 +124,8 @@ class WdKeepAliveService : AbsWorkService() {
|
|
|
val tcpModel = messageEvent.getMessage() as TcpModel
|
|
|
if (tcpModel.type == TcpType.VOICE && tcpModel.action == TcpAction.VoiceAction.CALL){
|
|
|
DeviceChannel.calling = true
|
|
|
- DeviceChannel.callId = if (tcpModel.toId==Constants.deviceId) tcpModel.fromId else tcpModel.toId
|
|
|
-
|
|
|
val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
|
|
|
+ DeviceChannel.callId = if (interactionVO.fromDeviceId.equals(Constants.deviceId)) interactionVO.toDeviceId else interactionVO.fromDeviceId
|
|
|
val intent = Intent()
|
|
|
Log.i(TAG, "来电:" + JSON.toJSONString(interactionVO))
|
|
|
intent.setClass(this, WebRTCVoipAudioRingingActivity::class.java)
|