Contents – Basic Setup
- How to flash the downloaded image
- Determine hostname / IP address
- Basic configuration
- Email setup
- Initial Asterisk setup
- Changing passwords
- More documentation
Contents – Advanced Topics
- Fax gateway
- Security: HowTo for Asterisk and Fail2Ban
- GSM VoIP Gateway with Chan_dongle
- Security Considerations
- Backup your System
- Running RasPBX from an External USB HDD or Thumb Drive
- Uninterruptible Power Supply (UPS) for BeagleBone Black – a DIY Project
A micro-SD card with 2GB or more is required for the image. On Windows, use 7-Zip to extract the .img.xz file and write it to your SD card with Win32 Disk Imager. Read the section Update board with latest software on the original Getting Started for more details:
On Linux, the card can be directly flashed with:
xz -dc raspbx-bbb-*.img.xz > /dev/sdX
Replace /dev/sdX with the actual device of your SD card.
Insert the SD card into your (powered-down) board, hold down the user/boot button and apply power, either by the USB cable or 5V adapter. On subsequent boots, the BBB automatically detects the SD card and boots from it, pressing the boot button is only required once. Eject the SD card (while powered off) to boot the original Angström image from the internal eMMC.
If you don’t want to mess with your eMMC contents, you can just keep running RasPBX from the SD card and you’re fine. But it is also possible to write the same image to the internal eMMC.
Writing the image to the internal eMMC storage
The board has to be booted from an SD card in order to flash the eMMC. Don’t boot from the eMMC and try to flash it at the same time!
Follow the steps above to create an SD card and boot from it. Copy the compressed .img.xz file to a USB thumb drive as well. Insert this thumb drive into the BBB USB host port and mount it:
mount /dev/sda1 /mnt
You can determine available disk space with df:
root@raspbx:~# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 7.9G 1.7G 6.2G 22% /mnt
You might want to save the original eMMC contents to your thumb drive just to be save. Make sure to have at least 2GB free space available (4GB is required for the latest BBB revisions).
dd bs=1M if=/dev/mmcblk1 of=/mnt/emmc_orig_contents.img
Once copying is done the output should look like this:
1832+0 records in 1832+0 records out 1920991232 bytes (1.9 GB) copied, 404.815 s, 4.7 MB/s
If you ever want to revert your eMMC to it’s original state:
dd bs=1M if=/mnt/emmc_orig_contents.img of=/dev/mmcblk1
Copy the RasPBX image to your eMMC:
xz -dc /mnt/raspbx-bbb-*.img.xz > /dev/mmcblk1
When you’re done, unmount the thumb drive:
Power down the board, remove SD card and power it again. Your board boots RasPBX from the internal eMMC.
Expand root partition
There is an easy way to expand the root partition to utilize the complete space of your SD card. Log in to the console, install and run raspi-config (ignore the errors of dpkg, apt-get will fix them):
cd /tmp wget http://repo.raspbx.org/download/raspi-config_20121028_all.deb dpkg -i raspi-config_20121028_all.deb apt-get -f install raspi-config
This tool has originally been written for the Raspberry Pi, most of the menu options won’t work. But expand root partition does work on the BBB as well.
Once your BBB is booted, you need to know it’s hostname or IP address for ssh login or to open the web GUI. On Windows computers, you can just use the hostname raspbx to access your BBB.
On Macintosh, use raspbx.local instead:
In case this is not successful you can check your router’s DHCP client list, and search for the IP associated with the name raspbx.
If this is still not working out, you can always just connect an HDMI monitor and USB keyboard, log in to the console with user root, password beaglebone, and run the command:
Of course you can also use the gadget USB network or serial to log into your device.
After your BBB has booted successfully, log in either on the console or by ssh with user root and password beaglebone. Follow these steps to complete the initial configuration:
Create new ssh host keys to have individual keys for every setup:
After this step your ssh client will warn about a changed host key on your next ssh connect.
Choose your timezone:
Configure keyboard settings (not needed when working with ssh only):
Email delivery from your BBB is needed if you plan to have voicemails sent to users by email. Email already works in the default configuration using Exim4 as MTA. By default, Exim is configured to directly send mails to the recipient MX hosts. This is however discouraged, as many email providers classify emails coming from dynamic IP addresses as spam. To avoid this, you need to set a smarthost. Unless you have an open SMTP server on your network that can be used as smarthost without authentication, you will need to specify SMTP authentication credentials as well. It is basically possible to use almost any publicly available freemailer as smarthost with the BBB. Have username and password as well as SMTP hostname (sometimes also referred to as outgoing mail server) of the email account you are going to use ready. Run on the console:
On the first configuration page select “mail sent by smarthost; received via SMTP or fetchmail”. On the following pages just keep the default values by pressing enter, until you reach the page starting with “Please enter the IP address or the host name of a mail server…”. Here, enter the SMTP hostname of your email provider. Again, keep default values on the remaining pages.
Then, edit the file passwd.client by running:
Add your credentials at the bottom of this file in the following format:
In most cases, the SMTP hostname used in this file is identical to the hostname used as smarthost before. If email fails to work, specify the reverse lookup of your email provider’s SMTP host IP address here. For Google Mail, this is currently gmail-smtp-msa.l.google.com
Some email providers also require you to use sender addresses identical to one of the public email adresses of your account. In this case, edit:
On the bottom of this file add:
root: firstname.lastname@example.org asterisk: email@example.com
This configures the sender address of all outgoing mail to firstname.lastname@example.org.
Finally, to activate your configuration run:
You can test your email setup with this command:
A test email should reach your inbox shortly.
Point your browser to the BBB’s hostname or IP address (http://raspbx).
The default login to FreePBX is:
For inital setup please follow this guide:
Most of the configuration steps presented here apply to the BBB as well. If you are going to use SIP technology, you absolutely need to follow section 5, “Configure Asterisk SIP Settings”.
Once you are done with basic installation, you might want to change the following important passwords to keep your setup safe. As long as your system is running with a private IP address behind a router with all ports closed, these passwords will only affect people trying to log in from inside your network, as no one can log in from outside anyway.
Change the password for SSH or console login with:
To change the FreePBX login select Admin – Administrators in FreePBX. On the right side of the page below Add User select admin. The password can be changed here.
There are 2 more passwords that should be changed. In FreePBX open Settings – Advanced Settings. Find the field Asterisk Manager Password and change this password. On the same page, search for User Portal Admin Password and change the password for the ARI administrator login as well.
Further documentation on how to work with the FreePBX GUI can be found here:
Further details concerning optional features can be found on the original Asterisk for Raspberry Pi website: