Re: Service - cannot connect to PbxApi a second time
Hello Marko,
i'm sorry for the delay.
The WebSocket connections are handled in the background by the generic app binary, which uses an Api object as a singleton. This is actually what you have already figured out.
An example for handling of the incoming connections can be found here:
https://github.com/innovaphone/jsbadgeexample/blob/main/jsbadgeexample/jsbadgeexample/innovaphone-jsbadgeexampleservice.js
Especially a cleanup in case of the PBX reboot is useful (onclose callback).
Best Regards
Andreas Fink