diff --git a/avm/__init__.py b/avm/__init__.py index 948017750..976fc607a 100644 --- a/avm/__init__.py +++ b/avm/__init__.py @@ -594,8 +594,11 @@ def set_call_origin(self, phone_name: str): return self.fritz_device.set_call_origin(phone_name) @NoAttributeError - def get_calllist(self): - return self.fritz_device.get_calllist_from_cache() + def get_calllist(self, filter_incoming: str = ''): + if filter_incoming : + return self.fritz_device.get_calllist(filter_incoming) + else : + return self.fritz_device.get_calllist_from_cache() @NoAttributeError def get_phone_name(self, index: int = 1): @@ -607,7 +610,7 @@ def get_phone_numbers_by_name(self, name: str = '', phonebook_id: int = 0): @NoAttributeError def get_contact_name_by_phone_number(self, phone_number: str = '', phonebook_id: int = 0): - return self.fritz_device.get_phone_numbers_by_name(phone_number, phonebook_id) + return self.fritz_device.get_contact_name_by_phone_number(phone_number, phonebook_id) @NoAttributeError def get_device_log_from_lua(self): @@ -1381,7 +1384,7 @@ def get_contact_name_by_phone_number(self, phone_number: str = '', phonebook_id: # phonebook_url = self.client.InternetGatewayDevice.X_AVM_DE_OnTel.GetPhonebook(NewPhonebookID=phonebook_id)['NewPhonebookURL'] phonebook_url = to_str(self._poll_fritz_device('phonebook_url', phonebook_id, enforce_read=True)) if not phonebook_url: - return '' + return phone_number phonebooks = request_response_to_xml(self._request(phonebook_url, self._timeout, self.verify)) if phonebooks: @@ -1395,7 +1398,7 @@ def get_contact_name_by_phone_number(self, phone_number: str = '', phonebook_id: else: self.logger.error("Phonebook not available on the FritzDevice") - return '' + return phone_number def get_phone_numbers_by_name(self, name: str = '', phonebook_id: int = 0) -> dict: """Get phone number from phone book by contact"""