Please login or register to access secure site features.

Note: By continuing to use DevConnect Program Services you agree to our latest Registered Member Terms.

Sign in using DevConnect ID

Forgot password?

Trouble logging in?

Submit a ticket for Registration Support.

I have an SSO ID

?
sign in

Don't have a DevConnect or SSO ID ?

Create a DevConnect account or join the program.

register now
^
Forum Index » Avaya Client SDK - General » Android Logout by Server   XML
 
Author Message
butterklopsi



Joined: 11/11/2015 02:17:01
Messages: 19
Offline

Hello,

we have a situation where our customer wants to login an extension on a softphone but the same extension is already active on another device. Block new registrations is disabled and max registrations is set to 1, so the old instance should be logged out, when the new one registeres. It is configured to register with two regular and one survival SessionManager connections. We tested the behaviour using a 9611 phone and everything worked as expected. When we test the same situation with our CSDK based app the new instance registeres and the old one receives some "onUserRegistrationFailed()" events follwed by an "onUserAllRegistrationsFailed()".
It seems that there is only one registration canceled but the other registrations remain active. This results in call signaling even after the device was kicked off and some other strange logoff behaviour.
What is the proper way to detect that the extension was registered on a different device inside of the Android ClientSDK?

Regards

Børge
ware16.avaya.com



Joined: 23/09/2019 00:26:26
Messages: 73
Offline

Hi,

As Max registration is set to 1, it is expected behavior. The server will not allow two devices simultaneously registered and hence unregisters the first logged-in device.

How to detect?
You might get the warning/reason header explaining why user registration got canceled?

Please share the logs so that we can point you to the exact header.

Thanks,
Avaya DevConnect Team


butterklopsi



Joined: 11/11/2015 02:17:01
Messages: 19
Offline

Hello,

I am using the UserRegistrationListener to observe the state. There are lots of events that could happen like "onUserUnregistrationSuccessful" and "onUserUnregistrationComplete" and so on. But as I noticed in the situation where another station takes the registration, none of them are called. the only thing i receive are some "onUserRegistrationFailed" for each SessionManager, with the message "SERVER_ENDED_ERROR" followed by an "onUserAllRegistrationsFailed". So what I am now doing is to collect the messages and if the "onUserAllRegistrationsFailed" appears i check if there was an "SERVER_ENDED_ERROR", to know if the extension was logged out by another device.

I/d.a.p.p.PhoneImpl: [main                ] onUserRegistrationFailed Registration failed: SERVER_ENDED_ERROR on server x.x.x.105
E/AvayaClientServices: CCertificateInformationLogger::CCertificateInfoLogger(): No certificates are available in certificate validation request.
I/d.a.p.p.PhoneImpl: [main                ] onUserRegistrationFailed Registration failed: SERVER_ENDED_ERROR on server x.x.x.125
I/d.a.p.p.PhoneImpl: [main                ] onUserAllRegistrationsFailed
    [main                ] ERROR-BUFFER : SERVER_ENDE_ERROR
I/d.a.p.p.PhoneImpl: [main                ] logged out by server -> flushing and notifying


But then it seems that the ClientSDK tries to automatically login again but only on the second SessionManager

I/d.a.p.p.PhoneImpl: [main                ] login credentials: <ext.> - <password>}
I/d.a.p.p.PhoneImpl: [main                ] login credentials: <ext.> - <password>}
I/d.a.p.p.PhoneImpl: [main                ] login credentials: <ext.> - <password>}
I/d.a.p.p.PhoneImpl: [main                ] login credentials: <ext.> - <password>}
I/d.a.p.p.PhoneImpl: [main                ] onCredentialAccepted: x.x.x.125 - our.uc.domain
I/d.a.p.p.PhoneImpl: [main                ] onCredentialAccepted: x.x.x.125 - our.uc.domain
I/d.a.p.p.PhoneImpl: [main                ] onCredentialAccepted: x.x.x.125 - our.uc.domain
I/d.a.p.p.PhoneImpl: [main                ] onAgentFeatureListChanged
I/d.a.p.p.PhoneImpl: [main                ] onAgentCapabilitiesChanged
I/d.a.p.p.PhoneImpl: [main                ] onCredentialAccepted: x.x.x.125 - our.uc.domain
I/zygote64: System.exit called, status: 0
I/AndroidRuntime: VM exiting with result code 0, cleanup skipped.


This results in the behaviour, that the client is still receiving call events even it should not be registered anymore.
What to do, to prevent the ClientSDK from loggin in again automatically?


Regards

Børge
aKhalimov



Joined: 01/10/2021 02:55:18
Messages: 7
Offline

Hi butterklopsi,

Thank you for your question!

onUserRegistrationFailedCallback has two parameters in it: User and boolean willRetry

willRetry is responsible for CSDK retry authorization requests. False for this value means registration failure is fatal and application must start a new registration after resolving the issue that blocked the registrations from succeeding. Fatal means that there are some certificate issues or server address is incorect, cases where user input is needed to make successful registration. In those cases there won't be any retry from CSDK side and user will need to fix those issues first and only after that register manually again.

If willRetry is true, CSDK will try to re-login again automatically.

Best regards,
Khalimov Albert
Avaya DevConnect Team
butterklopsi



Joined: 11/11/2015 02:17:01
Messages: 19
Offline

Hello,

thanks for explaining the documentation.
This method gets invoked by the sdk. so this is only an information i get from the sdk. i cant change this parameter to prevent it from misbehaving.
What can be done to prevent the sdk from doing reconnects where they should not be?

Regards

Børge
aKhalimov



Joined: 01/10/2021 02:55:18
Messages: 7
Offline

butterklopsi,

Could you, please, provide csdk logs as well?

Thank you in advance!

Best regards,
Khalimov Albert
Avaya DevConnect Team
 
 
Go to: