Use the ITU list and preserve the original digits before deciding what plan the prefix belongs to.
Check the plus and full string
A bare leading digit without + or region context can be ambiguous.
Consult the assignment
The ITU list covers country and other assigned calling codes; not every prefix is a geographic country.
Stop before overclaiming
If the format or range cannot be resolved, mark it unresolved instead of inventing a country or operator.
Unknown here does not mean invalid
A missing match is a limitation of a dataset. Before labelling a number invalid, separate missing context, missing coverage and a genuinely unsupported pattern.
No leading +
Possible explanation: National-format or incomplete input
Careful response: Ask for the intended country
A code outside our five examples
Possible explanation: Incomplete demo coverage
Careful response: Consult the current numbering-plan reference
A global-service code
Possible explanation: A non-geographic assignment
Careful response: Do not force a country label
Too little or malformed text
Possible explanation: Incomplete or mistyped input
Careful response: Retain the original and request clarification
Never “repair” an unknown prefix by substituting a familiar country. Unsupported, incomplete and invalid are different states.