CXEndCallAction transactions fails with Incorrect UUID

Hi

I implement Callkit in my application.


when I start an incoming call, I request a transaction with a CXStartCall action.

The transaction and the calls starts properly.


When requesting a CXEndCallAction the transaction fails with Error Domain=com.apple.CallKit.error.requesttransaction Code=4 "(null)"


where

CXErrorCodeRequestTransactionErrorUnknownCallUUID = 4,


However, I have checked both UUIDs and they are actually the same.


Anyone met the same error ?


Best regards


Ferréol

Replies

You said you requested a transaction to start call, but when the provider asked the delegate to perform that start call action, did you fulfill that action?

Actually I fullfiled the action, however you made me look twice at the provider.


The issue was I wasn't handling correctly the UUID, I started the CXTransaction of CXStartCallAction with the right UUID, but in the providerdelegate, wasn't re-using this ID.


The issue is no more.

Hello ferreol


I am facing the same issue. Could you please help me to sort out.


Reporting an incoming call with following code snippet:

- (void)reportIncomingCallWithUUID:(NSUUID*)uuid phoneNumber:(NSString*)phone andName:(NSString *)name {
    CXCallUpdate *incomingCallUpdate = [[CXCallUpdate alloc] init];
    incomingCallUpdate.localizedCallerName = name;
    incomingCallUpdate.supportsHolding = NO;
    incomingCallUpdate.supportsUngrouping = NO;
    incomingCallUpdate.supportsGrouping = NO;
    incomingCallUpdate.remoteHandle = [[CXHandle alloc] initWithType:CXHandleTypePhoneNumber value:phone];
    [_provider reportNewIncomingCallWithUUID:uuid update:incomingCallUpdate completion:^(NSError * _Nullable error) {
        NSLog(@"%@ %@",NSStringFromClass([self class]),[error localizedDescription]);
        [_provider reportCallWithUUID:uuid updated:incomingCallUpdate];
    }];
}


Perforimg the follwing transaction after call end process:

- (void)endCallRequest:(NSUUID*)uuid {
    CXEndCallAction *endCallAction = [[CXEndCallAction alloc] initWithCallUUID:uuid];
    CXTransaction *transaction = [[CXTransaction alloc] initWithAction:endCallAction];
    CXCallController *controller = [[CXCallController alloc] init];
    NSLog(@"%@ endCallRequest uuid %@",NSStringFromClass([self class]),uuid.UUIDString);
    [controller requestTransaction:transaction completion:^(NSError * _Nullable error) {
        if (error) {
            NSLog(@"%@ endCallRequest error %@",NSStringFromClass([self class]),[error description]);
        }
    }];
}


And the provider delgates are handled like bellow:

- (void)provider:(CXProvider *)provider performStartCallAction:(CXStartCallAction *)action{
    NSLog(@"%@ performStartCallAction",NSStringFromClass([self class]));
}
- (void)provider:(CXProvider *)provider performAnswerCallAction:(CXAnswerCallAction *)action {
    [self configureAudioSession];
    [sip performAnswer];
    [action fulfill];
}
- (void)provider:(CXProvider *)provider performEndCallAction:(CXEndCallAction *)action {
    [sip disconnect];
    [action fulfill];
}


Please let me know what I doing wrong there.


Thank you 🙂