Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CallKit error com.apple.CallKit.error.requesttransaction error 7

I'm using Twilio voice quickstart code https://github.com/twilio/voice-quickstart-swift. When I make a client to client call, call doesn't connect. CallKit runs in the background though, I can see the green notification bar when I send app in the background. Following is the error: StartCallAction transaction request failed: The operation couldn’t be completed. (com.apple.CallKit.error.requesttransaction error 7.)

As you can see Googling doesn't help as there doesn't seem to be any solution around?

Does anyone know how to fix or debug it further?

Updated: Attaching VoIP settings, it's certainly enabled. VOIP Settings

like image 320
Dan Avatar asked Oct 17 '22 09:10

Dan


2 Answers

Problem is in your code which you write to handle and initialise variables. There is nothing wrong in the Twilio sdk either so don't look there. Anything which you are doing beyond twilio sample code is the place to look for the problem.

I've also wasted months of my time on similar issue and found out that there was issue with initialising one variable.

like image 164
Raymond Avatar answered Oct 30 '22 02:10

Raymond


You are trying to request CXStartCallAction right after another CXStartCallAction was requested. You need to end the first call correctly.

In any case you must follow correct sequence of actions. Once you user wrong action in a sequence, CallKit will return one or another error.

And DO NOT request one action immediately after another is processed. There should be some time between two requests. For example, you initiated CXStartCallAction, then you checked that user is offline and trying to end the call. If that check is quick, then "end action" may result in error. You need to wait a few milliseconds before cancelling the outgoing call.

like image 27
Alexander Volkov Avatar answered Oct 30 '22 02:10

Alexander Volkov