You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TLDR: the xml phonebook provided via Fritz!Box Lua seems to contain all internal numbers, too.
I tried to get all the entries for my phonebook id 2, which is for cold calls only. To do so, I used:
contacts = fp.get_all_names(2)
for name, numbers in contacts.items():
print(name, numbers)
However it seems every (!) phonebook will also include internal numbers as well, even in my list for cold calls, like: (I removed private numbers and names). [Possible solution below]
Alle (Rundruf) ['**9']
Anrufbeantworter ['**600', '**605']
Faxgerät ['**1']
FRITZ!App Fon (LGE LG-Hxxx, Name) ['**622']
Gewinnspiel ['0892213xxx']
I1 Nummer ['**610']
I2 Nummer ['**612']
I3 Nummer ['**613']
I4 Nummer ['**611']
ISDN/DECT Rundruf ['**50']
Lotto Berlin ['030422068xxx']
Lotto Neuss ['021317085xxx']
Names iPad ['**621']
Names iPhone ['**620']
Stromanbieter ['0493058877xxx']
Wecker 1 ['**41']
Wecker 2 ['**42']
Wecker 3 ['**43']
I checked the URL for the XML which is downloaded, unfortunately it also contains these internal numbers, it's a 7490 model here. So how could we filter them? I had a glimpse in the XML:
so only type="home" (wrong, see * below) seems to represent a real entry.
I could create an own branch and a pull request, if wished.
However, I've seen the processor for the xml.etree in the processor code is heavily examining node values, not attributes, before adding e.g the numbers via ValueSequencer just as a simple list. I guess, the author is more into this ;-) In case of a telephony record when the node is processed it would be available as: node.attrib with a dict of 3 entries, the keys are 'type', 'vanity', 'prio'. I guess it would be best to also extract at least the type. The other way would be to manipulate the xml.etree before processing it, e.g. by removing all (but full contact) entries where type != "home" (*)
(*) But, to make it even worse.. if comparing this with section "5.1 Phonebook Content" in https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/x_contactSCPD.pdf
it seems "home" is not the only value for "real" records, it could be also e.g. "work" etc. So we have to find out first the values for "real" records (whitelisting), or otherwise need a blacklist ("intern", "memo", "" spotted so far).
I just filled out anything in the Fritzbox for an invented whitelist number and set all the stuff, it seems "home", "mobile", "work" and "fax_work" would do the job for the whitelist.
Heard a rumour that there are also other "internal" numbers, starting with #. So I tend to say we should keep only entries starting with a digit (\d) and remove ANYTHING ELSE..
TLDR: the xml phonebook provided via Fritz!Box Lua seems to contain all internal numbers, too.
I tried to get all the entries for my phonebook id 2, which is for cold calls only. To do so, I used:
However it seems every (!) phonebook will also include internal numbers as well, even in my list for cold calls, like: (I removed private numbers and names). [Possible solution below]
I checked the URL for the XML which is downloaded, unfortunately it also contains these internal numbers, it's a 7490 model here. So how could we filter them? I had a glimpse in the XML:
so type="intern" seems to represent an internal number, I've also seen "memo" or "". And:
so only type="home" (wrong, see * below) seems to represent a real entry.
I could create an own branch and a pull request, if wished.
However, I've seen the processor for the xml.etree in the processor code is heavily examining node values, not attributes, before adding e.g the numbers via ValueSequencer just as a simple list. I guess, the author is more into this ;-) In case of a telephony record when the node is processed it would be available as: node.attrib with a dict of 3 entries, the keys are 'type', 'vanity', 'prio'. I guess it would be best to also extract at least the type. The other way would be to manipulate the xml.etree before processing it, e.g. by removing all (but full contact) entries where type != "home" (*)
(*) But, to make it even worse.. if comparing this with section "5.1 Phonebook Content" in https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/x_contactSCPD.pdf
it seems "home" is not the only value for "real" records, it could be also e.g. "work" etc. So we have to find out first the values for "real" records (whitelisting), or otherwise need a blacklist ("intern", "memo", "" spotted so far).
I just filled out anything in the Fritzbox for an invented whitelist number and set all the stuff, it seems "home", "mobile", "work" and "fax_work" would do the job for the whitelist.
Another very simple solution would be just to skip all numbers starting with "**", see above.
The text was updated successfully, but these errors were encountered: