Picture of dirk39
Registered 5 years 281 days
dirk39 Thursday, 31 October 2019, 05:17 PM
UserInitialize question
Hi, we are using websocket apis to integrate our CRM with Innovaphone v13 but we are facing into a problem.
After the successful RCC Initialize we call the UserInitialize function to listen messages from specific user (e.g. {"mt":"UserInitialize","api":"RCC","cn":"test-3"}). We noticed that WS return always: {"api":"RCC","mt":"UserInitializeResult","user":1} also when we change the cn.

Could you explain me why user remain always the same? Am I Doing something wrong?

Thanks
2013
Moderator Registered 16 years 129 days
Guntram Diehl (innovaphone) Thursday, 31 October 2019, 05:23 PM
Re: UserInitialize question
user is just a local id, valid only within you session. So if you just do UserInitialize for a single user, it is normal that it is always 1
Picture of dirk39
Registered 5 years 281 days
dirk39 Saturday, 2 November 2019, 10:32 AM
Re: UserInitialize question
Ok, but supposing that I have a NodeJS application that run multiple WebSocket to listen messages from several users, I always received user: 1.

Is Correct?
Picture of Sebastian Hayer-Lutz (innovaphone)
Moderator Registered 7 years 222 days
Sebastian Hayer-Lutz (innovaphone) Monday, 4 November 2019, 02:15 PM
Re: UserInitialize question
Hi Andrea,

like gundram says "user is just a local id, valid only within you session."

If you open multiple (different) sessions, and make within every session a UserInitialize you will recieve "1" on the first UserInitialize, correct.
Picture of dirk39
Registered 5 years 281 days
dirk39 Monday, 4 November 2019, 03:30 PM
Re: UserInitialize question
Hi Sebastian,
ok I understood. How could I deal with this situation? We have an event loop waiting for events from Apps but in this case, checking the "user" attribute I'm not able to understand which user is receiving a call.

Thanks
2013
Moderator Registered 16 years 129 days
Guntram Diehl (innovaphone) Monday, 4 November 2019, 03:47 PM
Re: UserInitialize question
You have to solve this in your infrastructure. Our applications sessions rely on the underlying websocket sessions. This is part of our archirecture, which provide a huge performance advantage.
← You can define your color theme preference here