Commit 01bb3484 authored by DanmeiChen's avatar DanmeiChen
Browse files

update callid for callkit

parent f5aeea9c
......@@ -164,6 +164,19 @@ import AVFoundation
}
}
}
@objc func updateCallId(previous: String, current: String) {
let uuid = CallManager.instance().providerDelegate.uuids["\(previous)"]
if (uuid != nil) {
CallManager.instance().providerDelegate.uuids.removeValue(forKey: previous)
CallManager.instance().providerDelegate.uuids.updateValue(uuid!, forKey: current)
let callInfo = providerDelegate.callInfos[uuid!]
if (callInfo != nil) {
callInfo!.callId = current
providerDelegate.callInfos.updateValue(callInfo!, forKey: uuid!)
}
}
}
// From ios13, display the callkit view when the notification is received.
@objc func displayIncomingCall(callId: String) {
......
......@@ -1038,6 +1038,9 @@ static void linphone_iphone_call_log_updated(LinphoneCore *lc, LinphoneCallLog *
}
}
static void linphone_iphone_call_id_updated(LinphoneCore *lc, const char *previous_call_id, const char *current_call_id) {
[CallManager.instance updateCallIdWithPrevious:[NSString stringWithUTF8String:previous_call_id] current:[NSString stringWithUTF8String:current_call_id]];
}
#pragma mark - Message composition start
- (void)onMessageComposeReceived:(LinphoneCore *)core forRoom:(LinphoneChatRoom *)room {
[NSNotificationCenter.defaultCenter postNotificationName:kLinphoneTextComposeEvent
......@@ -1320,6 +1323,7 @@ void popup_link_account_cb(LinphoneAccountCreator *creator, LinphoneAccountCreat
linphone_core_cbs_set_version_update_check_result_received(cbs, linphone_iphone_version_update_check_result_received);
linphone_core_cbs_set_qrcode_found(cbs, linphone_iphone_qr_code_found);
linphone_core_cbs_set_call_log_updated(cbs, linphone_iphone_call_log_updated);
linphone_core_cbs_set_call_id_updated(cbs, linphone_iphone_call_id_updated);
linphone_core_cbs_set_user_data(cbs, (__bridge void *)(self));
theLinphoneCore = linphone_factory_create_shared_core_with_config(factory, _configDb, NULL, [kLinphoneMsgNotificationAppGroupId UTF8String], true);
......
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