D
D
Dmitry2011-08-11 11:57:08
mobile connection
Dmitry, 2011-08-11 11:57:08

Determining the number and country of the subscriber?

When I call an international number, how does the operator determine the country and number of the subscriber?
Let's say we have the number 1234567890. Is the
country code 1 or 12? Or maybe 123? And how to define defCode?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Shersh, 2011-08-11
@Shersh

Hm. You have a list of all ABCs. If you look closely, there are no such +1 and +12, as well as +27 and +271.
Let's take an example. a person with the number +2263182536 calls you,
you take the first digit after the "+", look, there are no such numbers with +2, in principle, go further, +22 does not exist either, +226 - that lady, this is Burkina Faso.

W
Wott, 2011-08-11
@Wott

international numbering is open, in the sense that there is no strict division by the number of digits, unlike national ones.
the routing of the number goes by separate digits one by one, and as soon as the direction (read country) is determined, the connection goes to the trunk.
to determine the country code, you need to build a tree from existing codes and there will be a country on the sheet.

N
Napseg, 2011-08-11
@Napseg

I wrote about something similar habrahabr.ru/blogs/voip/124211/

M
MikhailEdoshin, 2011-08-11
@MikhailEdoshin

By the way, Google has a libphonenumber library .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question