Phone number processing
You can write a phone number almost any way you like — with spaces, dashes, brackets, with +, with 00, or with no dialling code at all. But before a message goes out, it has to be clear which mobile network it leads to. That is why the portal is permissive when you enter a number and strict when it sends: anything we cannot match to a specific operator never leaves.
How we read a number
Every number goes through the same treatment when entered:
- We drop everything that is not a digit — spaces, dashes, dots, brackets and the
+sign. - We remove a leading
00— the international form00420…is the same as+420…to us.
The notation therefore makes no difference — these four variants all end up as one and the same number:
| what you enter | result |
|---|---|
+420 777 888 555 |
420777888555 |
00420777888555 |
420777888555 |
(420) 777-888-555 |
420777888555 |
420.777.888.555 |
420777888555 |
The + sign is dropped like any other non-digit character. It therefore makes no difference whether you write the number as +420, 00420, or simply 420.
Local numbers and the country prefix
A local number — say 777 888 555 — does not say which country it belongs to. So we look for the country whose dialling code to add step by step:
- The number already carries an international dialling code — we leave it as it is.
- The contact's country — if the particular contact has a country assigned, we use it.
- The country given when sending — otherwise we take the country you selected in the form or passed in the API.
- Your account's country — if none is given there either, we use the country set on your BulkGate account. You are most likely sending to your own country.
Based on the country found, we add the dialling code and remove any leading zero:
| what you enter | country found | result |
|---|---|---|
777 888 555 |
Czechia | 420777888555 |
0777 888 555 |
Czechia | 420777888555 |
+48 600 700 800 |
Czechia | 48600700800 — its own dialling code is kept |
Numbers that already carry an international dialling code are left untouched. So there is no need to clean up a file that mixes local and international numbers beforehand. Where the country is selected, and how to enter contacts from several countries at once, is covered by Assigning a country to contacts.
If you send to a country other than the one on your account, do not rely on the last step. A local number would get your country's dialling code and end up invalid. So select the country on the contact or when sending, or write the numbers in international format from the start.
Some countries have a national prefix longer than a single zero, or none at all. We keep separate rules for those, so a local notation works there too — rewriting it into international format is still the safer option.
Number validation and network matching
For a message to go out, it is not enough that the number looks like a number. We have to match it to a specific mobile network. That is why we always validate the number as a whole:
- We add the international dialling code if it is missing — as described in Local numbers and the country prefix.
- We find the network prefix — from the digits after the international dialling code we determine which mobile network the number belongs to.
- We check the length — the rest of the number must have the length assigned to that network prefix.
Only the network found determines the route the message takes and its price.
An unrecognised number is marked Invalid number and goes no further:
- No message is created. You will not find it in the history either — see Message was not delivered.
- Nothing is charged. Such numbers count neither towards the campaign summary nor the price calculation.
- The campaign carries on. The remaining recipients are sent as usual, and you can watch the invalid-number count during the send.
A recognised number still does not mean the message will go out. It can be stopped by the blacklist or opt-out, and by the Sending restrictions setting on your account, which holds the list of countries you are allowed to send to.
Numbers ported to another operator
A number the recipient has ported to another operator keeps its original network prefix. During validation we therefore first match it to the original operator. At the moment of sending we then use the HLR register to find out which network the number is actually in, and charge the message at that operator's price.
Where the check happens
| where | what it means |
|---|---|
| Import into the address book | only contacts with a recognised number are stored, other rows are skipped; the number is stored in international format together with its country, dialling code and network |
| Import into a campaign | the same check as in the address book — whether you add numbers from a file, from a vCard, or by hand |
| Test message | the number has to pass the check, otherwise the test is not sent |
| Blacklist | only a recognised number can be added |
| API and modules | numbers go through the same check as in the portal |
How to verify numbers in advance
To be sure before a send, pass the numbers to the phone number check. For each number you get back whether it is valid, which country it belongs to, its dialling code and the network it sits in. An unrecognised number comes back with valid: false and the network unknown.
From PHP, you can call the same check through the NumberChecker in our SDK.
The check is free of charge and works well for routine cleaning of your contact database: deal with numbers reported as unknown before a campaign depends on them.
When a number is valid but unknown to us
Numbering plans change: operators get new ranges and virtual networks appear. So a working number may end up marked Invalid number on our side — and that is a case for support. We will add the range to our network database and the number will start going through.
- In the portal menu, click
Supportand thenContact us - In the
Subjectfield, chooseContact support - Select the
Countrythe number belongs to - In the second
Subjectfield write what the report is about — for exampleUnrecognised phone number - In
Issue descriptiongive the full number in international format, the operator if you know it, and where you ran into the problem - Click
Send
A sample helps too: if a whole range of numbers behaves the same way, send several of them. From a single number we cannot tell whether it is a typo or a range we are missing.
If you are not signed in to the portal, use the contact form — pick the same Subject and add the Email your account is registered under.
Thank you for your feedback.