Setting Up 3CX SBC on Raspberry Pi (Session Border Controller)
Setting up an SBC for 3CX on a raspberry PI is a somewhat frustrating process the first time you do it. As most 3CX articles, the information you need is spread out among 3 (or more) support documents.
You can get started with the training video. But this video shows how to set up an SBC in windows. So you will need to use some other documentation to get set up.
Port Forward 5090
We run 3CX in Amazon Lighsail so you will need to set up a rule so the public IP of your AWS server is port forwarded to (Opened Up to) port 5090, on your router that the SBC will be connected to. (Or so I think as I write this.
Port 5090 is the PBX Tunnel port. The docs talk of 5060, that is the SIP port and 3CX admins seem to think 5060 does not need to be opened (Port Forwarded)
Setting Your Keyboard For Raspberry Pi
For my Logitec K400x I need to usethe Logitec Generic US layout. Or my | (Pipe) symbol turns out like a #.
I also need to take the bluetooth USB dongle out and put it back in sometimes if I get a bunch of funky symbols.
Change the keyboard layout by opening the Raspberry Pi config panel to change the localization Options: 4 Localization Options, I3 Keyboard Options
Scroll Up/Down to get what you need or find a similar keyboard to yours and test it out.
US settings are in OTHER. And in this day and age, who can blame whoever coded this for doing so!
Open Raspberry Pi Configuration Editor
$ sudo raspi-config
To update the PI you want to run
upgrade. Here is why, from a very helpful user of Unix-Stack Exchange
apt-get updateupdates the list of available packages and their versions, but it does not install or upgrade any packages.
apt-get upgradeactually installs newer versions of the packages you have. After updating the lists, the package manager knows about available updates for the software you have installed. This is why you first want to
Network Connecting Is Needed!
The Raspberry Pi will need to be connected to your local network via an ethernet cable to download the updated Raspian files.
Use a hard wired connection. The SBC will not work with a wi-fi connection.
Make the Updates With These Two Commands
sudo apt-get update
sudo apt-get upgrade
I currently get a bit of news about wpasupplicant. I do not know what this is. If you do, please comment below.
(More) Configuration Of Your Raspberry Pi
- You will start by flashing the stretch version of Raspian with Etcher, my new favorite image flasher.
- Set the hostname (I used Midtown-Office-SBC). Check it using
- Setting Static IP
- You set a static IP in the dhcpcd.conf file. At least this is how 3CX asks us to do this. There are other ways in Simon Monk’s Raspberry PI cookbook that I trust more. But to make all right in the 3CX world. I follow their guide.
How To Set dhcpcd.conf File (Almost)
The video below will show you how to configure the decpcd.conf file. But Be Careful! The video is for 3CX PBX install on a PI. So stop following the video after 2:40, or you will install a PBX on your PI rather than the SBC. You have been warned (And I absolutely made this mistake and had to re-flash my pi!!)
PS: 3cx can run just fine on the PI.
The Commands & Code
sudo nano /etc/dhcpcd.conf
At the bottom of the file you will something like this:
#eth0 static IP configuration
static domain_name_servers=192.168.1.1 18.104.22.168
For static domain I have mine set to 22.214.171.124 and 126.96.36.199
So I will try 192.168.1.1 188.8.131.52 for my configuration and see if that works.
Turns out I had to grab an old dell keyboard to get the command – x and command- y to work and write out the nano editor.
Reboot your Pi
Now that the dhcpcd.conf file is edited, reboot and check the IP of your Pi
Installing 3CX SBC Software on Raspberry PI
wget http://downloads.3cx.com/downloads/sbc/3cxsbc.zip -O- | sudo bash
If you try to enter your domain & key ID many times in a row and fail, you will likely need to delete the SBC in management console & create a new one. If you try too many times it seems 3CX or Lightsail will stop the requests.