WebsiteBeaver / CordovaCall

Cordova CallKit & ConnectionService plugin for iOS/Android that displays the native call UI for VOIP apps
MIT License
196 stars 91 forks source link

Error on sendCall function #22

Closed phyr0s closed 6 years ago

phyr0s commented 6 years ago

I always get this error The operation couldn’t be completed. (com.apple.CallKit.error.requesttransaction error 7.)fail

I'm using the lastest version of S.O and xCode

Thanks!

dmarcs commented 6 years ago

@videmort That error refers to maximumCallGroupsReached. CordovaCall only allows 1 call group. I'm assuming that you're not actually trying to allow more than 1 call group, and that this is just a bug either in your code or in CordovaCall. I would try to create a new project, and call sendCall without any other code to see if you can get this function to work.

phyr0s commented 6 years ago

@dmarcs fist of all thanks for your quick response.

My proyect is blank, only init and sendCall to test the callKit, so ... i don't know how i get maximumCallGroupsReached. :S

dmarcs commented 6 years ago

@videmort No problem. I just created a new project and added the following code to onDeviceReady

cordova.plugins.CordovaCall.sendCall('Daniel Marcus', function(success) {
  alert(success);
}, function(err) {
  alert(err);
});

When I run this code, the app alerts "Outgoing call successful". And if I click on the home button, I see a green bar at the top that says "Touch to return to call". When I duplicate the call as shown below, I first get the "Outgoing call successful" alert followed by "The operation couldn’t be completed. (com.apple.CallKit.error.requesttransaction error 7.)". This is expected because you're only allowed to have one call at a time.

cordova.plugins.CordovaCall.sendCall('Daniel Marcus', function(success) {
  alert(success);
}, function(err) {
  alert(err);
});

cordova.plugins.CordovaCall.sendCall('Daniel Marcus', function(success) {
  alert(success);
}, function(err) {
  alert(err);
});

Also don't forget to call connectCall when the WebRTC video chat starts. When the call ends you need to call endCall, otherwise you'll end up calling sendCall more than once, which is the cause of that error message.