Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhoneNumberType of London UK Numbers show as UNKNOWN #117

Open
atalai opened this issue May 18, 2023 · 0 comments
Open

PhoneNumberType of London UK Numbers show as UNKNOWN #117

atalai opened this issue May 18, 2023 · 0 comments

Comments

@atalai
Copy link

atalai commented May 18, 2023

Certain legitimate FIXED_LINE_OR_MOBILE phone numbers for the London(UK) area are categorized as UNKNOWN. We should expect FIXED_LINE, MOBILE, or FIXED_LINE_OR_MOBILE as the PhoneNumberType.

Example:

phoneNumber := "+442045204776"
n, err := libphonenumber.Parse(phoneNumber, "ZZ")
if err != nil {
	fmt.Println("Error seen on ", phoneNumber)
}

libphonenumberDeducedNumberType := libphonenumber.GetNumberType(n)
fmt.Println(libphonenumberDeducedNumberType, n)

Note it does not matter what defaultRegion is passed in the Parse() method. Both UK, GB, ZZ will result in libphonenumberDeducedNumberType to be UNKNOWN.

The issue seems to be present in all: "+44 20 XXXX YYYY" numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant