Status Update
Comments
kk...@google.com <kk...@google.com> #2
From the method's comment, it is only validating against the number length. So what is missing here is to check:
- If the number is a valid short number - like the equivalent of US 911:
112
or110
... in Germany there ist also115
and 5 digit numbers starting with 118 (118xx
) and 6 digit numbers starting with 116 valid short numbers (116xxx
) - If the used Region is
hasNationalPrefix()
- If the given number has not used a CountryCode nor a TruncCode
Step 2 & 3 can be done with the currently given set of information and methods of the library (I can provide Java example code for a fix). The First step needs more / accurate information (maybe I am just not aware, that it is already present in some files / configuration) - so I made a separate addition in Java for this kind of check, but I just configured the data for Region DE
)
em...@anrufliste.com <em...@anrufliste.com> #3
Sorry for being late to this.
@
I understand your point, and it is one of the frustrating facts that the lengths of German fixed-line numbers can be as short as 5 digits. We have seen real German fixed-line numbers of 5-7 digits; it is not just numbering authority not defined ranges granular enough. Metadata file comment about this
They say the total number length should be minimum 6 digits - the end subscriber number length (i.e excluding area code) is should not be less than 2 digits. I am not sure of reason why we have added support to 5 digit numbers. I will check on this.
If you exclude 5 digit ranges [34]0XXX and [68]9XXX all 6-15 digit ranges (with valid prefixes/area-codes as per library) are potential full length numbers as per Telephone numbering authority in Germany. So when it comes to 556677, 55X are valid area codes followed by 3 digit subscriber numbers. This is the reason why 556677 is considered as IS_POSSIBLE than IS_POSSIBLE_LOCAL_ONLY. 556677 is a potential full length number - i.e with area ccde.
Recommendation: If the incoming number length is greater than 5, I recommend you to bank on isPossibleWithReason API itself and try not change area code. You can also use PhoneNumberUtil.getLengthOfGeographicalAreaCode() to pull out potential area code from the phonenuumber.
Please let us know if some of the above things are wrong, we need to learn and be confident of the metadata changes that we need to make. Thanks so much for your patience.
kk...@google.com <kk...@google.com> #4
@ point 1:
When using the PhoneNumberUtil.isPossible() or isPossibleWithReason it checks against only the phonenumber metadata. ShortNumberInfo checks against short number metadata. As it has become common that length of short numbers overlap with the phone numbers, we need to check against both util APIs if there is a possibility that incoming numbers can be short numbers also.
General good practice is 'when PhoneNumberUtil.isValid() is returned false (a much granular check than isPossible() APIs), check against ShortNumberInfo APIs'. Please see attached screenshot for sample input '116123', it is a valid short code; possible phone number but not valid phone number.
@2 and 3 points:
Could you please aloborate the use case with an example?
@ Reason why we have added support for 5 digit German fixed-line numbers:
- Sample number that woked - reported by user 030 155.
- ITU also says minimum digits for 30, 69.. ranges is 5:
em...@anrufliste.com <em...@anrufliste.com> #5
Thanks for the detailed postings. I will try to answer every aspect you mentioned, but not in a lengthy post but rather in dedicated answers (with some time in between, because I will search collect references material, so please do not be disappointed if it will take some time between my answers).
So starting with the short number topic. Your example of 116123 is misleading. Your referenced document stated this would be a legal number and indeed this number has been assigned by the German postal office:
We need to distinguish between those area independent short numbers and the number length within an area. Since decades this length has been standardised, but shorter numbers which have been assigned before are still valid until the customer gives that number back. So even if the number plan states a specific min-length this regulates new number assignment only and shorter are still valid and assigned. Those length can’t directly be checked directly but indirect by looking for the trunk code (but that will be the next post)
Description
Reporter comments: Some abbreviations where still in use, those have been replaced by the long form. Some abbreviations have been replaced partly wrong, that have been corrected.
Eg: 493332|Schwedt/Oder ------> 493332|Schwedt an der Oder
4933454|Wölsickendorf/Wollenberg -------> 4933454|Wölsickendorf bei Wollenberg
49340|Dessau Anh -------> 49340|Dessau Anhalt etc..