[asterisk-users] Seemingly easy question: NPA/NXX

Shane Young asterisk3 at shaneyoung.com
Mon Sep 22 01:34:51 CDT 2008


International numbers are variable length, so the timeout applies for those.

North American "National" numbers are a fixed length.

Generally, the phone company will collect 7, 10 or 11 digits for North  
American numbers.

For example, I live in Minneapolis, MN.

My number is 612-xxx-xxxx.

I have free calling to 612, 651, 952, 763 and a few numbers in 507 and 320.

If I dial 1, the phone company will collect 10 more digits.  (The call  
may or may not go through if I dial 1+ a 10-digit local number  
depending on the carrier.  MN regulations prohibit charging for local  
calls dialed as toll)

If I dial 612, 651, 952, 763, 507 or 320, the phone company will wait  
for the remaining 7 digts as there are no numbers within area code 612  
that start with those digits.  Anything else will only be collected as  
7 digts and assumed to be 612.

Because of that, I can't dial a california number (for example),  
without dialing it as 1+.

I wouldn't call it "fancy", the phone company just knows what is a  
valid local number for you.

Making a digit map in an ATA isn't that hard, you just need to think  
about what you want it to do.  If you want to permit 10 digit dialing  
without the 1+ for long distance *and* support 7 digit local dialing,  
you'll need a timeout.

There are also the N11 numbers, which of course should stop collecting  
after the second "1".

--Shane


Quoting Karl Fife <asterisk-users at kfife.mailworks.org>:

> Question:
> How does the local Telco know you're done dialing a seven digit number?
> Easy you may say:  If your dial string begins with 1, the parser expects
> 11 digits total, otherwise seven, 011 is international.
>
> The reason suspect it's more complex is that:
> 1) International numbers can vary widely in length and
> 2) Our local analog Telco will route a ten digit NANP numbers with no
> leading 1 and with no terminator--seemingly instantly
>
> Obviously this could be done with 'timeouts'--implicitly 'sending'
> after a delay.  But it works so well I suspect there's more logic in
> there.   For example I have dozens of ATA's provisioned with timeouts,
> and I find it difficult or impossible to replicate the Telco dialing
> experience (Either the delay is too long, or you have frequent 'reorder'
> tones because it 'sent' before you were finished).
>
> Therefore I assume that there is something more 'fancy' going on.  Can
> someone validate, debunk or clarify this?
>
> Theory 1
> Is it all done with timeouts, but they're CONDITIONAL timeouts.
> i.e. give a LONG timeout if the number:
> -did not start with a 1 and is still shorter than 7 digits,
> -started with a 1 and is still shorter than 11 digits
> -started with a 011 and is shorter than the theoretical international
> minimum lenght
>
> Theory 2
> As you know, a few years ago the 2nd digit of the NPA was always 1 or 0.
>  Therefore the switch could easily determine(without the leading 1) if
> your first three digits were an NPA or just an NXX (exchange).  They
> were nationally unambiguous.   Now that's no longer true.  STILL, it
> could be possibleto consider all known valid NPA's and exchanges so they
> can determine via context what you're trying to do, and thereby optimize
> the dialing experience?
>
> Can anyone speak to this?  I would very much appreciate any knowledgable
> input.
>
> -Karl
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



----------------------------------------------------------------




More information about the asterisk-users mailing list