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

Where is PhoneNumberToCarrierMapper and PhoneNumberToTimeZonesMapper #41

Open
swtanggara opened this issue Sep 26, 2017 · 12 comments
Open

Comments

@swtanggara
Copy link

Hi @aidanbebbington,

Thanks for your work on this port of library. I want to ask this because I need the PhoneNumberToCarrierMapper and PhoneNumberToTimeZonesMapper classes, which is not found in this port. Or is there anyone else you guys try to present these classes in this port. If I want add these classes on this repository, can you please guide me to do that.

Thanks.

@Danthar
Copy link

Danthar commented Sep 29, 2017

PhoneNumberToCarrier mapper? What would you expect that to do ? Because numbers change carrier all the time, so i wonder how that would work in a library such as this :)

@swtanggara
Copy link
Author

swtanggara commented Sep 29, 2017

Hi @Danthar,

Sorry for my incomplete question. I found these classes (in java) on the main repository of https://github.com/googlei18n/libphonenumber (https://github.com/googlei18n/libphonenumber/blob/master/java/carrier/src/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.java and https://github.com/googlei18n/libphonenumber/blob/master/java/geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java).

I assume that this repo not updated or synced with that original repo. That original repo may now have a lot of changes.

@Danthar
Copy link

Danthar commented Sep 29, 2017

Ah i see. Its this comment that explains it: https://github.com/googlei18n/libphonenumber/blob/master/java/carrier/src/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.java#L109

Its only valid for regions which do not support number portability. But even then i'd say its very iffy. Having no idea how often this information changes. You'd have to really know what your doing when you are relying on such a static source of information.

@swtanggara
Copy link
Author

Yeah you're right, this validating phone number stuff is indeed relying on a lot of static information.

Currently I'm trying to create my own port of libphonenumber on local by examining at two source (original libphonenumber and this libphonenumber-csharp), and to be honest it's hard because my limited expertise both on C# and Java.

@Danthar
Copy link

Danthar commented Sep 29, 2017

Great way to learn :) Just be glad its not scala

@twcclegg
Copy link
Owner

twcclegg commented Oct 1, 2017

@swtanggara The port is most certainly lacking compared to the source. I've been working to bring it up to parity since I took over keeping it up to date. If you would like I could put this higher up in my to-do list currently have been porting things rather ad hoc.

@swtanggara
Copy link
Author

@twcclegg, thanks for your response. It would be nice if you consider to put this on your priorities. I've decided to "give up" to port it on my local (I'm stuck in protobuf serialization and asynchronous read/write things). Maybe next time, when I already know how to port Java to C#.

The https://github.com/akkadotnet/akka.net project, has a lot of classes that equivalent in Java and C# (e.g AtomicReference => http://api.getakka.net/docs/stable/html/A8A879A7.htm), that I found used in original libphonenumber. Maybe we can consult these porting things to them? How is it @Danthar....hehehe?

@m-jepson
Copy link

I actually need this, VoIP routing is mostly based on the original carrier of the number. I know that does not make sense, but going through all the porting data of the globe simply takes too long for an international VoIP platform.
Are there any plans to include this functionality?

@twcclegg
Copy link
Owner

twcclegg commented Dec 3, 2020

It hasn't been a priority given that there hasn't been any discussion for this is quite a while. It does seem like it should be straightforward enough to port though, I can try to look into it or if anyone else wants to.

@Rasmus715
Copy link

Will be pleased to see this functionality as well, if it still possible after that much time.

@andyfmking
Copy link

This would be a very good addition. Been waiting for it for so long

@twcclegg
Copy link
Owner

I would be more than thrilled if anyone wanted to contribute to this. Unfortunately I am the only maintainer of the repo and it is effectively in maintenance only mode currently.

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

6 participants