TrevorPilley / phone-number-parser

A .NET library for parsing phone numbers.
MIT License
25 stars 2 forks source link

Add more german mobile provider numbers #723

Open shriek1 opened 2 hours ago

shriek1 commented 2 hours ago

Didn't think i'd open another one so soon but here we are.

Example number i got was +491556196103 that doesn't seem to work. Found this definition for the length of the numbers: https://www.bundesnetzagentur.de/DE/Fachthemen/Telekommunikation/Nummerierung/MobileDienste/LaengeRufnummernbloecke/start.html

And one this page they have a CSV file with the title "RNB Mobile Dienste (CSV-Datei) (csv / 2 KB)" that has all the numbers for the different mobile providers.

What I think needs to be changed is the block from 15560 to 15569 needs to be included. Currently only 15566 works as per the definition. There might be more to add, I didn't check for more on those lists yet.

Oh, and just to add a bit more. There is also a list of more service numbers including the link for the mobile numbers: https://www.bundesnetzagentur.de/DE/Fachthemen/Telekommunikation/Nummerierung/start.html

TrevorPilley commented 1 hour ago

Thanks for highlighting, I’ll have a look, I remember the German numbering plan being the most complicated I’d seen when I implemented it so it’s entirely possible I missed something or a new range has been introduced since!

TrevorPilley commented 1 hour ago

This is the reference I used https://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000510006PDFE.pdf which the latest version they have published and doesn’t include the NDC you highlighted so I suspect there will be others! I’ll work through it although it may take a bit longer as that PDF is 198 pages and some of the links you sent don’t have an English version.

shriek1 commented 47 minutes ago

If you need help understanding some of the text let me know. The document you linked seems to be based on the link i posted. Also just found yet another list that seems to have all the landline number ranges. https://www.bundesnetzagentur.de/DE/Fachthemen/Telekommunikation/Nummerierung/ONRufnr/ON_Verzeichnisse_RNB/start.html The CSV even goes so far as to define multiple ranges per city. Don't see that being worth the time though and would just go with the length of the numbers. Those also seem to match the lengths from your PDF file.