On Fri, Mar 2, 2018 at 2:53 PM Stefan Sayer <stefan.sayer@xxxxxxxxx> wrote:
Hello,I think, some things the service worker cannot do, is open WebSocket
I'd think that the ServiceWorker itself is a js function, so it might
potentially be able to do a lot (i.e. run jssip, and possibly pass the
jssip instance later to the main js), but tbh I am probably the most
clueless about it...
- the first, nicest solution would be a simple 'wake up' PN, and the
app would then register and receive / accept / decline call or
message. For this to work
o the standard service worker implementation can't be used, we'd need
a custom one
o the service worker needs to be able to do quite a bit of work (run
SIP) without opening the main window, and in a way that it's seamless
if the main PWA is opened later
- the second solution would be to send content (CALL/MSG, sender and
potentially abbreviated msg content) in the PN. For this
o the 'backend' needs to prepare the PN content
o the default Angular5 service worker can be used
o the service worker needs to potentially feed back to
webpush-server, which needs to feed back to kamailio (cancel call,
mark msg read)
o the privacy is compromised in the case of google
Whether we can use the first solution at all depends on what's
possible in the service worker, so to do a decision makes more sense
once we have researched that.
Alternatively, we go for the second one for now, as its easier to
implement, and improve later if possible.
I don't have a strong preference which way to go; at the moment we do
send the method and caller in the PN. Saycel already has a test
instance set up afaik, which we could easily modify that short term,
or we can also set up another one.