Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Established Connection Issue #83

Open
shayan555 opened this issue Jul 1, 2021 · 8 comments
Open

Established Connection Issue #83

shayan555 opened this issue Jul 1, 2021 · 8 comments

Comments

@shayan555
Copy link

Hi All,

We are facing issue once the connection disconnected then not able to reestablished the connection and showing error 'Temporarily Unavailable'

@YuliaGrigorieva
Copy link
Contributor

Hello @shayan555 ,

Do you mean that the callee does not receive the incoming call and the caller gets "Temporary unavailble" error from CallFailed event?

Best regards,
Yulia Grigorieva

@shayan555
Copy link
Author

Log : Client: emit event ConnectionClosed

Once the connection closed then callee does not receive the incoming call and the caller gets "Temporary unavailble" error from CallFailed

@ahammedmishal
Copy link

yes i got the same issue after some time after login when we call the user it will show Call failed : 'Temporarily Unavailable'

@wilmxre
Copy link

wilmxre commented Mar 29, 2023

@ahammedmishal did you manage to fix this issue?

@ahammedmishal
Copy link

@ahammedmishal did you manage to fix this issue?

Yes i used direct google translation api

@ahammedmishal
Copy link

ahammedmishal commented Apr 6, 2023

@ahammedmishal did you manage to fix this issue?

there is no fix by them so do your own logic. this happened voxim connection goes offf

@wilmxre
Copy link

wilmxre commented Apr 6, 2023

@ahammedmishal how did you fix it?

@ahammedmishal
Copy link

ahammedmishal commented Apr 6, 2023

in the root file of the app, i do like this .this temporarily unavailable mean that the user is not logged in,this happen after some time or app goes backgound or due to internet issues the voximplant connection will go so that time we need to call this function in every 5 seconds useEffect(() => {
testConnection = async () => {
let state = await Voximplant.getInstance().getClientState();
if (state !== Voximplant.ClientState.DISCONNECTED) {
loginWithToken();
} else {
await Voximplant.getInstance().connect();
}
};
const interval = setInterval(testConnection, 5000);
return () => clearInterval(interval);
}, []);

loginWithToken = async () => {
try {
let state = await Voximplant.getInstance().getClientState();
if (state === Voximplant.ClientState.DISCONNECTED) {
await Voximplant.getInstance().connect();
}
if (state !== Voximplant.ClientState.LOGGED_IN) {
let usernames = ${userFullDetails?.username}@sdk-tutorial-exampleapp;
let passwords = ${userFullDetails?.uid};
const loginClicked = async (usernames, passwords) => {
await AsyncStorage.setItem('usernameValue', usernames);
await AsyncStorage.setItem('uid', passwords);
LoginManager.getInstance().loginWithPassword(
usernames + '.voximplant.com',
passwords,
);
};
loginClicked(usernames, passwords);
}
} catch (e) {
console.log('LoginManager: loginWithToken: ' + e.name);
if (e.name === Voximplant.ClientEvents.AuthResult) {
console.log('LoginManager: loginWithToken: error code: ' + e.code);
}
}
};

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

No branches or pull requests

4 participants