> For the complete documentation index, see [llms.txt](https://prosbcdocs.telcobridges.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prosbcdocs.telcobridges.com/telecom-references/telecom-concepts/how-to-setup-standard-scripts.md).

# How to Setup Standard Scripts

Adding standard scripts to a system is easy and can be done in a few steps. Depending on the scripts, different parameters need to be added to the Routing tables. Steps are described here:

To setup the use of Standard scripts or other scripts, the scripts need to be created and assigned to the gateway configuration:

```
Gateway -&gt; Routing Scripts -&gt; Create New Script
```

Then the scripts need to be assigned to the gateway (routing engine):

```
Gateway -&gt; Configurations -&gt; Use Script -&gt; Defaults_scripts
Gateway -&gt; Routing scripts -&gt; Example Scripts -&gt; simple_routing.rb [Edit]
```

and the static routing script needs to be disabled. Unclick “Load on startup” and Save.

![Remove load on startup](https://docs.telcobridges.com/w/images/c/ca/Remove_load_on_startup.jpg)

#### NAP Priority routing

This script routes calls according to a priority setting of outgoing NAPs. Each NAP has its own priority setting. The \[:prio] field column need to be added in the NAPs page. A smaller \[:prio] value has more priority. If more than 1 route matches, the route with the lowest NAP priority will be selected first. There is an improvement to this script using the nap\_group\_weight\_load\_balancer.rb filter.

```
Gateway -&gt; Routing scripts -&gt; Example Scripts -&gt; nap_priority_routing.rb [Edit]
```

Click “load on startup” and Save

Each NAP has its own priority setting

```
Gateway -&gt; Configurations -&gt; Naps -&gt; Create New Nap Colum
```

**Name**: prio **Type attributes**: integer **Default**: 0

![Editing Naps for prio](https://docs.telcobridges.com/w/images/c/c1/Editing_Naps_for_prio.jpg)

#### Route priority routing

This script routes calls according to a priority setting of Routes. Each Route has its own priority setting. The \[:prio] field column need to be added in each route. A smaller \[:prio] value has more priority. If more than 1 route matches, the one with the lowest priority value will be selected first.

```
Gateway -&gt; Routing scripts -&gt; Example Scripts -&gt; nap_priority_routing.rb [Edit]
```

Click “load on startup” and Save

Each NAP has its own priority setting

```
Gateway -&gt; Configurations -&gt; Routes -&gt; Create New Route Column
```

**Name**: prio **Type attributes**: integer **Default**: 0

![Editing routes for Route prio](https://docs.telcobridges.com/w/images/c/c2/Editing_routes_for_Route_prio.jpg)

If two routes match, the lowest value will be first. 0 has highest priority.

#### Percentage routing

This script allows to do load sharing amongst multiple NAPs. Each NAP has its own load sharing setting. The \[:percent\_target] field column need to be added in the NAPs page. This is useful to envenly route call to different providers. The calculation of percentage for each nap is done by using the cumulative number of outgoing calls made to each nap. There is an improvement to this script using the nap\_group\_weight\_load\_balancer.rb filter.

```
Gateway -&gt; Configurations -&gt; Naps -&gt; Create New Nap Colum
```

**Name**: percent\_target **Type attribute**s: integer **Default**: 100

If two route match, the outgoing calls will done according to percent\_target

For example: ROUTE\_A: percent\_target=30 ROUTE\_B: percent\_target=20 ROUTE\_C: percent\_target=50 Out of 10 calls, 3 calls to ROUTE\_A, 2 to ROUTE\_B and 5 to ROUTE\_C


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://prosbcdocs.telcobridges.com/telecom-references/telecom-concepts/how-to-setup-standard-scripts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
