forked from mirrors/linphone-iphone
Terminate CallKit end poing upon cancel or failuer
This commit is contained in:
parent
588b986005
commit
e6e5fced08
1 changed files with 10 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue