...
Step 1. The LERG table is queried to determine if the NPANXXY for the ANI and DNIS are both in the LERG table. A successful query returns the company, ocn, lata, ratecenter and prefix_type, but specific . Specific to local call determination these values are irrelevant, just the NPANXXY exists in fact the LERG queries return a result is sufficient to move to Step 2. If either query fails to return a result than it is not a local call and the LCAD is not queried.
...
SELECT lerg.state, Lerg.company, Lerg.ocn, Lerg.lata, Lerg.ratecenter, Lerg.prefix_type FROM shared.lerg WHERE NPA='913' AND NXX='954' AND (Thousands='5' OR Thousands='') ORDER BY Thousands DESC LIMIT 1;
Query Results:
State | Company | OCN | LATA | RATECENTER | Prefix_Type |
---|---|---|---|---|---|
KS | LEVEL 3 COMMUNCATIONS | 2240 | 524 | KANSASCITY | CLEC |
...
SELECT lerg.state, Lerg.company, Lerg.ocn, Lerg.lata, Lerg.ratecenter, Lerg.prefix_type FROM shared.lerg WHERE NPA='913' AND NXX='315' AND (Thousands='4' OR Thousands='') ORDER BY Thousands DESC LIMIT 1;
Query Results:
State | Company | OCN | LATA | RATECENTER | Prefix_Type |
---|---|---|---|---|---|
KS | SOUTHWESTERN BELL | 9533 | 524 | KANSASCITY | RBOC |
...
Example: SELECT EXCHANGE FROM shared.local_xref WHERE NPA='913' AND NXX='954' AND (BLOCK_ID='5' OR BLOCK_ID='A') ORDER BY BLOCK_ID ASC LIMIT 1;
Query Results:
EXCHANGE |
---|
20064370 |
Example: SELECT EXCHANGE FROM shared.local_xref WHERE NPA='913' AND NXX='315' AND (BLOCK_ID='4' OR BLOCK_ID='A') ORDER BY BLOCK_ID ASC LIMIT 1;
Query Results:
EXCHANGE |
---|
20064370 |
Step 3. The LCAD Local Table is queried with the exchanges from Step 2. The ANI Exchange is Originating Ratecenter Exchange (ORC_EXCHANGE) and the DNIS Exchange is the Terminating Ratecenter Exhange (TRC_EXCHANGE). If the query returns data then the call is a local call otherwise it is a long-distance call.
Example: SELECT CALL_TYPE FROM shared.local WHERE (ORC_EXCHANGE='20064370' AND TRC_EXCHANGE='20064370');
Query Results:
CALL_TYPE |
---|
LCA |
Since the query returned a value this would be a local call.
Local calls are rated with a Local Rate Deck. If a Local Rate Deck is not assigned to the Termination Customer Trunk Group then the appropriate Intrastate Rate from the Prefix Jurisdictional Rate Deck assigned to the Trunk Group will be used for rating. If no Local or Prefix Jurisdictional Rate Decks are assigned, then the Intrastrate Rate from the LATA/OCN Jurisdictional Rate Deck will be used for rating. If no Local, Prefix Jurisdictional, or LATA/OCN Jurisdictional Rate Desks are assigned then the call will fail.