From 6349cf0b1dc0350f295ff72d99713c0c1468b8c0 Mon Sep 17 00:00:00 2001 From: klonfish Date: Wed, 30 Dec 2020 01:14:14 +0000 Subject: [PATCH] Add handler for linhone errors --- phoneinterface.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phoneinterface.py b/phoneinterface.py index ec0204c..de826a2 100644 --- a/phoneinterface.py +++ b/phoneinterface.py @@ -56,6 +56,7 @@ class PhoneInterface(object): self.__core.onLinphoneCallOutgoingRinging = self.on_LinphoneCallOutgoingRinging self.__core.onLinphoneCallConnected = self.on_LinphoneCallConnected self.__core.onLinphoneCallEnd = self.on_LinphoneCallEnd + self.__core.onLinphoneCallError = self.on_LinphoneCallError # Create and add all proxy configs for p in config.proxies: @@ -99,6 +100,10 @@ class PhoneInterface(object): def on_LinphoneCallEnd(self, event): self.run_callbacks(PhoneEvent.CallEnded) + def on_LinphoneCallError(self, event): + # TODO: Distinguish between different errors + self.run_callbacks(PhoneEvent.CallBusy) + def __pollthread(self): while self.__running: self.__core.process_event()