Oracle SBC – Admin Task – Basic Local Routing Table (LRT)

In previous entries, a basic virtual lab environment has been created using an Oracle SBC and two Ubuntu desktops running Linphone softphone client, successful calls were made testing the connectivity using the Oracle SBC. Here is a diagram of that environment:

The objective of this entry is to create a Local Routing Table that will help to convert a Toll Free Number (TFN) dialed in Alice-External softphone to Bob-Internal in the INVITE Request Line.

First thing to clarify is that if Alice calls the TFN, SBC will route the call to Ubuntu Internal softphone, but Linphone doesn’t validate for any number received to match with whatever is configured as the user, it just makes the call ring in Bob’s softphone. The following screenshots were taken using the “Monitor and Trace” web menu in the Oracle SBC:

Invite generated by Alice:

Invite sent by the Oracle SBC:

The first step to setup LRTs is create the XML file that will contain the routing information, this XML file can will have the following structure:

When required <route></route> section can be duplicated multiple times (will work in that in a future entry).

In this lab example the XML file looks like this:

Its important to mention that the next section is expecting to have a regular expression that’s the reason to have the .*$ included in the string defined as Expression to Match in a previous image.

LRTs must be uploaded into the SBCs in gz format, I personally use 7-Zip software it’s a free software with open source, and it can be downloaded from here. Here is how that file was created:

File must be uploaded in /code/lrt using the web page administration or an SFTP client (I personally use WinSCP, as I have found several bugs using the web):

Second step is create the configuration for the SBC to read the file and keep that table in memory.

Once configuration is complete (saved and activated) the content of the file can be displayed with the following commands:

show lrt route-table xxxx

(xxxxis the name provided in the config, this will display all the entries)

show lrt route-entry xxxxyyyy

(xxxxis the name provided to the LRT in the config, yyyyis the specific entry configured to be displayed)

Now the local-policy can be edited to use the LRT, this is the previous configuration with no LRT config:

This will be edited to use the LRT:

This is the configuration result:

Let’s see now the changes in the signaling using the LRT, here is the INVITEs:

When maintaining LRTs it’s important to remember the following commands:

show lrt stats                    <- useful to detect issues and validating route entries

LabOSBC# show lrt stats

17:01:13-131

Name: lrt_lab

Local Route Statistics       ---- Lifetime ----

                        Recent      Total     PerMax

Queries                      0          3          1

Result - Success             0          3          1

Result - Not found           0          0          0

Valid Route Entries:            1

Invalid Route Entries:          0

Valid Range Entries:            0

Invalid Range Entries:          0

Route File Last Updated: 2022-09-15 16:24:55

notify lrtd refresh xxx    <- when uploading a new lrt file, it reloads all entries

LabOSBC# notify lrtd refresh lrt_lab

Refreshed LRTD routes

IMPORTANT: When working in HA implementations LRT file must be also loaded and refreshed in the Standby SBC (just replicating the procedure above).