I've run Speakerbox(https://docs-assets.developer.apple.com/published/8e99045a90e2/MakingAndReceivingVoIPCallsWithCallKit.zip) to check the behavior of CallKit.
When there was one active call and one on hold and another call was received, the behavior was defferent depending on whether I operated it from a headset or not.
No headset or operated from CallKit screen
When "End & Accept" tapped: the active call is hung up, and the received call is answered.
When "End Held & Accept" tapped: the held call is hung up, the active call is held, and the received call is answered.
Operated from headset
Answer opeation cannot be performed for unknown reasons
Disconnect operation caused that all calls other than the one on hold are hung up and the held call is unheld.
Hold operation caused that the active call is held and the received call is answered. (Strangely, there are two held calls.)
And when I toggle calls at this time, one of the two on hold is hung up for unknown reasons.
I tried changing the settings of CXProviderConfiguration and CXCallUpdate, and changing the options in the Audio Session category, but it did not improve.
I checked CXActions occurring, and it was as follows.
(Call A = held call, Call B = active call, Call C = received call)
Disconnect (or Answer?) operation
(lacking CXEndCallAction for Call A)
CXEndCallAction for Call B
CXAnswerCallAction for Call C
CXEndCallAction for Call C <- weird
CXSetHeldCallAction for Call A onHold=false
Hold operation
(lacking lacking CXEndCallAction for Call A)
CXSetHeldCallAction for Call B
CXAnswerCallAction for Call C
Toggle calls
CXSetHeldCallAction for Call C onHold=true
CXSetHeldCallAction for Call A onHold=false
CXSetHeldCallAction for Call B onHold=false <- weird
CXEndCallAction for Call B
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
As the title says.
This happens even when not in dark mode.
Hi, Team.
We are currently creating a VoIP calling app using pjsip and want to be able to handle 4 calls at the same time. It is also necessary to be able to notice calls that are on hold or have not answered yet in hands-free (without looking the screen).
However, It seems like CallKit has the intention to silence the ringtone when multiple calls come in.
Problem
What does actually happen?
If a second call comes in while the first one have not answered yet, CallKit screen keeps showing about the first one.
If tapped "Accept" button, the second call ends.
If tapped "Decline" button, CallKit screen shows about the second call at last.
If the first call has put on hold before the second one comes in, CallKit screen shows "Hold & Accept" button even though the first call is already on hold.
When "Hold & Accept" button is displayed, ringtones and other sounds from app stop.
When tapped "Hold & Accept" button for the second call and then unhold the first one in provider(_ provider: CXProvider, perform action: CXAnswerCallAction), ringtone of the first call doesn't ring.
What is expected to happen?
If a second call comes in while the first one have not answered yet, CallKit screen shows about the second call.
If tapped "Accept" button, the second call starts and the first call is displayed on CallKit screen.
If tapped "Decline" button, the first call appears again.
If the first call has put on hold before the second one comes in, CallKit screen shows only "Accept" and "Decline" button (not in full screen).
If a second call comes in while the first one have not answered yet, ringtones continue to ring.
When accepted the second call, ringtone of the first call rings again.
Information
Sample code
Using CallKit to simulate three incoming calls and two alarm notifications.
Whether or not the first call is put on hold before the second one comes in is switchable from the bottom menu.
https://github.com/ryu-akaike/CallKit-Multiple-Incoming-Test
Versions
macOS: Sequoia 15.1
Xcode: 16.2
iPhone: 11
iOS: 18.1.1
Thank you.
Ryu Akaike
Hi, Team.
We are currently creating a VoIP calling app using pjsip and want to be able to end a call using the headset button while the app is in the middle of a call (AVAudioSession.category == .playAndRecord), but MPRemoteCommand does not receive any events.
After trying various things, We found that the button will respond if the audio output destination is set to the speaker or if .allowBluetoothA2DP is set as an option, but this is not suitable for this use case because audio input and output would be from the device rather than the headset.
=================================================
Problem
Headset button events cannot be received from MPRemoteCommand during a call.
What is expected to happen?
When the headset button is pressed during a call, a handler registered in some MPRemoteCommand is called back.
What does actually happen?
No MPRemoteCommand responds when the headset button is pressed during a call.
Information
Sample code
Echoes back the audio input with a 5-second delay to simulate a phone call.
https://github.com/ryu-akaike/HeadsetTalkTest-iOS/
Versions
macOS: Sonoma 14.5
Xcode: 15.3
iPhone: 11
iOS: 17.5.1
=================================================
Thank you.
Ryu Akaike