This repository was archived by the owner on Jan 18, 2020. It is now read-only.
Make quickstart capable of handling multiple calls or call invites #190
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Description
The current sample code assumes that only one call or call invite is is supported at the same time and therefore will not report the VoIP incoming call push notification to CallKit when there is already a pending invite or an active call.
This PR modifies the sample code to be able to handle multiple calls or call invites and ensures that VoIP push notifications are always reported to CallKit as new incoming calls.
Tested scenarios
This table illustrates how the updated sample app behaves in different call scenarios (all with CallKit integrated):
Bob does not accept and let ring.
Charlie calls Bob.
Bob accepts the call.
Bob won't see Charlie's incoming call.
Charlie was hung up by CallKit when Bob accepted the call.
Bob does not accept and let ring.
Charlie calls Bob.
Bob rejects the call.
Bob accepts the call.
Charlie calls Bob.
Bob declines Charlie's call.
Alice and Bob continue talking.
Bob accepts the call.
Charlie calls Bob.
Bob "End & Accept" the call.
Charlie and Bob talking.
*Some audio unit error message observed (see below)
Charlie calls bob.
Bob declines Charlie's call.
Bob and Alice continue talking
Charlie calls bob.
Bob "End & Accept" Charlie's call.
Bob and Charlie continue talking