Adding NAP Grouping Script

From TBwiki
(Difference between revisions)
Jump to: navigation, search
Line 6: Line 6:
  
 
This filter is used to dynamically generate routes from a Regex.   
 
This filter is used to dynamically generate routes from a Regex.   
For example, you can have 1 route from SS7 to SIP. In this route, you specify additional SIP routes for load balancing.
+
The trick is to use the NAP names to identify which NAPs are in the same group. The example in the file talk about "SIP_.*" but I would use instead "/GROUPA_.*/".<br>
NAPs: SS7_A, SS7_B, SIP_Z, SIP_Y, SIP_X
+
 
Route:
+
For example:<br>
    Incoming NAP: SS7_A
+
* GROUPA_SIP_NAP_10_10_10_10
    Outgoing NAP: SIP_Z
+
* GROUPA_SIP_NAP_10_10_10_11
    Additional NAPs: /SIP_.*/
+
* GROUPA_SIP_NAP_10_10_10_12
    Result: 3 routes (SS7_A => SIP_Z, SS7_A => SIP_Y, SS7_A => SIP_X)
+
* GROUPB_SIP_NAP_10_10_20_20
 +
* GROUPB_SIP_NAP_10_10_20_21
 +
* GROUPC_SIP_NAP_10_10_30_30
 +
 
 +
Then, in your routes, you can use the Route Column "additional_naps" to put /GROUPA_.*/
  
 
== Add '''NAP Grouping''' Scripts in system<br>  ==
 
== Add '''NAP Grouping''' Scripts in system<br>  ==

Revision as of 02:24, 10 February 2020

Applies to version(s): v2.9, v2.10, v3.0, v3.1

This shows how to add Grouping NAP script to any Routing scripts.

Script description

This filter is used to dynamically generate routes from a Regex. The trick is to use the NAP names to identify which NAPs are in the same group. The example in the file talk about "SIP_.*" but I would use instead "/GROUPA_.*/".

For example:

  • GROUPA_SIP_NAP_10_10_10_10
  • GROUPA_SIP_NAP_10_10_10_11
  • GROUPA_SIP_NAP_10_10_10_12
  • GROUPB_SIP_NAP_10_10_20_20
  • GROUPB_SIP_NAP_10_10_20_21
  • GROUPC_SIP_NAP_10_10_30_30

Then, in your routes, you can use the Route Column "additional_naps" to put /GROUPA_.*/

Add NAP Grouping Scripts in system

Download this file:

Multiple NAPs Script
Personal tools