Commit e6e5fced authored by Christophe Deschamps's avatar Christophe Deschamps Committed by Benjamin REIS

Terminate CallKit end poing upon cancel or failuer

parent 588b9860
......@@ -802,6 +802,16 @@ static void linphone_iphone_display_status(struct _LinphoneCore *lc, const char
CXTransaction *tr = [[CXTransaction alloc] initWithAction:act];
[LinphoneManager.instance.providerDelegate.controller requestTransaction:tr
completion:^(NSError *err){}];
LOGI(@"CallKit - clearing CK as call ended on uuid %@",uuid);
[LinphoneManager.instance.providerDelegate.provider reportOutgoingCallWithUUID:uuid connectedAtDate:[NSDate date]];
[self.providerDelegate.uuids removeObjectForKey:callId2];
[self.providerDelegate.calls removeObjectForKey:uuid];
[self.providerDelegate.provider reportCallWithUUID:uuid
endedAtDate:[NSDate date]
reason:(state == LinphoneCallError ? CXCallEndedReasonFailed : CXCallEndedReasonRemoteEnded)];
} else { // Can happen when Call-ID changes (Replaces header)
if (linphone_core_get_calls_nb(LC) ==0) { // Need to clear all CK calls
for (NSUUID *myUuid in self.providerDelegate.calls) {
......
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