Adding Routing Number script to Routing Script: Difference between revisions
(New page for describing RN routing) |
mNo edit summary |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
== | {{DISPLAYTITLE:Adding Routing Number Script}} | ||
This | {| class="wikitable" | ||
|- | |||
|rowspan="3"|This article applies to: | |||
|'''Product''' | |||
|'''Version''' | |||
|- | |||
|Tmedia | |||
|2.9, 2.10, 3.0, 3.1 | |||
|} | |||
This article describes how to add a '''Routing Number''' script to any Routing scripts. | |||
== Requirements for this script == | == Requirements for this script == | ||
# The routing number is included in the incoming call | # The routing number is included in the incoming call. For SIP in the Request-URI: | ||
#: INVITE sip:0038123456789;rn=8087321000;npdi=yes@192.168.101.160:5060 | |||
# The routing table must use the called party number | # The routing table must use the called party number | ||
# The outgoing call will have: | # The outgoing call will have: | ||
#: For SS7: | |||
#: Forward Call Indicators: | |||
#: Ported number translation indicator: number translated (Bit M) | |||
#: Called Party Number: 8087321000 | |||
#: Generic Number: [Not present] | |||
# The CDR needs to have the Called number set as the Routing Number | # The CDR needs to have the Called number set as the Routing Number | ||
== Add '''Routing Number''' Scripts in system<br> == | == Add '''Routing Number''' Scripts in system<br> == | ||
{| cellpadding="5" border="1" class="wikitable" | {| cellpadding="5" border="1" class="wikitable" | ||
|- | |- | ||
! width="200" style="background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" | | ! width="200" style="background: rgb(239, 239, 239) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" |Download this file | ||
|- | |- | ||
| valign="top" | | | valign="top" | | ||
*[[Media: | *[[Media:R_n_cdr.zip|R_n_cdr.rb]] | ||
|} | |} | ||
Then upload it in the system with these instructions: | Then upload it in the system with these instructions: | ||
| Line 29: | Line 40: | ||
== Setting up '''Routing Number''' Scripts<br> == | == Setting up '''Routing Number''' Scripts<br> == | ||
To | To set up 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.<br> | ||
First, go to the routing script section of the Web portal | First, go to the routing script section of the Web portal | ||
<pre>Gateway -> Routing scripts -> Example Scripts -> simple_routing_sbc.rb [Edit] | <pre>Gateway -> Routing scripts -> Example Scripts -> simple_routing_sbc.rb [Edit] | ||
</pre> | </pre> | ||
Four things need to be added. At the start of the script:<br> | Four things need to be added. At the start of the script:<br> | ||
<pre>require 'r_n_cdr' | <pre>require 'r_n_cdr' | ||
</pre> | </pre> | ||
In the main class:<br> | In the main class:<br> | ||
<pre>include RnCdr | <pre>include RnCdr | ||
</pre> | </pre> | ||
<pre>before_filter :method => :RN_cdr | <pre>before_filter :method => :RN_cdr | ||
</pre> | </pre> | ||
<pre>after_remap_filter :method => :Swap_back | <pre>after_remap_filter :method => :Swap_back | ||
</pre> | </pre> | ||
| Line 67: | Line 86: | ||
== Update Text CDR Configuration <br> == | == Update Text CDR Configuration <br> == | ||
To have the Routing Number (RN) in the CDR logs, add these fields: | 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: | 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]] <br> | See instructions here: [[Text_Call_Detail_Records]] <br> | ||
== Configure LNP Settings == | == Configure LNP Settings == | ||
LNP settings need to be: | 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]] <br> | See instructions here: [[Modify_LNP_profile_D]] <br> | ||
Latest revision as of 11:13, 13 June 2022
| This article applies to: | Product | Version |
| Tmedia | 2.9, 2.10, 3.0, 3.1 |
This article describes how to add a Routing Number script to any Routing scripts.
Requirements for this script
- The routing number is included in the incoming call. For SIP in the Request-URI:
- The routing table must use the called party number
- The outgoing call will have:
- For SS7:
- Forward Call Indicators:
- Ported number translation indicator: number translated (Bit M)
- Called Party Number: 8087321000
- Generic Number: [Not present]
- The CDR needs to have the Called number set as the Routing Number
Add Routing Number Scripts in system
| Download this file |
|---|
Then upload it in the system with these instructions: Import_Customized_Routing_Script_C
Setting up Routing Number Scripts
To set up 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