Here is an example DigitMap:
(<00>44[123]xxxxxxxxx|0044[123]xxxxxxxxx|<00>1[2-9]xxxxxxxxx|001[2-9]xxxxxxxxx|<00>65xx.|0065xx.)
First rule: Prepend 00 to any number starting with 441, 442 or 443 followed by another nine digits. This allows UK national numbers, but not UK mobile numbers which would start 447.
Second rule: Allow any number that starts 00441, 00442 or 00443 and is followed by another nine digits.
Third rule: Prepend 00 to any number that starts 12, 13, 14, 15, 16, 17, 18 or 19 followed by another nine digits. This allows North American national numbers.
Fourth rule: Allow any number that starts 0012, 0013, 0014, 0015, 0016, 0017, 0018 or 0019 followed by another nine digits.
Fifth rule: Prepend 00 to any number that starts 65 followed by any number of digits. Singapore numbering scheme.
Sixth rule: Allow any number that starts 0065 followed by any number of digits.
I hope you see the pattern of how it all works. We could make this DigitMap more simple by making changes in other DigitMaps as well as this one, but I think that would make it hard to understand for someone starting out on this big subject.
Have a go, or post here first for checking or list the codes you wish to be allowed and I will have a go.