Browse Source

Add handler for linhone errors

pylinphone
klonfish 3 years ago
parent
commit
6349cf0b1d
  1. 5
      phoneinterface.py

5
phoneinterface.py

@ -56,6 +56,7 @@ class PhoneInterface(object): @@ -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): @@ -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()

Loading…
Cancel
Save