Adding Label Routing to a Routing Script
PreviousAdd Customized Filter Script To Main ScriptNextAssign Routing Script Database Files to the Gateway Application
Last updated
Was this helpful?
Was this helpful?
require 'routesets_digit_analyzer'include RoutesetsDigitAnalyzerbefore_filter :method => :routesets_digit_analyzer, :trie_order => :calledrequire 'base_routing'
require 'routesets_digit_analyzer' # <- Add this line here
class my_script < BaseRouting
include RoutesetsDigitAnalyzer # <- Add this line here
before_filter :method => :routesets_digit_analyzer, :trie_order => :called # <- Add this line here
route_match :call_field_name => :called
route_match :call_field_name => :calling
route_match :call_field_name => :nap
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
end
@@routing = my_script.new
def init_routes( routes )
@@routing.init routes
end
def route( call, nap_list )
@@routing.route call, nap_list
end