Picture of udo
Registered 1 year 348 days
udo Thursday, 20 April 2023, 04:45 PM
Comunicate with pbx via websocket during user session at AppService (c++)
Hi,
during startup between App (js) and AppService (c++) on service side we get two times a call of callback method AppWebSocketConnectComplete. First is a connect from pbx and message 'mt: PbxInfo' is provided. In this situation the sip value of the session is the name of the application. And in this situation the websocket can be used to call e.g. 'api: PbxAdminApi'. But this connection gets closed afterwards and we receive a second connection. Now the sip value at the session is the name of the user. It seems we have a user session now between App and AppService. Unfortunatly the new websocket can no longer be used to call e.g. 'api: PbxAdminApi'. This behaviour is as documented. Within forum i found the hint, that somewhere within the instance of the service, a pbx connection may be located. Here the copy of the hint:
Better solution would be to do this from App Service, not from client , where you have already a working websocket connection from the PBX.
And here is the link: https://forum.innovaphone.com/moodle2/mod/forum/discuss.php?d=26966
Somehow i am not able to find the object within the code where this websocket is located. Perhaps you can give we a hint where to search.

Thanks Udo


Andreas Fink
Moderator Registered 13 years 43 days
Andreas Fink (innovaphone) Wednesday, 26 April 2023, 11:14 AM
Re: Comunicate with pbx via websocket during user session at AppService (c++)
Hello Udo,

the App Service handles multiple WebSocket connections:
  • WebSocket connection from the PBX, that is established from the corresponding App Object, if "WebSocket" option is activated on this App Object. In case multiple PBXes are available in the system (Master/Slave) also multiple connections from the PBXes are possible
  • WebSocket connection from the App Client (the app code running in the iframe of the app)
In your case the connection from the PBX is established, but is for some reason ("But this connection gets closed afterwards and we receive a second connection."). This should not happen - the connection persist so long the PBX can reach the App Service and is booted.

At this point it would be necessary to take a look on the app instance log. Please activate the flag "AppWebsocket" in the diagnostics of the app instance and post it here.

Best Regards
Andreas Fink
Picture of udo
Registered 1 year 348 days
udo Wednesday, 26 April 2023, 03:19 PM
Re: Comunicate with pbx via websocket during user session at AppService (c++)
Hi Andreas,
thank you for clarification. I extended the log output and found the behaviour as you described. It seems that during investigation, i got lost. Thank you for the hint with multiple pbx connections at master/slave constellation.

Best regards
Udo
Picture of david davidwilly
Registered 308 days 19 hours
david davidwilly Tuesday, 28 May 2024, 09:41 AM in response to udo
Re: Comunicate with pbx via websocket during user session at AppService (c++)
The HP HPE0-V25 Exam Questions, also known as Delta - Implementing Secure Solutions for Virtual Private Networks, is designed to assess an individual's proficiency in implementing secure solutions for virtual private networks (VPNs) using HP technologies. It evaluates the candidate's ability to configure, validate, and troubleshoot secure site-to-site and remote access VPNs.

In today's interconnected world, where data security is paramount, the demand for skilled professionals capable of implementing robust VPN solutions is ever-increasing. The HP HPE0-V25 exam serves as a benchmark for assessing the competency of IT professionals in this crucial domain. Earning certification not only validates one's skills but also enhances career prospects in the competitive IT landscape.
← You can define your color theme preference here