From cb9232b3ab413fae7bcc2b94abd70f18ca02b263 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期二, 03 十二月 2024 11:20:32 +0800
Subject: [PATCH] 增加铃声;增加TCP/UDP连接选择
---
HDLLinPhoneSDK/HDLLinPhoneSDK/HDLCallManager.swift | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLCallManager.swift b/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLCallManager.swift
index e4d401d..72f124c 100644
--- a/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLCallManager.swift
+++ b/HDLLinPhoneSDK/HDLLinPhoneSDK/HDLCallManager.swift
@@ -240,6 +240,9 @@
let sAddr = Address.getSwiftObject(cObject: addr!)
if (HDLCallManager.callKitEnabled() && !HDLCallManager.instance().nextCallIsTransfer) {
+ print("callKitEnabled")
+// HDLCallManager.configAudioSession(audioSession: AVAudioSession.sharedInstance())
+
let uuid = UUID()
let name = "unknow"
let handle = CXHandle(type: .generic, value: name)
@@ -252,6 +255,7 @@
requestTransaction(transaction, action: "startCall")
}else {
+ print("doCall")
try? doCall(addr: sAddr, isSas: isSas)
}
}
@@ -286,6 +290,7 @@
lcallParams.mediaEncryption = .ZRTP
}
lcallParams.videoEnabled=true;
+
let call = HDLCallManager.instance().lc!.inviteAddressWithParams(addr: addr, params: lcallParams)
if (call != nil) {
// The LinphoneCallAppData object should be set on call creation with callback
@@ -361,6 +366,20 @@
} catch {
}
+// LinphoneCall *currentcall = linphone_core_get_current_call(LC);
+// if (linphone_core_is_in_conference(LC) || // In conference
+// (linphone_core_get_conference_size(LC) > 0 && [UIHangUpButton callCount] == 0) // Only one conf
+// ) {
+// LinphoneManager.instance.conf = TRUE;
+// linphone_core_terminate_conference(LC);
+// } else if (currentcall != NULL) {
+// linphone_call_terminate(currentcall);
+// } else {
+// const MSList *calls = linphone_core_get_calls(LC);
+// if (bctbx_list_size(calls) == 1) { // Only one call
+// linphone_call_terminate((LinphoneCall *)(calls->data));
+// }
+// }
if (UIApplication.shared.applicationState == .background) {
HDLCoreManager.instance().stopLinphoneCore()
}
--
Gitblit v1.8.0