📜 ⬆️ ⬇️

Programmers misconceptions about phone numbers

The list was compiled by Java, C ++ and JavaScript developers of the libphonenumber library for parsing, formatting and checking phone numbers.

Telephone numbers are used everywhere and for a long time. Therefore, it is very surprising how many delusions remain with the programmers regarding them.

1. Phone numbers valid now will always remain valid. Phone numbers of a certain type (for example, mobile) will never change type .
')
The phone number connected today can be disconnected tomorrow. Tomorrow toll free number can be paid today. The carrier can expand the range of available numbers by adding an additional figure and increasing the length of the number.

Hint Do not save phone number properties, such as validity or type. Check this information with the library when necessary.

2. The telephone number uniquely identifies the person .

Not so long ago, when mobile phones did not exist, it was considered quite normal to have one home phone for the whole family. In some parts of the world, this has been preserved until now, when relatives (or even friends) use a common telephone number.

3. A person has only one telephone number .

Obviously, this is not always the case.

4. Telephone numbers cannot be reused .

Old numbers are reintroduced and distributed to other people.

5. Each country code corresponds to exactly one country .

The USA, Canada and several Caribbean islands have the same code +1. Russia and Kazakhstan share the code +7. And these are not the only examples!

6. Only one code corresponds to each country .

At the moment (March 2016), phones in the disputed and not all recognized territory of Kosovo can be reached through the national codes of Serbia (+381), Slovenia (+386) or Monaco (+377), depending on where and when the number was issued.

Hint Use the phone widget to push users to enter a phone number in international format.

7. A telephone number can be dialed from anywhere .

Some numbers can only be dialed inland. Some are dialed from a certain group of countries, for example, as international numbers 00800. Some are dialed only if the subscriber is served by a specific telecom operator.

8. There are only two ways to dial a number: internationally or locally .

Some numbers require different prefixes, depending on where the number is dialed from; which device and which device you are calling from; whether you are inside or outside a specific geographic region.

Examples:


Hint Use formatForMobileDialling to get a specific number that the user must dial from his mobile phone.

9. To make the number available for dialing, just change the prefix .

In Argentina, for internal calls, you need to insert the digits "15" after the region code, but before the local number, and the digit "9" after the country code (54) needs to be deleted. So the international number +54 9 2982 123456 turns into a local number 02982 15 123456.

10. No real telephone number prefix can be a real telephone number .

In some countries it is possible to get to another subscriber, if you dial additional numbers after the phone number. Thus, the number 12345678 may belong to one person, and the number 123456 to another.

11. It is impossible to get through the wrongly dialed number .

In some countries or on some devices, extra numbers are discarded. For example, 1-800-MICROSOFT is the wrong number, but it will still connect to Microsoft, because the extra numbers are discarded. You can also call numbers like 911 in some countries by dialing 911123, but not in all countries.

In other countries, the operator “corrects” the wrong number, for example, adding a mobile code if he knows that this is a mobile number.

12. All valid telephone numbers comply with ITU specifications .

The ITU specifications contain standards like this: “National numbers can not be more than 16 digits,” but in Germany they gave out valid telephone numbers longer than this.

13. All valid phone numbers belong to any country .

There are many “national codes” that were issued to organizations without geo-referencing, such as “800” or satellite services.

14. The telephone number contains only numbers .

In Israel, some promotional numbers begin with "*".

15. Phone numbers are always written in ASCII .

In Egypt, telephone numbers are usually written in local numbers.

see also
Misconceptions of programmers regarding time
Programmers misconceptions about names

Source: https://habr.com/ru/post/279751/


All Articles