Problem with long Austrian numbers

48 views
Skip to first unread message

Simone de Blasiis

unread,
May 19, 2022, 6:21:39 AM5/19/22
to libphonenumber-discuss
Hello,
we recently discovered that austrian numbers can range between 9 and 15 digits.
If we try to validate a number that is 14 digits long it gets rejected by the library as a not valid number.
The number exists and can be called.
Here is an example where I obfuscated some of the digits:

****Parsing Result:****
{"country_code":43,"national_number":22367108xxxxxx,"raw_input":"+4322367108xxxxxx","country_code_source":1}

****Validation Results:****
Result from isPossibleNumber(): false
Result from isPossibleNumberWithReason(): TOO_LONG
Note: Numbers that are not possible have type UNKNOWN, an unknown region, and are considered invalid.

****ShortNumberInfo Results:****
Result from isPossibleShortNumber: false
Result from isValidShortNumber: false

****Formatting Results:****
E164 format: invalid
Original format: +4322367108xxxxxx
National format: 22367108xxxxxx
International format: invalid
Out-of-country format from US: invalid
Out-of-country format from Switzerland: invalid

****AsYouTypeFormatter Results****
Char entered: + Output: +
Char entered: 4 Output: +4
Char entered: 3 Output: +43
Char entered: 2 Output: +43 2
Char entered: 2 Output: +43 22
Char entered: 3 Output: +43 223
Char entered: 6 Output: +43 2236
Char entered: 7 Output: +43 2236 7
Char entered: 1 Output: +43 2236 71
Char entered: 0 Output: +43 2236 710
Char entered: 8 Output: +43 2236 7108
Char entered: x Output: +43 2236 7108x
Char entered: x Output: +43 2236 7108xx
Char entered: x Output: +43 2236 7108xxx
Char entered: x Output: +43 2236 7108xxxx
Char entered: x Output: +43 2236 7108xxxxx
Char entered: x Output: +4322367108xxxxxx

David Cantrell

unread,
May 20, 2022, 6:41:22 AM5/20/22
to libphonenum...@googlegroups.com
On 19/05/2022 11:21, Simone de Blasiis wrote:
> Hello,
> we recently discovered that austrian numbers can range between 9 and 15
> digits.
> If we try to validate a number that is 14 digits long it gets rejected
> by the library as a not valid number.

E.164 says that they're invalid:
https://www.itu.int/rec/T-REC-E.164-201011-I/en

The number of digits in the country code and the national number
combined can not exceed 15. Given that the country code for Austria is
43 (two digits) the maximum permitted number of digits in an Austrian
national number is 13.

> The number exists and can be called.

I expect that you're dialling a number followed by an extension.

--
David Cantrell
Reply all
Reply to author
Forward
0 new messages