Hello,
I am getting an issue in desktop calling,
“The callee identified with the 184 doesn’t exist”. But if I authenticate this user, this user existed.
Even though I changed the user id, then also I have faced the same issue.
I didn’t receive any call and notification. Every time when I dialed call, it is directly ended, neither established nor connected.
Code Snippet
SendBirdCall.init('B13514F8-4AB5-4ABA-87D6-C3904DA10C96');
const authOption = { userId: 436, accessToken: 'f43066f5b0dec5b5ac407750fcd23a3be3fb128f' };
SendBirdCall.authenticate(authOption, (res, error) => {
if (error) {
// Authentication failed
console.log(error);
alert("Authentication failed");
} else {
// Authentication succeeded
alert("Authentication succeeded");
console.log(res);
const dialParams = {
userId: 184,
isVideoCall: false,
callOption: {
localMediaView: document.getElementById('local_video_element_id'),
remoteMediaView: document.getElementById('remote_video_element_id'),
audioEnabled: true,
videoEnabled: false
}
};
// Establishing websocket connection
SendBirdCall.connectWebSocket()
.then(() => {
alert("Succeeded to connect");
const call = SendBirdCall.dial(dialParams, (call, error) => {
console.log(call);
if (error) {
console.log("Dialing failed");
alert("Dialing failed");
console.log(error);
}else{
console.log("Dialing succeeded");
alert("Dialing succeeded");
}
});
call.onEstablished = (call) => {
alert("Call onEstablished");
};
call.onConnected = (call) => {
alert("Call onConnected");
};
call.onEnded = (call) => {
alert("Call onEnded");
};
call.onRemoteAudioSettingsChanged = (call) => {
alert("Call onRemoteAudioSettingsChanged");
};
call.onRemoteVideoSettingsChanged = (call) => {
alert("Call onRemoteVideoSettingsChanged");
};
SendBirdCall.addListener(res.userId, {
onRinging: (call) => {
call.onEstablished = (call) => {
alert("Call Accept onEstablished");
};
call.onConnected = (call) => {
alert("Call Accept onConnected");
};
call.onEnded = (call) => {
alert("Call Accept onEnded");
};
call.onRemoteAudioSettingsChanged = (call) => {
alert("Call Accept onRemoteAudioSettingsChanged");
};
call.onRemoteVideoSettingsChanged = (call) => {
alert("Call Accept onRemoteVideoSettingsChanged");
};
const acceptParams = {
callOption: {
localMediaView: document.getElementById('local_video_element_id'),
remoteMediaView: document.getElementById('remote_video_element_id'),
audioEnabled: true,
videoEnabled: false
}
};
call.accept(acceptParams);
}
});
}).catch((err) => {
console.log(err);
alert("Failed to connect")
});
}
});