0

I'm playing with CallKit now. I've downloaded SpeakerBox example and I have my own example that uses custom SIP and WebRTC and CallKit code from SpeakerBox.

I've noticed that in SpeakerBox application if you start local dummy call and then have another incoming call (no difference, if it is simulated SpeakerBox incoming one or real mobile call) you will always (OK, in 99.9% of cases) get "Hold&Accept" and "End&Accept" buttons on UI call screen provided by system.

But for my application things are following:

  • I start my VoIP application (Device A) and call some mobile number (Device B)
  • I accept call on Device B
  • I call from another mobile number (Device C) to Device A
  • I'm getting system call UI, but only with "Accept" and "Decline" buttons. So I can't put current call to hold.

Is this something that can be configured in CallKit inside of application or in application itself?

Bohdan Ivanov
  • 806
  • 9
  • 28

1 Answers1

1

It happens when you don't report to system (device A) that call was accepted by device B. Then if you accept the new incoming call from device C, you will end the current call with device B.

To solve it, when device A is notified about that call was accepted by B, you must use this:

[provider reportOutgoingCallWithUUID:callUUID connectedAtDate:[NSDate date]];

where:

  • provider is the CXProvider recieved on -(void) provider:(CXProvider *)provider performStartCallAction:(CXStartCallAction *)action
  • callUUID is the UUID for the call in device A.

I hope that it helps you.

AntonioM
  • 655
  • 9
  • 16
  • Thank you very much! It was not too obvious from SpeakerBox demo, now I've got it. – Bohdan Ivanov May 26 '17 at 10:59
  • @BohdanIvanov I'm having the same type of issue as yours. And I am also having implementation of this code though it's showing me only 2 options ACCEPT and DECLINE. But I want to display HOLD & ACCEPT , DECLINE and END & ACCEPT. Any Suggestion how to do that ? [provider reportOutgoingCallWithUUID:callUUID connectedAtDate:[NSDate date]]; – Parth Barot Dec 18 '19 at 09:00
  • @ParthBarot When you perform CXStartCallAction, you get a CXProvider. Use this provider to call the mentioned method (reportOutgoingCallWithUUID:connectedAtDate:), when you receive call accepted from the other device. I don't know if this is enough, but if not, open a new question with detailing the issue and I will try to expand my answer. Although, I hope this is enough. – AntonioM Dec 19 '19 at 08:57