Create Routing Called Number Manipulation Rules Script

This script uses the LERG_6 table in the NexOSS database as a data source for US area codes (NPAs) by state. The LERG_6 table comes from the LERG6.dat file of the Local Exchange Routing Guide. The following instructions provide two instruction examples. One for MySQL and one for Oracle.

  • MySQL Example:

Navigate to the $NexOSS_HOME/sql/LERG/MY_SQL folder, login to the database and then run the script by executing the command below. User key strokes are highlighted in yellow. Do not include the quotations around the user name, password and database name.

   --   mysql -u"user name" -p"password" -D"database name" -N < exportForIntraStateCalls.sql > RoutingCalledNumberManipulation.txt

The script will generate the RoutingCalledNumberManipulation.txt file. Use the following commands to verify the script was created.

   [ossadmin@linux-lab ~]$ cd $NexOSS_HOME/sql/LERG/MY_SQL
 
   [ossadmin@linux-lab MY_SQL]$ pwd
   /home/ossadmin/OSS/nexoss/sql/LERG/MY_SQL
 
   [ossadmin@linux-lab MY_SQL]$ ls
   exportForIntraStateCalls.sql
   exportForInvalidCallingNumbers.sql
   lerg_1_load_instr.sql
   lerg_6_load_instr.sql
   lerg_post_load.sql
   lerg_pre_load.sql
   neustar_cc1_load_instr.sql
   neustar_cc1_post_load.sql
   neustar_cc1_pre_load.sql
   nnacltb_load_instr.sql
   nnacltb_post_load.sql
   nnacltb_pre_load.sql
   telcodata_load_instr.sql
   telcodata_post_load.sql
   telcodata_pre_load.sql
   [ossadmin@linux-lab MY_SQL]$
  • Oracle Example:

Navigate to the $NexOSS_HOME/sql/LERG folder.

   labserv$ cd $NexOSS_HOME/sql/LERG
 
   labserv$ pwd
   /export/home/ossadmin/OSS/nexoss/sql/LERG
 
   labserv$ ls
   MY_SQL
   exportForIntraStateCalls.sql
   exportForInvalidCallingNumbers.sql
   lerg_1_load_instr.ctl
   lerg_6_load_instr.ctl
   lerg_post_load.sql
   lerg_pre_load.sql
   neustar_cc1_load_instr.ctl
   neustar_cc1_post_load.sql
   neustar_cc1_pre_load.sql
   nnacltb_load_instr.ctl
   nnacltb_post_load.sql
   nnacltb_pre_load.sql
   telcodata_load_instr.ctl
   telcodata_post_load.sql
   telcodata_pre_load.sql
   labserv$

Run the script by executing the command below.

   labserv$ sqlplus database user name/database password@database name
 
   SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 4 15:02:28 2014
 
   Copyright (c) 1982, 2009, Oracle.  All rights reserved.
 
   Connected to:
   Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
   With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
   Run the exportForIntraStateCalls.sql script from the SQL prompt.
   SQL> @exportForIntraStateCalls.sql
   drop table LERG_AREA_CODES_BY_STATE
           *
   ERROR at line 1:
   ORA-00942: table or view does not exist
 
                   50              303        306
   default 1907    907     MON-00:00       ##1907r Intra-AK
   default 1205    205     MON-00:00       ##1205r Intra-AL
   default 1205    251     MON-00:00       ##1205r Intra-AL
   default 1205    256     MON-00:00       ##1205r Intra-AL
   default 1205    334     MON-00:00       ##1205r Intra-AL
   ~
   default 1304    681     MON-00:00       ##1304r Intra-WV
   default 1681    304     MON-00:00       ##1681r Intra-WV
   default 1681    681     MON-00:00       ##1681r Intra-WV
   default 1307    307     MON-00:00       ##1307r Intra-WY

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options labserv$

Verify the file was created.

   labserv$ ls -l Routing*
   -rw-r--r--   1 ossadmin oinstall  381174 Dec  4 15:03 RoutingCalledNumberManipulation.txt
   labserv$