diff --git a/Linphone/Core/CoreContext.swift b/Linphone/Core/CoreContext.swift index 7ae9798a6..5e749d05c 100644 --- a/Linphone/Core/CoreContext.swift +++ b/Linphone/Core/CoreContext.swift @@ -125,6 +125,7 @@ final class CoreContext: ObservableObject { self.mCore.videoPreviewEnabled = false self.mCore.fecEnabled = true self.mCore.friendListSubscriptionEnabled = true + self.mCore.config!.setBool(section: "sip", key: "auto_answer_replacing_calls", value: false) self.mCoreSuscriptions.insert(self.mCore.publisher?.onGlobalStateChanged?.postOnCoreQueue { (cbVal: (core: Core, state: GlobalState, message: String)) in if cbVal.state == GlobalState.On { diff --git a/Linphone/Ressources/linphonerc-factory b/Linphone/Ressources/linphonerc-factory index cc44698e3..429ef55c8 100644 --- a/Linphone/Ressources/linphonerc-factory +++ b/Linphone/Ressources/linphonerc-factory @@ -15,7 +15,7 @@ accept_any_encryption=1 guess_hostname=1 register_only_when_network_is_up=1 auto_net_state_mon=1 -auto_answer_replacing_calls=1 +auto_answer_replacing_calls=0 ping_with_options=0 use_cpim=1 zrtp_key_agreements_suites=MS_ZRTP_KEY_AGREEMENT_K255_KYB512 diff --git a/Linphone/TelecomManager/TelecomManager.swift b/Linphone/TelecomManager/TelecomManager.swift index 2606b2267..fdf00c209 100644 --- a/Linphone/TelecomManager/TelecomManager.swift +++ b/Linphone/TelecomManager/TelecomManager.swift @@ -566,6 +566,7 @@ class TelecomManager: ObservableObject { } } #endif + /* if call.replacedCall != nil { self.endCallKitReplacedCall = false @@ -578,7 +579,8 @@ class TelecomManager: ObservableObject { self.providerDelegate.uuids.updateValue(uuid!, forKey: callInfo!.callId) self.providerDelegate.updateCall(uuid: uuid!, handle: addr!.asStringUriOnly(), hasVideo: self.remoteConfVideo, displayName: displayName) } - } else if TelecomManager.callKitEnabled(core: core) { + } else */ + if TelecomManager.callKitEnabled(core: core) { /* let isConference = isConferenceCall(call: call) let isEarlyConference = isConference && CallsViewModel.shared.currentCallData.value??.isConferenceCall.value != true // Conference info not be received yet. @@ -593,9 +595,9 @@ class TelecomManager: ObservableObject { } */ let uuid = self.providerDelegate.uuids["\(callId)"] - if call.replacedCall == nil { + //if call.replacedCall == nil { TelecomManager.uuidReplacedCall = callId - } + //} if uuid != nil { // Tha app is now registered, updated the call already existed. diff --git a/Linphone/UI/Call/ViewModel/CallViewModel.swift b/Linphone/UI/Call/ViewModel/CallViewModel.swift index bd849537b..d7590d93a 100644 --- a/Linphone/UI/Call/ViewModel/CallViewModel.swift +++ b/Linphone/UI/Call/ViewModel/CallViewModel.swift @@ -144,8 +144,12 @@ class CallViewModel: ObservableObject { } let directionTmp = self.currentCall!.dir - let remoteAddressStringTmp = String(self.currentCall!.remoteAddress!.asStringUriOnly().dropFirst(4)) - let remoteAddressTmp = self.currentCall!.remoteAddress! + + let remoteAddressTmp = self.currentCall!.remoteAddress!.clone() + remoteAddressTmp!.clean() + + let remoteAddressStringTmp = remoteAddressTmp != nil ? String(remoteAddressTmp!.asStringUriOnly().dropFirst(4)) : "" + var displayNameTmp = "" if self.currentCall?.conference != nil { displayNameTmp = self.currentCall?.conference?.subject ?? "" @@ -161,6 +165,8 @@ class CallViewModel: ObservableObject { } } + + DispatchQueue.main.async { self.displayName = displayNameTmp }