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