From ec018912635686a9e24ebb7e235e7f7d8f877f49 Mon Sep 17 00:00:00 2001 From: klonfish Date: Tue, 19 May 2015 22:16:07 +0200 Subject: [PATCH] Decline call when handset is not on the fork --- fetapdtest.py | 3 +++ phoneinterface.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/fetapdtest.py b/fetapdtest.py index d717101..bbffb11 100644 --- a/fetapdtest.py +++ b/fetapdtest.py @@ -192,6 +192,9 @@ class DialingState(AbstractState): self._controller.get_phone().call(self.__number) return ConnectingState + def on_incoming_call(self): + self._controller.get_phone().decline_call() + class StateMachineController(object): def __init__(self, phone, feap): self.__state = InitState(self) diff --git a/phoneinterface.py b/phoneinterface.py index 960b72f..fece6cd 100644 --- a/phoneinterface.py +++ b/phoneinterface.py @@ -113,6 +113,9 @@ class PhoneInterface(object): def accept_call(self): self.__core.accept_call(self.__core.current_call) + def decline_call(self): + self.__core.decline_call(self.__core.current_call, linphone.Reason.Busy) + def end_call(self): self.__core.terminate_call(self.__core.current_call)