E164 NORMALIZATION


Abstract

The A_NUMBER must be normalized before the verification with our databases.


Context

In this context we assume we’re in Switzerland

  • international exit code is 00

  • country code is 41 (Switzerland)


Normalization rules

A_NUMBER

COMMENT

NORMALIZATION

Final A_NUMBER

A_NUMBER

COMMENT

NORMALIZATION

Final A_NUMBER

0214445566

doesn't starts with 00

Starts with 0

Assuming it’s a national number

Remove the leading 0

Add 0041

0041214445566

124455667

No leading 0 or 00

Add 00

00124455667

003345454545

Starts with 00

No change

003345454545

0004564534

Starts with 00

No change

0004564534

00414445566

Starts with 00

No change

00414445566

+414445566

Starts with +

Replace + with 00

00414445566


Done !

A_NUMBER is ready for the next steps.