CallKit error com.apple.CallKit.error.requesttransaction error 7
Asked Answered
D

5

6

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

Disgraceful answered 4/12, 2018 at 18:23 Comment(2)
Check maximumCallGroups property of CXProviderConfiguration. maximumCallGroups cannot be set to 0. otherwise, error code 7 will be reported which is CXErrorCodeRequestTransactionErrorMaximumCallGroupsReachedTwerp
I had the case where I created a deriving class from the CXEndCallAction to attach some additional property. It caused the error with code 4097, and then I could not start any another transaction because of the error with code 7. The problem disappeared with going back to use original CXEndCallAction passed to the transaction.Hispanicism
R
1

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.

Recuperator answered 20/12, 2019 at 20:22 Comment(0)
W
1

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.

Willson answered 31/7, 2020 at 19:43 Comment(0)
W
0

Twilio developer evangelist here.

Have you enabled capabilities for Voice over IP in the project settings?

Wilone answered 5/12, 2018 at 1:8 Comment(9)
Yes. It's random error. Sometime it works sometime it doesn't. Mostly on first install it doesn't work. I tried today and couldn't get it to work at all. Also shouldn't we terminate CallKit when call fails to connect so that it doesn't remain running in the background?Disgraceful
I've updated my question with snapshot showing VoIP capability enabled.Disgraceful
So sometimes calls do connect as expected?Wilone
Yes it does sometimes.Disgraceful
Ooh, apparently the error codes have more information. Can you check <CallKit/CXError.h> for what 7 corresponds to? (I’m on my phone right now.)Wilone
Sorry dumb question but where do I find CXError.h file?Disgraceful
That's a good question, I was following instruction from another Stack Overflow post. I think, because the error is 7 that it corresponds to the CXErrorCodeRequestTransactionErrorMaximumCallGroupsReached. Does that give you any further leads?Wilone
At least now we know what error 7 is, tx for discovering it. In term of deciphering the sentence "The requested transaction contains actions that, if performed, would exceed the maximum number of call groups for the provider." I've no clue what it means.Disgraceful
I'm afraid that's as far as I can help. I don't know much about CallKit, I'm just trying to find things you can use to help debug. If you are finding this error with the quickstart itself, then I'd try opening an issue on the GitHub project and one of the developers who built the project maybe able to help you.Wilone
P
0

Try to initialize CXProvider and CXCallController sooner, before requesting CXStartCallAction

Perseverance answered 23/7, 2020 at 21:47 Comment(0)
A
0

I had the same problem because the Provider and the CallController have been lazy loaded.

It looks like that the CXProvider initWithConfiguration runs asynchronously which means you need to call this early otherwise you run into the risk of having a call without the completion of the initWithConfiguration function.

Thanks to @Allen for pointing me in the right direction.

Acey answered 18/5, 2021 at 14:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.