Telcobridges - Session Border Controllers
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Grouping the NAPs

Go down

Grouping the NAPs Empty Grouping the NAPs

Post by Admin Fri Aug 14, 2020 2:37 am

Sometimes we need to configure more NAPs for the same destination. And each NAP must be added on the routing table.  For Example;

SIP Trunk provider uses 10 IP addresses. For this case, we need to create all IP addresses with different NAPs and if we want to send a call to those NAPs we need to create a routing table for each of them.

This filter is used to dynamically generate routes from a Regex.

1. Upload the script to your SBC
2. Edit your main script (ex. simple_routing.rb) and add what is below (it’s like adding nap_group_weight_load_balancer to a script)
   a. require ‘multiple_naps’
   b. include MultipleNaps
   c. before_filter :method => :multiple_naps
3. Create a new custom column
1. “additional_naps”, type “text”
4. In your routes, add a regex in the new column which will match the additional NAPs you want
1. /GROUPA_.*/

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:

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

Please check the following link for configuration of Nap Grouping on FreeSBC;


Number of Messages : 393
Point : 962
Registration Date : 2017-11-27

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum