How to Setup Standard Scripts

From TBwiki
Revision as of 14:07, 9 December 2011 by Luc Morissette (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Adding standard scripts to a system is easy and can be done in a few steps. Depending on the scripts, different parameters need to be added to the Routing tables. Steps are described here:

To setup the use of Standard scripts or other scripts, the scripts need to be created and assigned to the gateway configuration:

Gateway -> Routing Scripts -> Create New Script

Then the scripts need to be assigned to the gateway (routing engine):

Gateway -> Configurations -> Use Script -> Defaults_scripts
Gateway -> Routing scripts -> Example Scripts -> simple_routing.rb [Edit]

and the static routing script needs to be disabled. Unclick “Load on startup” and Save.

Remove load on startup.jpg


NAP Priority routing

This script routes calls according to a priority setting of outgoing NAPs. Each NAP has its own priority setting. The [:prio] field column need to be added in the NAPs page. A smaller [:prio] value has more priority. If more than 1 route matches, the route with the lowest NAP priority will be selected first. There is an improvement to this script using the nap_group_weight_load_balancer.rb filter.

Gateway -> Routing scripts -> Example Scripts -> nap_priority_routing.rb [Edit]

Click “load on startup” and Save

Each NAP has its own priority setting

Gateway -> Configurations -> Naps -> Create New Nap Colum

Name: prio
Type attributes: integer
Default: 0

Editing Naps for prio.jpg



Route priority routing

This script routes calls according to a priority setting of Routes. Each Route has its own priority setting. The [:prio] field column need to be added in each route. A smaller [:prio] value has more priority. If more than 1 route matches, the one with the lowest priority value will be selected first.

Gateway -> Routing scripts -> Example Scripts -> nap_priority_routing.rb [Edit]

Click “load on startup” and Save


Each NAP has its own priority setting

Gateway -> Configurations -> Routes -> Create New Route Column

Name: prio
Type attributes: integer
Default: 0

Editing routes for Route prio.jpg

If two routes match, the lowest value will be first. 0 has highest priority.


Percentage routing

This script allows to do load sharing amongst multiple NAPs. Each NAP has its own load sharing setting. The [:percent_target] field column need to be added in the NAPs page. This is useful to envenly route call to different providers. The calculation of percentage for each nap is done by using the cumulative number of outgoing calls made to each nap. There is an improvement to this script using the nap_group_weight_load_balancer.rb filter.

Gateway -> Configurations -> Naps -> Create New Nap Colum

Name: percent_target
Type attributes: integer
Default: 100

If two route match, the outgoing calls will done according to percent_target

For example:
ROUTE_A: percent_target=30
ROUTE_B: percent_target=20
ROUTE_C: percent_target=50
Out of 10 calls, 3 calls to ROUTE_A, 2 to ROUTE_B and 5 to ROUTE_C

Personal tools