daddyz / phonelib

Ruby gem for phone validation and formatting using google libphonenumber library data
MIT License
1.04k stars 130 forks source link

digit being removed from Mexico numbers #254

Closed farjadfazli closed 2 years ago

farjadfazli commented 2 years ago

We have a text-message based learning platform and noticed that a 1 is being removed from Mexico numbers when they are parsed with e164 formatting (e.g. +5215562000000 becomes +525562000000). Sending a message to the number without the 1 is working but when a reply comes in the From number includes the 1. We want to understand why the 1 is being removed here?

daddyz commented 2 years ago

Hi @farjadfazli , here is a link to Mexico Simplifies its Telephone Dialing Rules, which describes the change. Phonelib bases its parsing on Google's libphonenumber, you can check and see same result here. So no issue here.