| Did you know ... | Search Documentation: |
| Pack uk_number_range -- prolog/uk_number_range.pl |
Normalises a UK number written in any common way (07700 900123,
+44 7700 900123, `0044 (0)7700-900123`) and tells you which Ofcom
range it sits in: mobile, personal numbering (070), paging (076),
geographic (01/02), UK-wide (03), corporate (055), VoIP / location
independent (056), freephone (080), service (084/087) or premium (09).
It also gives a rough outlook for whether a sign-up form that sends an SMS one-time code is likely to accept the number. Most services only send codes to numbers in the mobile ranges and refuse 070, 076, 056 and landline ranges, because those are where virtual (VoIP) numbers usually live. This is a prefix check only: it cannot see porting, and a number in a mobile range can still be a virtual number underneath. Treat the answer as a hint, not a lookup.
Ofcom reserves "drama" ranges that are never given to real subscribers (for example 07700 900000 to 07700 900999 and 020 7946 0000 to 020 7946 0999). Use those in tests and examples; uk_drama_number/1 recognises the common ones.