Valid toll free number from India is not being detected

816 views
Skip to first unread message

Meghaditya Roy Chaudhury

unread,
Feb 5, 2015, 12:24:43 AM2/5/15
to libphonenum...@googlegroups.com
I am using libPhoneNumber is a project as follows - 

Iterable<PhoneNumberMatch> phoneNumberMatchIter = phoneNumberUtil.findNumbers(meetingBody, "US", Leniency.VALID, 1000);

where meetingBody = "000 800 852 1444"

The number is not being detected.

Any idea why? Am I passing wrong arguments to the findNumbers method?

-Meghaditya



David Yonge-Mallo

unread,
Feb 5, 2015, 4:15:34 AM2/5/15
to libphonenum...@googlegroups.com
On 5 February 2015 at 06:24, Meghaditya Roy Chaudhury <aditya.ro...@gmail.com> wrote:
I am using libPhoneNumber is a project as follows - 

Iterable<PhoneNumberMatch> phoneNumberMatchIter = phoneNumberUtil.findNumbers(meetingBody, "US", Leniency.VALID, 1000);

If this is an India number, why are you using the region code "US" rather than "IN"?
 

where meetingBody = "000 800 852 1444"

Is this a valid India number? Have you successfully called it? What this number supposed to be, in E.164 format? It doesn't look like an India toll-free number.
 

The number is not being detected.

Any idea why? Am I passing wrong arguments to the findNumbers method?


--
David Yonge-Mallo
Software Engineer - Google Zürich
Îñţérñåţîöñåļîžåţîờñ and เภՇєгﻮคɭคςՇเςเչคՇเ๏ภ Engineering

Meghaditya Roy Chaudhury

unread,
Feb 5, 2015, 8:49:49 AM2/5/15
to libphonenum...@googlegroups.com


On Thursday, February 5, 2015 at 2:45:34 PM UTC+5:30, David Yonge-Mallo wrote:


On 5 February 2015 at 06:24, Meghaditya Roy Chaudhury <aditya.ro...@gmail.com> wrote:
I am using libPhoneNumber is a project as follows - 

Iterable<PhoneNumberMatch> phoneNumberMatchIter = phoneNumberUtil.findNumbers(meetingBody, "US", Leniency.VALID, 1000);

If this is an India number, why are you using the region code "US" rather than "IN"?

The default region for my project is US, but nevertheless, setting defaut 

 

where meetingBody = "000 800 852 1444"

Is this a valid India number? Have you successfully called it? What this number supposed to be, in E.164 format? It doesn't look like an India toll-free number.
 

The number is not being detected.

Any idea why? Am I passing wrong arguments to the findNumbers method?


Yes it is a valid number (http://en.wikipedia.org/wiki/Toll-free_telephone_number#Universal_International_Freephone_numbers). But it follows to the International free number format. I observed it works if I have '1 800 xxx xxxx', but not if '0 800 xxx xxxx'. I was looking at the unit test data for the 'libPhoneNumber' project, it showed me for international numbers it follows this as test data - 

private static final PhoneNumber INTERNATIONAL_TOLL_FREE = new PhoneNumber().setCountryCode(800).setNationalNumber(12345678L); 

Is the leading zero/zeroes the main issue here?

Meghaditya Roy Chaudhury

unread,
Feb 5, 2015, 8:50:56 AM2/5/15
to libphonenum...@googlegroups.com
Fixing typo.


On Thursday, February 5, 2015 at 7:19:49 PM UTC+5:30, Meghaditya Roy Chaudhury wrote:


On Thursday, February 5, 2015 at 2:45:34 PM UTC+5:30, David Yonge-Mallo wrote:


On 5 February 2015 at 06:24, Meghaditya Roy Chaudhury <aditya.ro...@gmail.com> wrote:
I am using libPhoneNumber is a project as follows - 

Iterable<PhoneNumberMatch> phoneNumberMatchIter = phoneNumberUtil.findNumbers(meetingBody, "US", Leniency.VALID, 1000);

If this is an India number, why are you using the region code "US" rather than "IN"?

The default region for my project is US, but nevertheless, setting default to 'IN' doesn't work either. 

David Yonge-Mallo

unread,
Feb 5, 2015, 9:08:45 AM2/5/15
to libphonenum...@googlegroups.com
On Thu, Feb 5, 2015 at 2:49 PM, Meghaditya Roy Chaudhury <aditya.ro...@gmail.com> wrote:


On Thursday, February 5, 2015 at 2:45:34 PM UTC+5:30, David Yonge-Mallo wrote:


On 5 February 2015 at 06:24, Meghaditya Roy Chaudhury <aditya.ro...@gmail.com> wrote:
I am using libPhoneNumber is a project as follows - 

Iterable<PhoneNumberMatch> phoneNumberMatchIter = phoneNumberUtil.findNumbers(meetingBody, "US", Leniency.VALID, 1000);

If this is an India number, why are you using the region code "US" rather than "IN"?

The default region for my project is US, but nevertheless, setting defaut 

If you're dialing from the US, an initial "011" is equivalent to an initial "+".

If you're dialing from India, it's "00" instead of "+".

You shouldn't have "000" in front of your number in either case. Have you successfully dialed this number from India? If so, what is the actual sequence of digits you have dialed?
 
 

where meetingBody = "000 800 852 1444"

Is this a valid India number? Have you successfully called it? What this number supposed to be, in E.164 format? It doesn't look like an India toll-free number.
 

The number is not being detected.

Any idea why? Am I passing wrong arguments to the findNumbers method?


Yes it is a valid number (http://en.wikipedia.org/wiki/Toll-free_telephone_number#Universal_International_Freephone_numbers). But it follows to the International free number format. I observed it works if I have '1 800 xxx xxxx', but not if '0 800 xxx xxxx'. I was looking at the unit test data for the 'libPhoneNumber' project, it showed me for international numbers it follows this as test data - 

private static final PhoneNumber INTERNATIONAL_TOLL_FREE = new PhoneNumber().setCountryCode(800).setNationalNumber(12345678L); 

Is the leading zero/zeroes the main issue here?

I think there is some confusion between the UIFNs (ones beginning with "+800" and having 8 digits) and toll-free numbers specific to each country.

For example, you can verify "+800 1234 5678" (8 digits) is a valid UIFN:

You can also see that "+1 800 555 1234" (7 digits) is a valid toll-free number in the US.

The number you listed does not appear to be a valid toll-free number for the US or India, nor a UIFN.
 

--
David Yonge-Mallo
Software Engineer - Google Zürich
Îñţérñåţîöñåļîžåţîờñ and เภՇєгﻮคɭคςՇเςเչคՇเ๏ภ Engineering

--
You received this message because you are subscribed to the Google Groups "libphonenumber-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libphonenumber-di...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Meghaditya Roy Chaudhury

unread,
Feb 5, 2015, 11:23:02 PM2/5/15
to libphonenum...@googlegroups.com
I have attached a file which contains a few numbers that one of the online conference provider GoToMeeting (http://www.gotomeeting.in/) gives. The toll-free number for India it gives as '000 800 100 7855' which I can successfully dial from my cellular network. But libphonenumber.appspot.com says it is NOT a possible number because its too long. Its not only for GoToMeeting but there are hundreds of examples of 000 800 xxx xxxx being used as toll-free number for India. 

untitled.txt

Shaopeng

unread,
Feb 6, 2015, 10:35:32 AM2/6/15
to libphonenum...@googlegroups.com
Thanks Meghaditya! It seems indeed there are lots of businesses in India using this kind of number. The fact it overlaps with the Indian IDD makes it a challenge to support properly. Could you raise a bug in our project? We will see what we can do. It is likely to be a metadata change, but we will know once we try it out.

Cheers,

Shaopeng

Meghaditya Roy Chaudhury

unread,
Feb 7, 2015, 5:07:29 AM2/7/15
to libphonenum...@googlegroups.com
Thanks Shaopeng! I have raised an issue here, its currently is in open state - 


-Meghaditya


On Thursday, February 5, 2015 at 10:54:43 AM UTC+5:30, Meghaditya Roy Chaudhury wrote:
Reply all
Reply to author
Forward
0 new messages