Outgoing Call Never Stops "Dialing" Android
Bug report
-
[x] I've checked the example to reproduce the issue.
-
Reproduced on:
-
[x] Android
Description
I call RNCallKeep.startCall(id, name, name) and the outgoing call begins. The android device displays "Dialling". When the callee accepts the call, the RNCallKeep.backToForeground() successfully runs. But the call is still in "Dialling" mode.
I've tried calling many different functions before/after the "RNCallKeep.backToForeground()" Call:
- RNCallKeep.setCurrentCallActive(uuid)
- RNCallKeep.updateDisplay(id, foo, bar)
- RNCallKeep.answerIncomingCall(id)
None Have Worked
RNCallKeep.setCurrentCallActive(uuid) should work make sure that the id match
RNCallKeep.setCurrentCallActive(uuid)should work make sure that the id match
I've tried RNCallKeep.setCurrentCallActive(uuid) and have made sure that the Id's match. It still did not work. What else could be the problem?
Hi @stephanoparaskeva - what kind of uuid are you using? Firstly don't call backToForeground yet - just get the call into an answered state.
Have you looked at the logs from android ?
Hi @stephanoparaskeva - what kind of uuid are you using? Firstly don't call backToForeground yet - just get the call into an answered state.
Have you looked at the logs from android ?
The library is called uuid and is imported like this:
import { v4 as uuid } from 'uuid';
The logs for android are far too flooded and have way too much information for me to decipher. The problem doesn't seem to be 'backToForeground' as the issue persists even if I remove that and simply add 'setCurrentCallActive':
Before (issue occurring)
const onRemoteStreamListener = async (
_session: Session,
userId: number,
stream: Stream
) =>
setRemoteStreams([...remoteStreams, { userId, stream }], () => {
InCallManager.start({ media: 'video', auto: false });
InCallManager.setSpeakerphoneOn(true);
RNCallKeep.backToForeground();
});
After (issue still persists):
const onRemoteStreamListener = async (
_session: Session,
userId: number,
stream: Stream
) =>
setRemoteStreams([...remoteStreams, { userId, stream }], () => {
InCallManager.start({ media: 'video', auto: false });
InCallManager.setSpeakerphoneOn(true);
const id = oneTimeId();
RNCallKeep.setCurrentCallActive(id);
});
The complete code can be found here
@danjenkins
Added log in VoiceConnectionService in callkeep

Js code log:

VoiceConnectionService log:

And it'll do nothing to active call

Further investigate: Seem like each time we startCall, new uuid will be generated and used as connection id, not the value we pass in.

To fix this bug

Issue is still occuring
Issue is still occuring
Because this issue has been fixed in fork repo.
Issue is still occuring
Because this issue has been fixed in fork repo.
But this needs to be merged into master...
Issue is still occuring
Because this issue has been fixed in fork repo.
But this needs to be merged into master...
It's just a work-around. I just fix it in my fork repo because merging this fix into master branch may lead to another bugs. Someone who have more knownledge about this project should investigate and find the root cause and fix it.
I have the same issue, any update?
Still no updates? I have the same issue and ThinhVu commit fixes it for me too. Would be nice if someone could review that and merge it into master.
Still no updates? I have the same issue and ThinhVu commit fixes it for me too. Would be nice if someone could review that and merge it into master.
There is no pull request into this repo from what I've seen?
Still no updates? I have the same issue and ThinhVu commit fixes it for me too. Would be nice if someone could review that and merge it into master.
There is no pull request into this repo from what I've seen?
That's true. I've just created one. This is my first pull request, I hope everything is OK.
https://github.com/react-native-webrtc/react-native-callkeep/pull/555
I think this issue is also related https://github.com/react-native-webrtc/react-native-callkeep/issues/436
I had that problem too, endCall listener always receives a different callUUID than what I originally passed on startCall. But if I used the original uuid passed to start to endCall() it works.
Yeh, looking at androids code, the uuid you passed to startCall gets overridden. You can listen to didReceiveStartCallAction to update the callUUID that callKit is using.
const onNativeCall = ({ callUUID }: { callUUID: string }) => {
// _onOutGoingCall on android is also called when making a call from the app
if (Platform.OS == "android") setUuid(callUUID);
};
RNCallKeep.addEventListener("didReceiveStartCallAction", onNativeCall);