[Asterisk-Users] Complete NPA-NXX list for USA/Canada npanxx,

Damon Estep damon at suburbanbroadband.net
Mon Sep 19 09:49:27 MST 2005


 
> > On a related note, I wanted our phones to display "city, st" for the
> > caller-ID name in the event that none was provided.
> 
> Interesting code.  What sort of memory does * take up when you load up
> all those CLID values?
> 
> Nathan
> 
I am a little late to this thread, but the answer is WAY TO MUCH.

With 150,000 "pattern" match extensions * takes a very long time to
reload, during which time calls do not proceed.

If you use Realtime MySQL it pulls in ALL patter match extensions in the
context on every call (150,000 rows per query).

There are two ways to fix this;

The one we did, use the application command realtime() to pull the
record from a database based on napnxx and then use gotoif to route to
the lowest cost provider in that records (realtime must be used on a
unique index so ONLY 1 row is retruned). We are testing upgrading this
to mysql 5 where a view could be used to eliminate the gotoif. With the
gotoif and 2 carriers per npa nxx it is fast. Realtime() can only do
simple queries as of right now, so views would be a huge plus.

The other option I know others are using is to get the route via an agi
script.

Bottom line, YOU CAN NOT load all 150,000 NPA/NXX pattern matches in
asterisk via text file or realtime and expect acceptable performance,
YOU MUST use a database query solution to get only info you need to *

BTW - for $5/mo you can have access to a reasonably well maintained
complete listing of NPA/NXX/OCN/CLLI/ADDRESS, ETC.

https://www.telcodata.us/secure/account/signup (no affiliation)




More information about the asterisk-users mailing list