Andreas Fink
Moderator Registered 12 years 277 days
Andreas Fink (innovaphone) Thursday, 6 October 2022, 06:40 PM in response to Marko 6403
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
← You can define your color theme preference here