Skip to content

feat: add proper endCall reasoning#2114

Merged
santhoshvai merged 1 commit intofeat/callkit-telecom-integrationfrom
endCall-reason-callingx
Feb 9, 2026
Merged

feat: add proper endCall reasoning#2114
santhoshvai merged 1 commit intofeat/callkit-telecom-integrationfrom
endCall-reason-callingx

Conversation

@santhoshvai
Copy link
Member

💡 Overview

Add proper reasoning for callingx endCall methods

This is important for callkit especially.. paraphrasing callkit doc

[Respond to Call Hang Ups and Failures](https://developer.apple.com/documentation/pushkit/responding-to-voip-notifications-from-pushkit#Respond-to-Call-Hang-Ups-and-Failures)
Many things can go wrong when connecting a VoIP call, and CallKit makes it easy to handle problems when they occur.

If the person who initiated the call hangs up, use the network connection between your app and server to notify the app. In your app, call the [reportCall(with:endedAt:reason:)](https://developer.apple.com/documentation/CallKit/CXProvider/reportCall(with:endedAt:reason:)) method of its [CXProvider](https://developer.apple.com/documentation/CallKit/CXProvider) object, specifying [CXCallEndedReason.remoteEnded](https://developer.apple.com/documentation/CallKit/CXCallEndedReason/remoteEnded) as the reason for the end of the call. If the incoming call interface is onscreen, CallKit updates the interface to reflect the end of the call, and dismisses the interface.

If the recipient of a call answers before the app establishes a connection to your server, don’t fulfill the [CXAnswerCallAction](https://developer.apple.com/documentation/CallKit/CXAnswerCallAction) object sent to the [provider(_:perform:)](https://developer.apple.com/documentation/CallKit/CXProviderDelegate/provider(_:perform:)-h4in) method of your delegate immediately. Instead, wait until you establish a connection and then fulfill the object. While it waits for your app to fulfill the request, the incoming call interface lets the user know that the call is connecting, but not yet ready.

If your app fails to establish a connection to your server, call the [reportCall(with:endedAt:reason:)](https://developer.apple.com/documentation/CallKit/CXProvider/reportCall(with:endedAt:reason:)) method with the [CXCallEndedReason.failed](https://developer.apple.com/documentation/CallKit/CXCallEndedReason/failed) option. If the incoming call interface is currently onscreen, the system updates it to indicate a failed call.

After sending the initial push notification, don’t send additional push notifications to cancel the call or communicate new details to your app. Instead, communicate with the app directly over the network connection you established between it and your server. Using an existing network connection is generally faster than sending a push notification, and if network conditions are poor, APNs may be unable to deliver push notifications to the device anyway.

📝 Implementation notes

🎫 Ticket: https://linear.app/stream/issue/XYZ-123

📑 Docs: https://github.com/GetStream/docs-content/pull/

@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2026

⚠️ No Changeset found

Latest commit: 9043407

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@santhoshvai santhoshvai merged commit 7158ea6 into feat/callkit-telecom-integration Feb 9, 2026
16 checks passed
@santhoshvai santhoshvai deleted the endCall-reason-callingx branch February 9, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants