Actions

Digit Analyzer: Difference between revisions

No edit summary
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
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.  
{{DISPLAYTITLE:Digit Analyzer}}
 
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.<br> Each route in the RouteSet refers to a different [[NAP]] that can be used to reach the destination telephone number.<br>
 
Example:
 
Let's say we have the following Service Providers, and to keep this simple, suppose we have configured one [[NAP|NAP]] per Service Provider.
 
{| border="1" class="wikitable"
|-
| valign="top" |
{| border="1" class="wikitable"
|+ '''SvcProviderA'''
|-
! Number
! Destination
|-
| 55521
| Montreal, Qc
|-
| 55512
| Montreal, Qc
|-
| 55513
| Vancouver, Bc<br>
|-
| 555131
| Toronto, On
|}
 
| valign="top" |
{| border="1" class="wikitable"
|+ '''SvcProviderB'''
|-
! Number
! Destination
|-
| 55521
| Montreal, Qc
|-
| 55512
| Montreal, Qc
|-
| 55513
| Vancouver, Bc
|}
 
| valign="top" |
{| border="1" class="wikitable"
|+ '''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". <br>
 
In other words, we have three routes grouped under a RouteSet named "Montreal, Qc".&nbsp; In this case, the RouteSet is named after the destination city, but it could be anything.<br>
 
== Routing CSV&nbsp;Database <br>  ==
 
The CSV database is composed of 4 groups of [http://en.wikipedia.org/wiki/Comma-separated_values CSV] files.&nbsp; Those files covers configuration of all aspects required by the routing engine.&nbsp; Files enables all route management, modification, backup and update to take place outside Toolpack webportal, using your favorite software.&nbsp; Once the files are ready, the are imported in the Toolpack system using WebPortal.&nbsp; The WebPortal also allows to export [http://en.wikipedia.org/wiki/Comma-separated_values CSV] files.<br>
 
=== CSV&nbsp;Files<br>  ===
 
*The first row of a csv file define the names of the columns.<br>
*File names are case insensitive.&nbsp;
*File content IS case sensitive.<br>
 
=== RouteSets.csv  ===
 
This file is the list of all RouteSet names configured in the system.&nbsp; <br>
 
*It's name is <u>''route_sets.csv''</u>
*Importing this file to the Toolpack is '''mandatory&nbsp;'''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:<br>
<pre>route_set_name
"Montreal, Qc"
"Toronto, On"
</pre>
 
=== ''NapName''.csv  ===
 
There is one ''NapName.csv'' for each [[NAP|NAP]] configured in the system.&nbsp; Each file, is a list of ''number&lt;''-&gt;''routesetname'' association for the [[NAP|NAP]].&nbsp; <br>
 
*Its name must match the name of a configured [[NAP|NAP]]<br>
*Two mandatory columns: '''''number''''' and '''''route_set_name'''''<br>
*Supplementary columns are used to provide optional and custom values to dynamically created routes<br>
 
For example, here's NapSvcProviderA.csv<br>
<pre>number, route_set_name,  remapped_called, custom_1
55521,  "Montreal, Qc",  "",              ""
55512,  "Montreal, Qc",  "",              ""
55513,  "Vancouver, Bc", "/(.*)/1\1/",    10
555131, "Toronto, On",  "",              ""
</pre>
With very few lines, each file defines:
 
#All numbers for the NAP
#All Number&lt;-&gt;RouteSet associations
#All RouteSet&lt;-&gt;NAP associations
 
As we'll see later, for each RouteSet&lt;-&gt;NAP association, a dynamic route entry gets created.&nbsp; Moreover, in this example, the route gets created with parameters found in the second and third colum.<br>
 
=== Naps.csv  ===
 
This file is optionnal, and defines parameters for each NAP configured in the system.<br>
 
*It's name is <u>''naps.csv''</u><br>
*Two mandatory columns: '''nap_name''' and '''pre_remap'''<br>
*Supplementary columns are used to provide optional and custom values to [[NAP|NAP]]<br>
 
For example:<br>
<pre>nap_name,              pre_remap,    custom_a
NapSvcProviderA,      "",            ""
NapSvcProviderB,      "/1(.*)/\1/",  ""
NapSvcProviderC,      "",            ""
</pre>
=== Routes.csv<br>  ===
 
This file is optionnal, and defines static routes.&nbsp; Static routes are those that were not dynamically created by the import of a [[Digit Analyzer#NapName.csv|NapName.csv]] file.<br>
 
*It's name is ''<u>routes.csv</u>''<br>
*One mandatory column: '''remapped_nap'''
 
For example:
<pre>nap,              remapped_nap,      route_set_name,  called,  custom_1
"",              NapSvcProviderA,    "",              911,      ""
NapSvcProviderC,  NapSvcProviderB,    "Vancouver, Bc", "",      ""
</pre>
In a few lines, we can defines complex routing schemes.&nbsp; In the example above, we have two type of static routes: <br>
 
#One global route, forcing all 911 calls to go out on NapSvcProviderA<br>
#One normal route, adding a special rule on the RouteSet named&nbsp;"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.&nbsp; Global routes are always used along with the RouteSet during routing.
 
== Dynamic Route Tables  ==
 
Thanks to the [[Digit Analyzer#CsvDatabase|CSV&nbsp;database]] the routing table is dynamically being maintained.&nbsp; The import process analyzes all the files, and creates, updates, and deletes route entries.&nbsp; 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.
 
<br>
 
<br>
 
<br>
 
<br>

Latest revision as of 09:54, 14 September 2022

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.