Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 178 days
Daniel Deterding (innovaphone) Wednesday, 9 June 2021, 01:10 PM in response to Uros 1135
Re: Auth login to app via websocket
Hi Uros,

if you need to login to your Reporting instance to retrieve CSV files, you must login with websocket to wss://app.innovaphone.softnet.si/softnet/reporting (the build number doesn't matter).

The password must be the password of your reporting instance.
During a standard install scenario, a random password is generated, so you have no knowledge of this password.
You could now set an own password on the reporting instance and configure this password in the Reporting app objects (reporting, calllist, calllistapi), but I wouldn't recommend this method as this password must be maintained on two different sides (PBX and reporting instance in the AP Manager).

Instead we have a Services API where you can retrieve a login for a specific App:
https://sdk.innovaphone.com/doc/appwebsocket/Services.htm#GetServiceLogin

Configuration:
  • create a new App object inside your PBX (the name and password is up to you)
  • tick the Services checkmark under Apps to allow access to the Services API
  • tick the reporting checkmark under App to allow access to reporting
Login flow:
  • establish an AppWebsocket connection to your own App object (URL is wss://pbx_ip/PBX0/APPS/websocket)
  • after a successfull AppLoginResult, establish a second AppWebsocket connection to the Reporting service (URL wss://app.innovaphone.softnet.si/softnet/reporting), but just send the initial AppChallenge to retrieve a challenge
  • with this challenge, trigger the GetServiceLogin message on your first websocket connection, wait for GetServiceLoginResult and use the received properties to send the AppLogin on your second connection to the Reporting (you basically get the digest which you simply need to forward in the second AppLogin together with all the other parameters and don't forget the info property, as this is calculated within the digest too) (the properties key and salt can be ignored for your purpose)
  • after a successfull login on this second connection, you can follow the description in the reporting wiki to retrieve a key which can be used inside the final GET request
Greetings,
Daniel
← You can define your color theme preference here