Knowledgebase |
Knowledgebase > Unified Communications > SmartNode > SmartMedia > SN10K |
|
||
SmartMedia - Load Balancing in Routing Script | |||
Article Id #: 421 | |||
This article covers addition of Priority and Load sharing to any routing script. Idea behind the script is to regroup routes of the same kind, distribute load among them and prioritize one group versus another. Alternatively you can do the same on NAPs. You will use two additional parameters in the routes: group and weight. group serves as two purpose:
'group' values should range from 0 to 100 weight will load share calls among matching routes of the same group. Used values should range from 10 to 100. Setting up Filter Scripts
Filter setup requires main script to be modified. Let's assume we are using simple_routing.rb as main script First, go to the routing script section of the Web Portal Gateway -> Routing scripts -> Example Scripts -> simple_routing.rb [Edit] Three things need to be added. At the start of the script: require 'nap_group_weight_load_balancer' In the main class: include NapGroupAndWeightLoadBalancer after_filter :method => :filter_by_group_and_weight, :weight_by => :call_attempts
require 'base_routing' require 'nap_group_weight_load_balancer' class SimpleRouting < BaseRouting include NapGroupAndWeightLoadBalancer route_match :call_field_name => :called route_match :call_field_name => :calling route_match :call_field_name => :nap route_match :method => :match_nap_availability route_remap :call_field_name => :called, :route_field_name => :remapped_called route_remap :call_field_name => :calling, :route_field_name => :remapped_calling route_remap :call_field_name => :nap, :route_field_name => :remapped_nap after_filter :method => :filter_by_group_and_weight, :weight_by => :call_attempts end Adding New Custom Variables
You will need two custom columns to use this script. There is a default value creates and it can be changed in each route afterwards. Gateway -> Routes -> Create New Route Column Name: group Gateway -> Routes -> Create New Route Column Name: weight |
|||
User Rating | |||
![]() |
![]() |
(8770 vote(s))
![]() ![]() ![]() ![]() ![]() |
|
User Comments ( Add a Comment ) |
Company > Contact Us > About Patton > Jobs > Capabilities > Quality & Responsibility > Legal News & Events > Press Room/Releases > Training & Events > Library/Downloads |
| Sitemap |
Legal |
Privacy Policy |
Disclaimer |