SN10k routing script - NOA based on Calling/Called Party Number
Posted by Michal Podoski, Last modified by Daniel Lizaola on 20 December 2017 12:48 PM

Introduction

This example SN10k routing script will allow you to map NOA (TON) on outgoing TDM (ISDN and SS7) call legs based on incoming Calling (CgPN) Called (CdPN) Party Number. We assume that the whole routing script configuration is done from scratch.

Have in mind that until you commit routing script changes with 'Activate configuration' procedure they WON'T become effective. 

 

Configuration

1. Creating a routing script

SmartMedia requires an internal script repository which allows modiciation and executing of Ruby based code.

- go to 'Menu -> Gateway -> Routes -> Routing Script'
- 'Creating New Script' page should be displayed
- put a meaningful name in 'Name' field (fe. RS_test)
- be sure to check 'Create default script files'
- press 'Create'

2. Configuring 'gateway' application to process the routing script

'gateway' application needs to be aware which routing script repository it should execute.

- go to 'Menu -> Gateway'
- scroll down to 'Use script' line
- choose the routing script name created in Point 1 (fe. RS_test)
- confirm the configuration with 'Save'

3. Modify the static routing table

In order to make the process more flexible we will prepare the script in a way remapped NOA values will be configurable in custom columns of the Static Routing Table.

a) Calling NOA remap 
- go to 'Menu -> Gateway -> Routes'
- issue the 'Create New Route Column'
- insert 'Name' ofr the column, please use: 'remap_CgNOA'
- choose value 'choice0|choice1' from 'Type attributes' drop down list
- now this may be confusing, please fill the 'Type attributes' field in a following way: " |unknown_number|international_number|national_number|subscriber_number|network_specific" (mind the starting White Space and please remove the quotation marks)
- such value of 'Type attributes' will allow you to choose NOA parameters from a drop down list during routes creation
- white space on the beggining of 'Type attributes' ensures that you will be able to remove NOA remap from a specific route (blank choice)
- 'Type attributes' list can and should be modified accordingly to your implementation, please find the list of possible values on the bottom of this paragraph
- please make sure you will leave 'Default' field blank
- issue 'Create' command

b) Called NOA remap 
- go to 'Menu -> Gateway -> Routes'
- issue the 'Create New Route Column'
- insert 'Name' ofr the column, please use: 'remap_CdNOA'
- choose value 'choice0|choice1' from 'Type attributes' drop down list
now this may be confusing, please fill the 'Type attributes' field in a following way: " |unknown_number|international_number|national_number|subscriber_number|network_specific" (mind the starting White Space and please remove the quotation marks)
- such value of 'Type attributes' will allow you to choose NOA parameters from a drop down list during routes creation
- white space on the beggining of 'Type attributes' ensures that you will be able to remove NOA remap from a specific route (blank choice)
- 'Type attributes' list can and should be modified accordingly to your implementation, please find the list of possible values on the bottom of this paragraph
- please make sure you will leave 'Default' field blank- please make sure you will leave 'Default' field blank
- issue 'Create' command

Values for 'remap_CgNOA' and 'remap_CdNOA' can be set to follwing values:

  • unknown_number
  • international_number
  • national_number
  • subscriber_number
  • network_specific
  • network_routing_national_format
  • network_routing_international_format
  • abbreviated_number
  • subscriber_number_operator_requested
  • national_number_operator_requeste
  • international_number_operator_requested
  • no_number_present_operator_requested
  • no_number_present_cut_through_call_to_carrier
  • test_line_test_code
  • non_unique_subscriber_number
  • non_unique_national_number
  • non_unique_international_number
  • call_950_number
  • national_number_with_transit_network_selection
  • international_number_with_transit_network_selection

4. Disable the default 'simple_routing' script

New routing scenario will require parsing a modified default script. Of course rewriting the standard 'simple_routing' script accordingly is an option as well, but we will focus on creating a new file

- go to 'Menu -> Gateway -> Routes -> Routing Script'
- in the 'Editing Script Files' section click on the 'simple_routing.rb' file name
- after reaching 'Editing Script File' menu uncheck 'Load on startup' option
- confirm with 'Save'

5. Create a new default script

Now we are able to create a new script prepared to modify NOA values based on CgPN and CdPN on TDM NAPs. You can follow one of the two approaches to create this file:

a) Manual creation
- go to 'Menu -> Gateway -> Routes -> Routing Script'
- in the 'Editing Script Files' section issue 'Create New Script File' option
- after reaching 'Editing Script File' menu put a meaningful name to your script: 'cgpn_cdpn_noa_remap.rb'
- make sure to check 'Load on startup' option
- download the script from Patton Support web page to your PC
- open the downloaded file in a text editor on our PC (file is ASCII text) and copy paste the entire contents to the Web Editor on the 'Editing Script File' page
- confirm with 'Save'

b) Script Import
- go to 'Menu -> Gateway -> Routes -> Routing Script'
- in the 'Editing Script Files' section issue 'Import Script File' option
- download the script from Patton Support web page to your PC
- after reaching 'ImportingScript File' menu issuse 'Select File' command and point to the downloaded file
- make sure to check 'Load on startup' option
- confirm with 'Import'

Script will be located in 'Editing Script Files -> Scripts' section of 'Menu -> Gateway -> Routes -> Routing Script'.

6. Test the scrpit

Thanks to 'Testing script' section of the routing engine you are able to verify all of the changes deployed until now without any harm to the running configuration.

As an example will be working on a following Static Routing Table

NOA routing table

Expected behavior from above routing table:
- route ISDNtoSIP - all calls incming to NAP_ISDN are routed to NAP_SIP
- route SIPtoISDN_NOAint - calls incoming to NAP_SIP having Called Party Number 10 and more digits long, will be routed via NAP_ISDN with Calling NOA set to 'national_number' and Called NOA set to 'international_number'
- route SIPtoISDN_NOAnat - calls incoming to NAP_SIP having Called Party Number between 3 and 9 long, will be routed via NAP_ISDN with Calling NOA set to 'national_number' and Called NOA set to 'national_number' as well

 

- go to 'Menu -> Gateway -> Routes -> Routing Script'
- in the 'Testing script' section we will put following configuration
- please adjust this code to your routing configuration
- output for below tests is done with Debugging Lines in the script uncommented

a) Test for route ISDNtoSIP

@call_params = {
:calling => '1000',
:called => '1234567890',
:nap => 'NAP_ISDN'
}

@nap_list = [
{:name=>"NAP_SIP", :availability_percent=>"100", :signaling_type=>"SIP"},
{:name=>"NAP_ISDN", :availability_percent=>"100", :signaling_type=>"ISDN"}
]

You should receive result similar to this

NOAtestSIP

 

b) Test for route SIPtoISDN_NOAint 

@call_params = {
:calling => '1000',
:called => '1234567890',
:nap => 'NAP_SIP'
}

@nap_list = [
{:name=>"NAP_SIP", :availability_percent=>"100", :signaling_type=>"SIP"},
{:name=>"NAP_ISDN", :availability_percent=>"100", :signaling_type=>"ISDN"}
]

Result should be similar to this

NOAtestINT

 

c) Test for route SIPtoISDNnat

Please modify the ':called' value in '@call_params' hash table to fe: '123456789'. Result should contain 'national_number' in the 'Called noa' column of Call Params table.

 

7. Activate config

After testing proves successfull you can go ahead and make the above configuration effective for your SmartMedia.

- go to 'Menu -> System' 
- in 'Validate configuration' section choose the config you have been working on from the drop down list 
- issue 'Validate'
- if validation returns a successfull result choose the same configuration in 'Activate configuration' section
- issue 'Activate'

(8748 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).