Add ring event for webinterface

This commit is contained in:
sqozz 2021-02-25 14:03:47 +01:00
parent 8826ca6fb1
commit a74f7f19cf

View file

@ -21,6 +21,11 @@ class WebIdleState(IdleState):
self.web = web self.web = web
super().__init__(web.controller) super().__init__(web.controller)
def on_incoming_call(self):
super().on_incoming_call()
remote_number = self.web.controller.phone.get_remote_number()
self.web.send_event({"event": "incoming_call", "data": {"from": remote_number}})
class WebSchelltState(SchelltState): class WebSchelltState(SchelltState):
def __init__(self, web): def __init__(self, web):
self.web = web self.web = web