react-native-webrtc / react-native-callkeep

iOS CallKit framework and Android ConnectionService for React Native
ISC License
922 stars 444 forks source link

How to end incoming call(Caller ends call before Callee accepts/picks the call) #461

Open nero2009 opened 3 years ago

nero2009 commented 3 years ago

Bug report

Description

Please I am trying to end an incoming call before the callee accepts/picks the call using callkeep. I saw some solutions in a github issue to :

The first solution didn't work on IOS/Android but the second one works only in IOS.

Please how can I end a call before calllee picks it?

Versions

- Callkeep:4.2.0
- React Native: 0.63.4
- Android: 11
- Phone model: S20 ultra

Logs

Paste here
linus-komnick commented 3 years ago

@nero2009 did you find a solution?

nero2009 commented 3 years ago

No I didn't.

linus-komnick commented 3 years ago

@nero2009 I found out how to do it thanks to Romick2005's help. This is how I do it: When the call initiator cancels the call, I send a silent push notification to the callee. In AppDelegate I listen for this push notification and once it arrives, I terminate callkit like this: int reasonId = 6; [RNCallKeep endCallWithUUID: callId reason: reasonId];

nero2009 commented 3 years ago

Great!! I will try this out. Please were you able to find a solution for android? @linus-komnick

yehyaumar commented 2 years ago

@nero2009 I found out how to do it thanks to Romick2005's help. This is how I do it: When the call initiator cancels the call, I send a silent push notification to the callee. In AppDelegate I listen for this push notification and once it arrives, I terminate callkit like this: int reasonId = 6; [RNCallKeep endCallWithUUID: callId reason: reasonId];

Works perfectly.

newme616 commented 2 years ago

@nero2009 I found out how to do it thanks to Romick2005's help. This is how I do it: When the call initiator cancels the call, I send a silent push notification to the callee. In AppDelegate I listen for this push notification and once it arrives, I terminate callkit like this: int reasonId = 6; [RNCallKeep endCallWithUUID: callId reason: reasonId];

@linus-komnick could you paste your App Delegate on how to implement this. I am not very good in Objective C and this would be very helpful. Thank you so much in advance!