Outgoing call with call kit disconnects every 10 minutes automatically.

Every 10 minutes from the moment I dial with CXStartCallAction and reporting an outgoing call, the call will always disconnect after 10 minutes has elapsed. Not sure why it is disconnecting every 10 minutes on the dot. I don't have any timers going off. This issue happens when the app is in the foreground or background.


This is how I am connecting the call through CallKit


provider.setDelegate(self as? CXProviderDelegate, queue: nil)

let controller = CXCallController()

let transaction = CXTransaction(action: CXStartCallAction(call: UUID(), handle: CXHandle(type: .generic, value: "Call"))); controller.request(transaction, completion: { error in })

DispatchQueue.main.asyncAfter(wallDeadline: DispatchWallTime.now() + 1){

self.provider.reportOutgoingCall(with: controller.callObserver.calls[0].uuid, connectedAt: nil)

self.uuidString = controller.callObserver.calls[0].uuid.uuidString

print("Call: Outgoing to " + self.uuidString)

}


Also another issue I have been having with CallKit is when connecting while the app is in the background the audio goes through fine. However when connecting to callkit when the app is in the foreground no audio is going through. But when switching the app the from foreground to background the audio starts going through CallKit. Maybe there's an audio session configuration I am missing?


Any help is appreciated.

Thanks!

Did you found solution for this?

The same issue with CallKit and iOS 17+: CallKit deactivates audio session after 10 minutes of active call and as a result, call gets dropped by backend with SIP MEDIA_TIMEOUT error.

The root cause is:

default 14:57:16.899063+0530 <...> Notified that action timed out: <CXStartCallAction 0x30289a2e0 UUID=8E85F723-3EDD-486A-87C4-3657B5B5BAD8 state=2 commitDate=2024-09-03 09:16:56 +0000 failureReason=2 callUUID=99F3E298-C65A-4AA1-A39E-8B649ACE810A handles=( "<CXHandle 0x301a6e060 type=PhoneNumber value=u:yer7tXJIoEy7ecC1 siriDisplayName=(null)>" ) contactIdentifier=(null) video=0 relay=0 upgrade=0 retry=0 emergency=0 isVoicemail=0 ttyType=0 localLandscapeAspectRatio={0, 0} localPortraitAspectRatio={0, 0} dateStarted=(null) localSenderIdentityUUID=(null) shouldSuppressInCallUI=0>

App MUST implement the OPTIONAL delegate method and call [action fulfill]

-(void)provider:(CXProvider *)provider performStartCallAction:(CXStartCallAction *)action

I have no idea why CallKit time outs the call in case if app has no this optional delegate implemented.

Outgoing call with call kit disconnects every 10 minutes automatically.
 
 
Q