Toolpack:Enable Lawful Interception in Routing Script A
From TBwiki
(Difference between revisions)
(Created page with "=== '''''Applies to version(s): v2.7''''' === {{DISPLAYTITLE:Enabling Lawful Interception in a Routing Script}} The Lawful Intercept filter is activated by the following: * I...") |
(→Applies to version(s): v2.7) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
{{DISPLAYTITLE:Enabling Lawful Interception in a Routing Script}} | {{DISPLAYTITLE:Enabling Lawful Interception in a Routing Script}} | ||
− | The Lawful Intercept filter is activated by the following: | + | 1- Click '''Routing script''' in the navigation panel. |
+ | |||
+ | [[Image:RoutingScript_0_B.png|border]] | ||
+ | |||
+ | |||
+ | 2- '''Edit''' your main script | ||
+ | |||
+ | [[Image:RoutingScript_2_A.png]] | ||
+ | |||
+ | 3- The Lawful Intercept filter is activated by the following: | ||
* Including the 'Lawful intercept' module in your routing script: '''''require 'base_routing'''''' | * Including the 'Lawful intercept' module in your routing script: '''''require 'base_routing'''''' | ||
* Include the LawfulIntercept class: '''''include LawfulIntercept''''' | * Include the LawfulIntercept class: '''''include LawfulIntercept''''' | ||
− | * Adding the Lawful Intercept " | + | * Adding the Lawful Intercept "after_remap_filter" to your script: '''''after_remap_filter :method => :enable_lawful_intercept''''' |
+ | |||
+ | Note: If you have older routing script version (base_routing.rb < 1.29 or lawful_intercept.rb < 2.4), you will have to use "after_filter" instead of "after_remap_filter". We recommend updating to newer scripts. | ||
==== Script example ==== | ==== Script example ==== | ||
Line 22: | Line 33: | ||
route_remap :call_field_name => :nap, :route_field_name => :remapped_nap | route_remap :call_field_name => :nap, :route_field_name => :remapped_nap | ||
− | + | after_remap_filter :method => :enable_lawful_intercept # <- Add this line here | |
end | end | ||
Latest revision as of 11:54, 23 June 2015
Applies to version(s): v2.7
1- Click Routing script in the navigation panel.
2- Edit your main script
3- The Lawful Intercept filter is activated by the following:
- Including the 'Lawful intercept' module in your routing script: require 'base_routing'
- Include the LawfulIntercept class: include LawfulIntercept
- Adding the Lawful Intercept "after_remap_filter" to your script: after_remap_filter :method => :enable_lawful_intercept
Note: If you have older routing script version (base_routing.rb < 1.29 or lawful_intercept.rb < 2.4), you will have to use "after_filter" instead of "after_remap_filter". We recommend updating to newer scripts.
Script example
require 'base_routing' require 'lawful_intercept' # <- Add this line here class SimpleRouting < BaseRouting include LawfulIntercept # <- 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 after_remap_filter :method => :enable_lawful_intercept # <- Add this line here end @@routing = SimpleRouting.new def init_routes( routes ) @@routing.init routes end def route( call, nap_list ) @@routing.route call, nap_list end