Author Message
butterklopsi
Joined: Nov 11, 2015
Messages: 22
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: Sep 23, 2019
Messages: 80
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: Nov 11, 2015
Messages: 22
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
aKhalimov012024
Joined: Sep 24, 2021
Messages: 1
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: Nov 11, 2015
Messages: 22
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
aKhalimov012024
Joined: Sep 24, 2021
Messages: 1
Offline
butterklopsi,

Could you, please, provide csdk logs as well?

Thank you in advance!

Best regards,
Khalimov Albert
Avaya DevConnect Team
butterklopsi
Joined: Nov 11, 2015
Messages: 22
Offline
Hello,

the logs from the csdk are in the third post in this thread. i already posted ervything i have.

Regards

Børge
aKhalimov012024
Joined: Sep 24, 2021
Messages: 1
Offline
Hi butterklopsi,

It depends on retry delay received from server. You may try to check with RegistrationEndedByServer and retryAfter timer to check where it is coming and may try to setup server to not provide this retry delay.

Thanks in advance!

Best regards,
Khalimov Albert
Avaya DevConnect Team
butterklopsi
Joined: Nov 11, 2015
Messages: 22
Offline
Hello,

there is no "RegistrationEndedByServer"-event. In the first post I already described:
When we test the same situation with our CSDK based app the new instance registeres and the old one receives some "onUserRegistrationFailed()" follwed by an "onUserAllRegistrationsFailed()".

Then it seems that it automatically tries to reconnect to the second SessionManager (described incl. logs in post #3) and the new registered devicve then also receives multipe times "onUserRegistrationFailed()" and then "onUserAllRegistrationsFailed()" as well.
The events for user unregistraion (onUserUnregistrationComplete, onUserUnregistrationSuccessful, onUserUnregistrationInProgress) events But all this are events that firing from SDK. This is only information i receive and nothing where i could block the reregistration. Again it looks to me like the ClienSDK does it automatically and I do not know how to prevent this. I talked to our specialists for the Aura system and they did not know anything to change a retry delay on server side.

Regards

Børge Grunicke
aKhalimov012024
Joined: Sep 24, 2021
Messages: 1
Offline
Hi butterklopsi,

Sorry for long delay with answer,
Could you, please, provide the complete logs files with version?
And could you, please, try to reproduce it with latest version https://www.devconnectprogram.com/site/global/products_resources/avaya_client_sdk/developer_downloads/4_20_0_0/index.gsp ?

Thank you in advance!

Best regards,
Khalimov Albert
Avaya DevConnect Team
Go to:   
Mobile view