How to Setup Standard Scripts

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(New page)
 
(Added more standard scripts)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
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:<br>
+
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:<br>  
  
To setup the use of Standard scripts or other scripts, the scripts need to be created and assigned to the gateway configuration:<br>
+
To setup the use of Standard scripts or other scripts, the scripts need to be created and assigned to the gateway configuration:<br>  
 
<pre>Gateway -&gt; Routing Scripts -&gt; Create New Script
 
<pre>Gateway -&gt; Routing Scripts -&gt; Create New Script
</pre>
+
</pre>  
<br>
+
Then the scripts need to be assigned to the gateway (routing engine):<br>  
 
+
NAP Priority routing<br>To set it up:<br>
+
 
<pre>Gateway -&gt; Configurations -&gt; Use Script -&gt; Defaults_scripts
 
<pre>Gateway -&gt; Configurations -&gt; Use Script -&gt; Defaults_scripts
 
Gateway -&gt; Routing scripts -&gt; Example Scripts -&gt; simple_routing.rb [Edit]
 
Gateway -&gt; Routing scripts -&gt; Example Scripts -&gt; simple_routing.rb [Edit]
</pre>
+
</pre>  
Unclick “load on startup” and Save<br>
+
and the static routing script needs to be disabled. Unclick “Load on startup” and Save.<br>
 +
 
 +
[[Image:Remove load on startup.jpg]]<br>
 +
 
 +
<br>
 +
 
 +
=== NAP Priority routing<br>  ===
 +
 
 +
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 -&gt; Routing scripts -&gt; Example Scripts -&gt; nap_priority_routing.rb [Edit]
 
<pre>Gateway -&gt; Routing scripts -&gt; Example Scripts -&gt; nap_priority_routing.rb [Edit]
</pre>
+
</pre>  
 
Click “load on startup” and Save<br><br>Each NAP has its own priority setting  
 
Click “load on startup” and Save<br><br>Each NAP has its own priority setting  
 +
<pre>Gateway -&gt; Configurations -&gt; Naps -&gt; Create New Nap Colum
 +
</pre>
 +
'''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 -&gt; Routing scripts -&gt; Example Scripts -&gt; nap_priority_routing.rb [Edit]</pre>
 +
Click “load on startup” and Save
 +
 +
<br>
 +
 +
Each NAP has its own priority setting<br>
 +
<pre>Gateway -&gt; Configurations -&gt; Routes -&gt; 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 -&gt; Configurations -&gt; Naps -&gt; Create New Nap Colum
 
<pre>Gateway -&gt; Configurations -&gt; Naps -&gt; Create New Nap Colum
 
</pre>
 
</pre>
Name: prio<br>Type attributes: integer<br>Default: 0
+
'''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
  
If two routes match, the lowest value will be first<br>0 has highest priority<br>
+
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.

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