Label Routing
(Added snapshots) |
|||
Line 105: | Line 105: | ||
*Select "Load on Startup" | *Select "Load on Startup" | ||
*Save<br> | *Save<br> | ||
+ | |||
+ | [[Image:Load_on_startup.png]] | ||
You must also deactivate the simple_routing script: | You must also deactivate the simple_routing script: | ||
Line 113: | Line 115: | ||
*Save<br> | *Save<br> | ||
− | <br> | + | [[Image:Routeset_routing_enabled.png]]<br> |
It is also possible to add the Label routing to any Routing Scripts this way: | It is also possible to add the Label routing to any Routing Scripts this way: | ||
Line 127: | Line 129: | ||
*Create<br> | *Create<br> | ||
− | === <br> === | + | === [[Image:Create_file_db.png]]<br> === |
=== 3. Enable Label Routing script and File Db in Gateway configuration<br> === | === 3. Enable Label Routing script and File Db in Gateway configuration<br> === | ||
Line 136: | Line 138: | ||
FileDb -> Route_file | FileDb -> Route_file | ||
</pre> | </pre> | ||
+ | === [[Image:Gateway_config_routeset_routing.png]] === | ||
+ | |||
=== <br>4. Create Digitmap file and add it to the system<br> === | === <br>4. Create Digitmap file and add it to the system<br> === | ||
Line 150: | Line 154: | ||
Browse for your file and Import<br> | Browse for your file and Import<br> | ||
− | === <br>5. Create Routeset definition file and add it to the system<br> === | + | === [[Image:Digitmap_association.png]]<br>5. Create Routeset definition file and add it to the system<br> === |
The Routeset definition file is also using CSV format. Create a file with the desired Labels and optional custom parameters:<br> | The Routeset definition file is also using CSV format. Create a file with the desired Labels and optional custom parameters:<br> | ||
Line 182: | Line 186: | ||
*Save | *Save | ||
− | === <br>7. Generate Dynamic Routing table === | + | === [[Image:Associate_NAP_With_Files.png]]<br>7. Generate Dynamic Routing table === |
<pre>Gateway -> Configurations -> Routesets | <pre>Gateway -> Configurations -> Routesets | ||
</pre> | </pre> |
Revision as of 13:21, 31 March 2011
Routeset Routing is an algorithm that combines Digit Analyzer and the concept of RouteSet. It is implemented as a RoutingScript in Toolpack Gateway. This algorithm allows complex routing rules, as normally available with RoutingScript, but on a very large number of destination numbers.
Concept
The concept behind routeset routing is quite simple.
- A list of numbers (NPA-NXX) for a specific destination is assigned a RouteSet name. This list can be very large
- i.e., 514201,514202,514203, ... -> "Montreal, Qc"
- The list of routes for the destination is assigned the same RouteSet name. This list usually is limited to the number of network access points (NAP) in the system.
- i.e., Bell, Rogers, Videotron -> "Montreal, Qc"
Note: No matter how many destination numbers lead to a given destination, only a limited list of routes are selected. At this point, complex, yet efficient, routing rules can take place.
Implementation
As previously mentioned, Routeset Routing is implemented as a RoutingScript. It was written as an optional filter, and can be used in any existing scripts. This filter is a before_filter, and reduces the amount of routes the routing script will work with.
Provisioning
Provisioning of large amounts of Routeset Definition and Routeset Digitmap is accomplished by importing CSV files using the WebPortal. Those files are being saved in the HA Database.
Routeset Definition
Each NAP in the system must be assigned a routesets_definition CSV file. A routesets_definition file gives the association between NAP and RouteSet names. The association between a NAP and a RouteSet name is in fact a route! ie: Rogers->"Montreal, Qc" Thus, for each RouteSet name<->NAP association, a dynamic route entry gets created.
The Routeset Definition file defines a list of RouteSet names, with optional attributes.
- One mandatory column: routeset_name
- Supplementary columns are used to provide optional and custom attributes to dynamically created routes
routeset_name, cost, custom_1 "Montreal, Qc", "0.24", "custom_val"
In the above example, routes are created with custom attributes found in the second and third columns. Each custom attribute must be defined by adding a custom column in the gateway Route table.
The NAP <-> Routeset Definition association is done by setting the NAP dynamic columns named 'routesets_definition'. More than one NAP can point to the same 'routesets_definition' file. This file must be imported in the database using the File Db view in the Toolpack Web Portal.
Routeset Digitmap
Each NAP in the system can be assigned a routesets_digitmap CSV file. It is usual that all NAP uses the same routesets_digitmap file. A routesets_digitmap file gives the association between numbers and RouteSet names.
- Three mandatory columns: route_set_name, called and calling
called,calling,routeset_name 403200, ,"Calgary, AB" 514201, ,"Montreal, Qc" 514202, ,"Montreal, Qc" 514203, ,"Montreal, Qc"
The NAP <-> Routeset Digitmap association is done by setting the NAP dynamic columns named 'routesets_digitmap'. This file must be imported in the database using the File Db view in the Toolpack Web Portal.
Dynamic Routes
When provisioning is complete, dynamic routes can be generated by going in the Routetsets menu item, under Gateway menu Item.
How to setup Label Routing to create dynamic routes
Setting up label routing is simple, since it is using pre-defined scripts, all available from the web portal. It is done in 8 steps:
- Create default routing scripts and activate routeset script
- Create a new file repository (FileDb) for storing the Digitmap and Routeset definition files
- Enable Label Routing script and File Db in Gateway configuration
- Create Digitmap file and add it to the system
- Create Routeset definition file and add it to the system
- Associate NAPs with the Digitmap and Routeset definition files
- Generate Dynamic Routing table
- Activate Configuration
1. Create default routing scripts and activate routeset script
From the Web portal go to
Gateway -> Routing Script -> Create New Script
- Name: Label_Routing
- Select "Create default script files"
- Create
To activate the routeset script:
- Click on "Examples Scripts"
- Edit "routesets_routing.rb"
- Select "Load on Startup"
- Save
You must also deactivate the simple_routing script:
- Click on "Examples Scripts"
- Edit "simple_routing.rb"
- Unselect "Load on Startup"
- Save
It is also possible to add the Label routing to any Routing Scripts this way:
Adding Label Routing to any Script
2. Create a new file repository (FileDb) for storing the Digitmap and Routeset definition files
Gateway -> FileDb -> Create New File Db
- Name: Route_file
- Create
3. Enable Label Routing script and File Db in Gateway configuration
Gateway -> Configurations Use Script -> Label_Routing FileDb -> Route_file
4. Create Digitmap file and add it to the system
The Digitmap file is using CSV format. Create a file with the desired numbers (DIDs) for your system. For example:
called,calling,routeset_name 403200, ,"Calgary, AB" 514201, ,"Montreal, Qc" 514202, ,"Montreal, Qc" 514203, ,"Montreal, Qc"
To add it to the system:
Gateway -> FileDb -> Import New Digitmap
Browse for your file and Import
5. Create Routeset definition file and add it to the system
The Routeset definition file is also using CSV format. Create a file with the desired Labels and optional custom parameters:
routeset_name, prio "Montreal, Qc","2" "Calgary, AB", "3"
To add it to the system:
Gateway -> FileDb -> Import New Digitmap
Browse for your file and Import
6. Associate NAPs with the Digitmap and Routeset definition files
Add the routesets digitmap and Routeset definition NAP dynamic columns
Gateway->Configurations->Naps menu
- Click the 'Create New Nap Column' link
- Name = routesets_digitmap
- Type attributes = dbfile
- Create
- Click the 'Create New Nap Column' link again
- Name = routesets_definition
- Type attributes = dbfile
- Create
Associate the NAPs with the definition files:
- Edit the NAP that will have the association
- Routesets_definition -> Select routeset_definition
- Routesets_digitmap -> Select Digitmap
- Save
7. Generate Dynamic Routing table
Gateway -> Configurations -> Routesets
- Routing Database -> Click on Generate
8. Activate Configuration
Systems -> System_1 (Edit) -> Activate Configuration