asterisk – Determination of the region and telecom operator by phone number


It is necessary to determine the region and telecom operator by the phone number. This is to further determine the most profitable way to call this number. Previously, this could be done using the country and operator code. Tables exist on the internet. But now this cannot be done, because passed a law on the possibility of leaving to another operator with the preservation of the number.

Please help me come up with the simplest and fastest algorithm for determining whether a number belongs to an operator.

Additionally, I note that the option to call, then estimate how much money was spent is not good, because the user of the number can change the operator quite often (on a historical scale).

If there is any API for the operators to solve this problem, it will be very great if you point to it.

We plan to implement the choice of directions through the Dial-plan of the asterisk system.


Found a solution. Keyword HLR.

HLR Lookup is somewhere between Whois and ping, but for phone numbers. There are (as it turned out) many services that allow you to check the number. The only negative is that they are all paid.

For example, etc.

Scroll to Top