fix(call): handle incoming call hangup when signaling is unavailable (WT-1080)#1106
Merged
Conversation
…n signaling unavailable
Path 1 (_onCallPushEventIncoming): iOS CXProvider may reject incoming call registration before the user sees it (DND, blocklist, unentitled). Since signaling is disconnected at push-receive time we cannot decline immediately. The server replays the incoming event on next handshake reconnect, which re-enters Path 2 where the SIP line is now known. Replaced the silent drop with a descriptive log and explanation of the recovery path. Path 2 (__onCallSignalingEventIncoming): when reportNewIncomingCall returns an unexpected error (callRejectedBySystem on Android, unknown/internal on iOS) send a DeclineRequest immediately. The call was never shown to the user so performEndCall will not fire. _signalingModule.execute returns null when disconnected — the ?. operator handles that safely.
There was a problem hiding this comment.
Pull request overview
Fixes cases where an incoming call cannot be registered with the OS call UI (CallKit/Telecom) and would otherwise be silently dropped locally without notifying the server, leaving the remote party ringing indefinitely.
Changes:
- Document and log the iOS VoIP-push path where the OS rejects call registration before the call is shown to the user.
- On signaling-path
reportNewIncomingCallfailures, immediately notify the server by sending aDeclineRequestvia_signalingModule.execute(...).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes two silent-drop paths in
CallBlocwhere an incoming call registration failure is not reported back to the server, leaving the remote party with an indefinitely ringing call._onCallPushEventIncoming): iOS VoIP push —CXProviderrejects call registration (DND, blocklist, unentitled). Signaling is likely disconnected at this point — hangup must be queued and sent on first reconnect.__onCallSignalingEventIncoming):reportNewIncomingCallreturns an unhandled error (callRejectedBySystemon Android,unknown/internalon iOS). Signaling is connected — hangup can be sent immediately.Investigation notes
didPushIncomingCall(error≠null)is de-facto iOS-only: Android also fires this callback but always witherror=null(seeForegroundService.handleCSReportDidPushIncomingCall)callRejectedBySystemonly surfaces in Path 2 viareportNewIncomingCall()return; it never arrives throughdidPushIncomingCallperformEndCallwill not be triggered — the call was never registered with CallKit/TelecomFiles
lib/features/call/bloc/call_bloc.dart(~line 744, ~line 922)YouTrack
WT-1080