Guest Blog: A New SBC for Asterisk

By David Duffett, dCAP and Lead Trainer at Let the Geek Speak

Q: When is an SBC not an SBC?
A: When the SBC in question is not just an SBC!
And this is precisely the case with FreeSBC from TelcoBridges…

I was delighted when Alan Percy (CMO at TelcoBridges, and a long-time industry colleague and friend) gave me the opportunity to try out FreeSBC and to see what use I might put it to with a media engine and call-processing platform like Asterisk, and to write up my experiences…

The first thing to say is that FreeSBC ‘does exactly what is says on the tin’ in that it provides SBC functionality for FREE! TelcoBridges have made it available on a ‘freemium’ model that allows you to implement a certain feature-set for free, without any limit on the number of concurrent channels you are running.

If you need any of the functionality that is packaged within the paid for product (see here for the feature list) or you need Professional Technical Support, then prices start from $500/year.

Of course, it has to be said that well-known and loved Open Source SIP Server projects like Kamailio and OpenSIPS that are freely available can be configured to deliver a lot of SBC functionality, so why consider this TelcoBridges offering?

Probably one of the most compelling answers is that all FreeSBC functionality is configured via a GUI (making configuration fast and easy), and there is a lot of functionality – well beyond that of a traditional SBC!  It also provides many features you would associate with a traditional SIP server AND it has a Back to Back User Agent (or B2BUA).

This makes it very flexible in terms of the uses you can put it to – so much so, in fact, that you can actually create a wide variety of different configurations and save them, thus giving the ability to quickly flick FreeSBC from one pre-configured task to another.

There are so many use cases for FreeSBC that TelcoBridges has created a special web page where you can see some of them here.

All of this is available via a free download from the TelcoBridges website, with images for a bare-metal installation and VM implementations available.

Coming back to me trying out FreeSBC… With Asterisk often being used in large scale and resilient hosted telephony platforms, I decided that I would bypass the SBC functionality (since that is a given) and try FreeSBC out as a dispatcher (or load-balancer) between two Asterisks – there could easily be 10 or 20 Asterisks – but I kept it simple for my example use…

Not only does the TelcoBridges website have an excellent wiki covering FreeSBC, but Alan and his colleagues have recorded a good number of videos covering installation, initial configuration and a host of the different use cases (and associated setting up).

So, having chosen to go with a bare-metal installation, my first job was to download the appropriate ISO file from the TelcoBridges website (very easily done) and then either burn it on to a CD or make a bootable USB flash drive of it.

I decided to go with a bootable USB flash drive, which I did using the ‘rufus’ utility on a Windows 10 machine.

Next I used the bootable USB flash drive to install FreeSBC on to a server that I had in the office. Two important notes here;

  1. The installation will completely destroy any data on the existing HDD, so make sure you are happy to commit the whole server to FreeSBC. If you’re not, go for the VM version instead.
  2. FreeSBC needs NICs which are DPDK compatible for passing SIP traffic – so do some homework on the NICs in your server to be sure that FreeSBC will be able to work with them (you can find a list of compatible devices here).

Once the installation is complete the machine reboots and one is presented with the opportunity to login (using the defaults of a username of ‘root’ and a password of ‘root’) to find out the IP addresses that have been allocated to the NICs on the machine.

From here on, all configuration is done via the GUI, so browse to one of the IP addresses found above and the port 12358 – so https://xxx.xxx.xxx.xxx:12358

You will then be guided through the initial set up procedure, during which you will choose new passwords for both the command line ‘root’ user and the GUI.

Further, you will select one or two other configuration options and be able give names to each of the NICs on your server – FreeSBC will let you know which NICs have the capability of conducting SIP traffic (in other words, which NICs are DPDK compatible).

All of the above process can be seen in the ‘How to Install FreeSBC on a Bare Metal Server (Webinar)’ video in the video library.

Once these initial choices have been made, FreeSBC will configure itself accordingly – ready for you to now actually set up the configuration for the way you wish to use FreeSBC. So it is at this stage I began to build my Dispatcher configuration.

The first step is to create a new configuration for this use case, and this is done by clicking on the ‘Configurations’ option from the menu on the left-hand side of the screen, and then clicking ‘Create New Configuration’ at the top of the Configuration pane.

Here I can give a name to the configuration and set some other parameters associated with the configuration.

Now that I have created and named the configuration, I can get on with the job of setting up the functionality I need.

FreeSBC has the concept of NAPs (or Network Access Points) and these are SIP connections of one sort or another. I am going to create three of them – one for the SIP trunk from which incoming calls will be accepted, and then one for each of the Asterisks I will ‘dispatch’ calls to, as they arrive from the SIP trunk.

Although there are other things that need to be configured around them (SIP domains, etc.) it is the NAP where most of the connectivity is done.

Here is a cool video about setting up NAPs.

Once the NAPs are up and running, the only job left is to configure the routing between them. In this case I want to route that calls that come in to the SIP trunk NAP to Asterisk 1 and Asterisk 2 alternatively, thus creating a load-balancer from this Dispatcher configuration.

Like virtually every piece of functionality on FreeSBC, there is a ‘how to video’ explaining how to do it!

On the Asterisk side, I configured PJSIP as follows:

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[Asterisk_2]
type=aor
max_contacts=10

[ASTERISK_2]
type=endpoint
context=internal
disallow=all
allow=ulaw
transport=transport-udp
aors=Asterisk_2

Configuration instructions for both SIP Trunking and Remote Worker configurations are documented on the TB wiki at: https://docs.telcobridges.com/tbwiki/FreeSBC:Asterisk

As I already mentioned, FreeSBC does a lot of stuff! I have been through using FreeSBC to be a Dispatcher/load-balancer, but if you have other security, billing, traffic management or routing needs, then check out this handy page of use cases: https://freesbc.telcobridges.com/use-cases/

Just some of examples are resolving interoperability issues, providing traffic management and routing for SIP Trunking connectivity to major Software as a Service platforms and providing intrusion protection and traffic management at the edge of a service provider network.

It was good to find out more about FreeSBC, and to learn that it does so much more than the SBC functionality that one would expect.

I know that you will be pleasantly surprised to find the huge number of other things that FreeSBC can do for you!


For more information on the soon to be released book “Let the Geek Speak” or David Duffett’s report on the topic, visit his web site at: https://letthegeekspeak.com/free-report/