Actions

Digit Analyzer

Revision as of 11:36, 8 January 2010 by Cboulanger (talk | contribs)

The digit analyzer is a pre-routing algorithm. It uses a non-linear searching algorithm to find the optimal set of routes with which routing will take place. All routes not required for routing the destination telephone number are therefore screened out. This greatly enhance performances and allows to support virtually any number of routes, since routing is always done on a limited set of routes, matching the destination telephone number.

RouteSet

A RouteSet is a group of possible routes for a given destination number. Each RouteSet is given a name and routes refers to the RouteSet by its name.
Each route in the RouteSet refers to a different NAP that can be used to reach the destination telephone number.

Example:

Let's say we have the following Service Providers, and to keep this simple, suppose we have configured one NAP per Service Provider.

SvcProviderA
Number Destination
55521 Montreal, Qc
55512 Montreal, Qc
55513 Vancouver, Bc
555131 Toronto, On
SvcProviderB
Number Destination
55521 Montreal, Qc
55512 Montreal, Qc
55513 Vancouver, Bc
SvcProviderC
Number Destination
55521 Montreal, Qc
55512 Montreal, Qc
555131 Toronto, On

All three Service Providers have access to "Montreal, Qc", but the rate may differs. So we clearly have three routes for "Montreal, Qc".

In other words, we have three routes grouped under a RouteSet named "Montreal, Qc".  In this case, the RouteSet is named after the destination city, but it could be anything.

Routing CSV Database

The CSV database is composed of 4 groups of CSV files.  Those files covers configuration of all aspects required by the routing engine.  Files enables all route management, modification, backup and update to take place outside Toolpack webportal, using your favorite software.  Once the files are ready, the are imported in the Toolpack system using WebPortal.  The WebPortal also allows to export CSV files.

CSV Files

  • The first row of a csv file define the names of the columns.
  • File names are case insensitive. 
  • File content IS case sensitive.

RouteSets.csv

This file is the list of all RouteSet names configured in the system. 

  • It's name is route_sets.csv
    Importing this file to the Toolpack is mandatory as it is used to validate the content of the other csv files before applying them.
  • Only one column, named route_set_name

For example:

route_set_name
"Montreal, Qc"
"Toronto, On"

NapName.csv

There's one NapName.csv for each NAP configured in the system.  Each file, is a list of number<->routesetname association for the NAP

  • Its name must match the name of a configured NAP
  • Two mandatory columns: number and route_set_name
  • Supplementary columns are used to provide optional and custom values to dynamically created routes

For example, here's NapSvcProviderA.csv

number, route_set_name,  remapped_called, custom_1
55521,  "Montreal, Qc",  "",              ""
55512,  "Montreal, Qc",  "",              ""
55513,  "Vancouver, Bc", "/(.*)/1\1/",    10
555131, "Toronto, On",   "",              ""

With very few lines, each file defines:

  1. All numbers for the NAP
  2. All Number<->RouteSet associations
  3. All RouteSet<->NAP associations

As we'll see later, for each RouteSet<->NAP association, a dynamic route entry gets created.  Moreover, in this example, the route gets created with parameters found in the second and third colum.

Naps.csv

This file is optionnal, and defines parameters for each NAP configured in the system.

  • It's name is naps.csv
  • Two mandatory columns: nap_name and pre_remap
  • Supplementary columns are used to provide optional and custom values to NAP

For example:

nap_name,              pre_remap,     custom_a
NapSvcProviderA,       "",            ""
NapSvcProviderB,       "/1(.*)/\1/",  ""
NapSvcProviderC,       "",            ""

Routes.csv

This file is optionnal, and defines static routes.  Static routes are those that were not dynamically created by the import of a NapName.csv file.

  • It's name is routes.csv
  • One mandatory column: remapped_nap

For example:

nap,              remapped_nap,       route_set_name,  called,   custom_1
"",               NapSvcProviderA,    "",              911,      ""
NapSvcProviderC,  NapSvcProviderB,    "Vancouver, Bc", "",       ""

In a few lines, we can defines complex routing schemes.  In the example above, we have two type of static routes:

  1. One global route, forcing all 911 calls to go out on NapSvcProviderA
  2. One normal route, adding a special rule on the RouteSet named "Vancouver, Bc", forcing calls incoming NapSvcProviderC to always go out on NapSvcProviderB

A route is considered global if it does not belong to a RouteSet.  Global routes are always used along with the RouteSet during routing.

Dynamic Route Tables

Thanks to the CSV database the routing table is dynamically being maintained.  The import process analyzes all the files, and creates, updates, and deletes route entries.  Those dynamic entries are read-only in the Web Portal, and can not be modified.

Import process

It is important to follow the steps in the following order for the import to complete successfully.

Step1

The first step is to configure the list of all the RouteSet name in the system.