mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 02:58:07 +00:00
update callid for callkit
This commit is contained in:
parent
f5aeea9c96
commit
01bb34843d
2 changed files with 17 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue