Picture of Richard 5560
Registered 3 years 289 days
Richard 5560 Monday, 23 August 2021, 05:36 AM
WebSockets: determine the active device when using hotdesking
Hi guys,
We integrate with Innovaphone r13.1 via the WebSockets API.
We have customers wanting to use the Hotdesking functionality part of the UsersAdmin app to change their active device from their physical phone to MyApps and back.

Within the websocket API it represents each device associated with a user separately. When a call is offered, we receive alerting events on each device and we can select which device we want to answer the call on.

Our customers are wanting to use the MyApps to control the active device, so we would like to know how we can get access to this information via the WebSocket API?
We have been told we can access it via the Phone-API, but this appears to be a javascript based client API, so doesn't look like it will be appropriate.


Kind Regards
Richard.
Andreas Fink
Moderator Registered 13 years 110 days
Andreas Fink (innovaphone) Wednesday, 29 September 2021, 12:27 PM
Re: WebSockets: determine the active device when using hotdesking
Hello Richard,

excuse me for the delay.

> We have customers wanting to use the Hotdesking
> functionality part of the UsersAdmin app to change
> their active device from their physical phone to MyApps
> and back.

The Hotdesking setting in the UsersAdmin App just configured an additional Device at the User Object, that has H323-ID/SIP as HW-ID. This configuration allows to register an IP-phone using username/password, instead of MAC address.


> Within the websocket API it represents each device
> associated with a user separately. When a call is offered,
> we receive alerting events on each device and we can
> select which device we want to answer the call on.

Right, you get the device list via Devices message of the RCC API.

> Our customers are wanting to use the MyApps to
> control the active device, so we would like to
> know how we can get access to this information
> via the WebSocket API?

I'm not sure if I understand correctly, what exactly is "active device" in your case. Are we talking about default app for telephony, defined via myApps Client (home screen > burger menu top/right > DEFAULT APPS)?

Best Regards
Andreas Fink
Picture of Richard 5560
Registered 3 years 289 days
Richard 5560 Monday, 4 October 2021, 04:03 AM
Re: WebSockets: determine the active device when using hotdesking
Hi Andreas,

I've attached a document on the information we have on how we believe the customer is using this feature. We've actually had a lot of difficulty getting clarity on how this is configured and how they are using it.
We are not familiar with the configuration of the feature so we may also need some assistance in correcting any configuration for our lab system.

So hopefully you will understand how the feature works based on the information i have provided. Please let me know if you need any other information and i will aim to get it for you.

Kind Regards
Richard.
Innovaphone_Hotdesking.docx
Andreas Fink
Moderator Registered 13 years 110 days
Andreas Fink (innovaphone) Monday, 4 October 2021, 12:09 PM
Re: WebSockets: determine the active device when using hotdesking
Hello Richard,

the Hotdesking functionality from the point of view of an IP-phone is just a switch, that enables a VoIP registration on this device with a username + password (usually it is a MAC address of the device + TLS certificate). You can press the hotdesking button and type in userna and password to login. Press the hotdesking button to log out.

The hotdesking configuration from the PBX point of view is just a setting, that enables a VoIP registration/login using username/password combination (usually this is not enabled, so login via MAC is only possible). The only configuration change is a new entry in the Devices list of the User Object, where the "Hardware Id" matches the "Name" of the User Object.

What the customer asks you is not really a hotdesking feature, but just switching between active devices in the myApps client. This is the variant b) in your question number 3.

The switching between phone devices is in fact selecting default app for the telephony in the myApps client. This functionality is based on a client API between myApps cleint and the PBX.

The myApps client gets a message from the PBX with a list of APIs. The API "com.innovaphone.phone" is provided by registered phones. Here is an example, with one phone registered by MAC and one registered by hotdesking (johndoe):

{
"mt": "ApiUpdate",
"defaultApiProviders": {
"com.innovaphone.chat": "chat",
"com.innovaphone.phone": "dev:johndoe"
},
"apis": {
"com.innovaphone.phone": {
"dev:0090334f21c1": {
"info": {
"type": "phone"
},
"model": {},
"title": "sifi IP Phone IP111",
"url": "http://localhost:10008/appproxy/ext/sifi.innovaphone.com/PBX0/APPS/phone/phone.htm"
},
"dev:johndoe": {
"info": {
"type": "phone"
},
"model": {},
"title": "hotdesking",
"url": "http://localhost:10008/appproxy/ext/sifi.innovaphone.com/PBX0/APPS/phone/phone.htm"
}
}
}
}

This way you can detect the active device - it is the default API provider for the "com.innovaphone.phon" API.



Regarding questions about your system - it seems to be, multiple settings for Devices and Profile App are not set correctly. Usually if you use the installer wizard to setup the PBX, all required settings are set automatically. If you have the possibility to run the install again and configure your PBX from scratch, this would be a fastest solution.

Best Regards
Andreas Fink
Picture of Richard 5560
Registered 3 years 289 days
Richard 5560 Tuesday, 12 October 2021, 04:20 AM
Re: WebSockets: determine the active device when using hotdesking
Hi Andreas,

Our application is performing third party call control using the server websocket APIs (RCC, PbxAdminApi, PbxApi).
I currently do not see our application receiving the ApiUpdate message.

Can you please confirm this is available on the server APIs or is this message only sent to MyApps?

Kind Regards
Richard

Andreas Fink
Moderator Registered 13 years 110 days
Andreas Fink (innovaphone) Tuesday, 12 October 2021, 07:32 AM
Re: WebSockets: determine the active device when using hotdesking
Hello Richard,

exactly, this is a client API, that requires an active myApps session with specific user, so you will never get this messages on PbxAdminApi.

There is a possibility for ImpersonationApi to act upon a user, but i never tested it this way.

I will check, an give you a followup.

Best Regards
Andreas Fink
Picture of Richard 5560
Registered 3 years 289 days
Richard 5560 Tuesday, 2 November 2021, 01:36 AM
Re: WebSockets: determine the active device when using hotdesking
Hi Andreas,

Were you able to determine if there is a way we can get this information yet? Or if not can we request an enhancement be added to provide this?

Kind Regards
Richard.
Andreas Fink
Moderator Registered 13 years 110 days
Andreas Fink (innovaphone) Wednesday, 3 November 2021, 06:34 PM
Re: WebSockets: determine the active device when using hotdesking
Hello Richard,

with the current implementation of the APIs it is not possible to map default phone device of the myApps Client to an RCC device. The info about the default telephony device is not stored in the PBX and not signalled in any way to the PBX.

To summarize what exactly is required:

- your server application controls user phones via RCC API
- some users have multiple phones, so a correct phone must be used to setup an RCC session
- users want to switch between phones using myApps client (Office, Home, Mobile etc.)

Please correct me, if I'm wrong with my assumptions.


We see multiple approaches, that could guide to a solution.

First: implement a myApps App, that can be used by a User to select device for RCC. This should be not very complicated: fetch all devices of a user, render UI with a list of devices, store selected device in your application. This should work out of the box with current APIs.


Second approach: you could monitor via RCC the phones of a user and store last phone that was used/sent some signalling like going of hook. This phone/device should be used for RCC by your application. Here some changes in the RCC API of the PBX may be required in order to be able to monitor all devices of a user, before UserInitialize was done.

Can you imagine to use one of this approaches? Would it be a solution for your problem?

Best Regards
Andreas Fink
← You can define your color theme preference here