Re: How to split up phone numbers?

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Andreas <maps(dot)on(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to split up phone numbers?
Date: 2012-02-21 19:49:27
Message-ID: 4F43F547.3000204@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02/20/2012 06:49 AM, Andreas wrote:
> Hi,
> is there a way to split up phone numbers?
Yes.
> I know that's a tricky topic and it depends on the national phone
> number format.
> I'm especially interested in a solution for Germany, Swizerland and
> Austria....

It really depends on *why* you want to split them. To determine
line-type (land/mobile/pager/special...)? For toll calculations? For
do-not-call compliance? For geolocation? Time-zone determination?
Determine the carrier or local switch ID?

In the US, the obvious first choice is NPA-NXX-#### (NPA/NXX commonly
referred to as area-code/prefix). But you may also want the 7th digit
which is the thousands-block (When a block of 10k numbers is split into
blocks for use by different carriers).

At least we have a standard length and format. Many countries I've
checked in South America have numbers of varying length but checking
certain digits in the middle can sometimes tell you the carrier or
land/mobile.

ITU E.164 recommendations are a place to start:

http://www.itu.int/rec/T-REC-E.164/en

But I'm afraid you ultimately need to study the formats for each country
as it relates to your needs.

Cheers,
Steve

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bartosz Dmytrak 2012-02-21 20:33:51 Re: How to store variable data in a field?
Previous Message Steve Crawford 2012-02-21 19:20:08 Re: How to split up phone numbers?