Adding YouMail script to Routing Scripts instructions - INCOMPLETE

From TBwiki
Revision as of 13:31, 8 February 2021 by Luc Morissette (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Applies to version(s): v3.1, v3.2

This shows how to add youmail_spam_risk.rb script to any Routing scripts.

Requirements for this script

  1. The management interface must have an external access to reach the YouMail server. All HTTPS requests will come from the management interface.

Add youmail_spam_risk.rb Scripts in system

Download this file:

Capture DTMF Script

Then upload it in the system with these instructions: Import_Customized_Routing_Script_C

Setting up Routing Number Scripts

To setup a Filter, the main script needs to be modified. The main script can be either simple_routing.rb, simple_routing_sbc.rb, or any other script.

First, go to the routing script section of the Web portal

Gateway -> Routing scripts -> Example Scripts -> simple_routing_sbc.rb [Edit]

Four things need to be added. At the start of the script:

require 'r_n_cdr'

In the main class:

include RnCdr
before_filter :method => :RN_cdr
after_remap_filter :method => :Swap_back


The final script will look like this:

require 'base_routing'
require 'r_n_cdr'

class SimpleRouting < BaseRouting
  include RnCdr
  
  before_filter :method => :RN_cdr

  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 => :Swap_back
end

Update Text CDR Configuration

To have the Routing Number (RN) in the CDR logs, add these fields:

Gateway -> Text CDR parameters -> CDR format (Start): ,RN='@{ScriptAttribute:RN}'
Gateway -> Text CDR parameters -> CDR format (End):   ,RN='@{ScriptAttribute:RN}'

And replace the called fields:

Gateway -> Text CDR parameters -> CDR format (Start): ,Called='@{ScriptAttribute:Called2}'
Gateway -> Text CDR parameters -> CDR format (End):   ,Called='@{ScriptAttribute:Called2}'

See instructions here: Text_Call_Detail_Records

Configure LNP Settings

LNP settings need to be:

profiles -> Outgoing calls LNP mode: Relay LNP Information 
profiles -> Incoming calls LNP mode: Forward LNP from incoming to outgoing call

See instructions here: Modify_LNP_profile_D

Personal tools