Skip to content
This repository was archived by the owner on Jan 18, 2020. It is now read-only.

Conversation

@bobiechen-twilio
Copy link
Contributor

@bobiechen-twilio bobiechen-twilio commented Nov 7, 2019

  • I acknowledge that all my contributions will be made under the project's license.

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):

Scenario Result
✅A Alice calls Bob.
Bob does not accept and let ring.
Charlie calls Bob.
Bob accepts the call.
Alice and Bob talking.
Bob won't see Charlie's incoming call.
Charlie was hung up by CallKit when Bob accepted the call.
✅B Alice calls Bob.
Bob does not accept and let ring.
Charlie calls Bob.
Bob rejects the call.
Alice was hung up then Charlie's call showed up.
✅C Alice calls Bob.
Bob accepts the call.
Charlie calls Bob.
Bob declines Charlie's call.
Charlie was hung up.
Alice and Bob continue talking.
✅D Alice calls Bob.
Bob accepts the call.
Charlie calls Bob.
Bob "End & Accept" the call.
Alice was hung up.
Charlie and Bob talking.
*Some audio unit error message observed (see below)
✅E Bob calls Alice and Alice accepts the call.
Charlie calls bob.
Bob declines Charlie's call.
Charlie was hung up.
Bob and Alice continue talking
✅F Bob calls Alice and Alice accepts the call.
Charlie calls bob.
Bob "End & Accept" Charlie's call.
Alice was hung up.
Bob and Charlie continue talking
  • In scenario D, some audio uint error messages were observed in the debugging console
ObjCVoiceQuickstart[2732:1840483] Incoming call successfully reported. ObjCVoiceQuickstart[2732:1840483] provider:performEndCallAction: ObjCVoiceQuickstart[2732:1840638] [aurioc] AURemoteIO.cpp:1086:Initialize: failed: 561017449 (enable 3, outf< 1 ch, 44100 Hz, Int16> inf< 1 ch, 44100 Hz, Int16>) ObjCVoiceQuickstart[2732:1840638] [aurioc] AURemoteIO.cpp:1086:Initialize: failed: 561017449 (enable 3, outf< 1 ch, 44100 Hz, Int16> inf< 1 ch, 44100 Hz, Int16>) ObjCVoiceQuickstart[2732:1840638] [aurioc] AURemoteIO.cpp:1086:Initialize: failed: 561017449 (enable 3, outf< 1 ch, 44100 Hz, Int16> inf< 1 ch, 44100 Hz, Int16>) ObjCVoiceQuickstart[2732:1840638] [aurioc] AURemoteIO.cpp:1086:Initialize: failed: 561017449 (enable 3, outf< 1 ch, 44100 Hz, Int16> inf< 1 ch, 44100 Hz, Int16>) ObjCVoiceQuickstart[2732:1840638] [aurioc] AURemoteIO.cpp:1086:Initialize: failed: 561017449 (enable 3, outf< 1 ch, 44100 Hz, Int16> inf< 1 ch, 44100 Hz, Int16>) ObjCVoiceQuickstart[2732:1840483] provider:didDeactivateAudioSession: ObjCVoiceQuickstart[2732:1840483] provider:didDeactivateAudioSession: ObjCVoiceQuickstart[2732:1840483] Call disconnected ObjCVoiceQuickstart[2732:1840483] provider:didActivateAudioSession: ObjCVoiceQuickstart[2732:1840483] callDidConnect: ObjCVoiceQuickstart[2732:1840483] AVAudioSession setAggregatedIOPreference:error: Error Domain=NSOSStatusErrorDomain Code=560030580 "(null)" 
Copy link
Contributor

@piyushtank piyushtank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Assuming the changes have been tested locally with multiple invites and multiple calls.

@bobiechen-twilio bobiechen-twilio merged commit ff81c39 into twilio:master Nov 21, 2019
@bobiechen-twilio bobiechen-twilio deleted the multiple-call-invites-support branch December 9, 2019 22:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants