How to Setup Standard Scripts
(added details) |
(Added more standard scripts) |
||
Line 10: | Line 10: | ||
and the static routing script needs to be disabled. Unclick “Load on startup” and Save.<br> | and the static routing script needs to be disabled. Unclick “Load on startup” and Save.<br> | ||
− | [[Image: | + | [[Image:Remove load on startup.jpg]]<br> |
+ | <br> | ||
+ | === NAP Priority routing<br> === | ||
− | NAP | + | 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. <br> |
<pre>Gateway -> Routing scripts -> Example Scripts -> nap_priority_routing.rb [Edit] | <pre>Gateway -> Routing scripts -> Example Scripts -> nap_priority_routing.rb [Edit] | ||
</pre> | </pre> | ||
Line 20: | Line 22: | ||
<pre>Gateway -> Configurations -> Naps -> Create New Nap Colum | <pre>Gateway -> Configurations -> Naps -> Create New Nap Colum | ||
</pre> | </pre> | ||
− | Name: prio<br>Type attributes: integer<br>Default: 0 | + | '''Name''': prio<br>'''Type attributes''': integer<br>'''Default''': 0 |
− | + | [[Image:Editing_Naps_for_prio.jpg]]<br> | |
+ | |||
+ | <br> | ||
+ | |||
+ | <br> | ||
+ | |||
+ | === Route priority routing<br> === | ||
+ | |||
+ | 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. <br> | ||
+ | <pre>Gateway -> Routing scripts -> Example Scripts -> nap_priority_routing.rb [Edit]</pre> | ||
+ | Click “load on startup” and Save | ||
+ | |||
+ | <br> | ||
+ | |||
+ | Each NAP has its own priority setting<br> | ||
+ | <pre>Gateway -> Configurations -> Routes -> Create New Route Column</pre> | ||
+ | '''Name''': prio<br>'''Type attributes''': integer<br>'''Default''': 0 <br> | ||
+ | |||
+ | [[Image:Editing_routes_for_Route_prio.jpg]]<br> | ||
+ | |||
+ | If two routes match, the lowest value will be first. 0 has highest priority.<br> | ||
+ | |||
+ | <br> | ||
+ | |||
+ | === Percentage routing<br> === | ||
+ | |||
+ | 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. <br> | ||
+ | <pre>Gateway -> Configurations -> Naps -> Create New Nap Colum | ||
+ | </pre> | ||
+ | '''Name''': percent_target<br>'''Type attribute'''s: integer<br>'''Default''': 100<br> | ||
+ | |||
+ | If two route match, the outgoing calls will done according to percent_target | ||
+ | |||
+ | For example:<br>ROUTE_A: percent_target=30<br>ROUTE_B: percent_target=20<br>ROUTE_C: percent_target=50<br>Out of 10 calls, 3 calls to ROUTE_A, 2 to ROUTE_B and 5 to ROUTE_C<br><br> |
Latest revision as of 14:07, 9 December 2011
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.
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
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
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