Mike's PBX Cookbook

FreePBX and Raspberry Pi

Raspberry Pi Logo How to install Asterisk and FreePBX on the Raspberry Pi, using a Mac with OS X.
For information related to Raspberry Pi, check the original website at raspberrypi.org.

Raspberry Pi is a trademark of the Raspberry Pi Foundation.

1Download the RasPBX disk image from: http://www.raspberry-asterisk.org/downloads/

2Erase a (4GB) compact flash card. The easiest way to do this is with Disk Utility:

  1. Press CMD SPACE to reveal the Spotlight search bar.
  2. In this search bar, type "disk utility" and press return to launch the Disk Utility application.
  3. Select the SD card in the left hand pane, and then select Erase ensuring that the format is MS-DOS (FAT).
    Note: If your Compact Flash card is larger than 4GB, you can expand the file system later with raspi-config

3Open the Terminal application.

  1. Press CMD SPACE to reveal the Spotlight search bar.
  2. In this search bar, type "terminal", and press return to launch the Terminal application.

4Identify the compact flash disk, and unmount it (mine was /dev/disk1).

Note: In case of: Unmount of disk1 failed: at least one volume could not be unmounted,
append the number of the DOS_FAT_32 partition, eg: diskutil unmountdisk /dev/disk1s1

5Navigate to the RasPBX disk image location (downloads), and copy it with the DD command.

Be patient! The DD command will take a long time, and there is no progress indication.

Output from the commands in steps 4 and 5:

mbp:~ mike$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *250.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS MacHD                   249.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *4.0 GB     disk1
   1:                 DOS_FAT_32 UNTITLED 1              4.0 GB     disk1s1
mbp:~ mike$ diskutil unmountdisk /dev/disk1
Unmount of all volumes on disk1 was successful
mbp:~ mike$ cd downloads
mbp:downloads mike$ sudo dd if=raspbx-31-07-2014.img of=/dev/disk1 bs=2m
Password:
1862+0 records in
1862+0 records out
3904897024 bytes transferred in 2033.352086 secs (1920423 bytes/sec)
mbp:~ mike$ 

6When finished, eject the flash card, plug it in your Raspberry Pi, and power up.

Default SSH login:
User ID: root
Password: raspberry
Default Web GUI login:
User ID: admin
Password: admin
Default Mysql login:
User ID: root
Password: raspberry

7Run the following commands (in the Terminal application) to install the latest additions and improvements:

Note: If the SSH connection is refused with the following error, we must delete the offending RSA key.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Enter the command: ssh-keygen -R raspbx.local or ssh-keygen -R <IP Address> and try again.

8Open Safari, enter the URL http://raspbx.local,

9Goto Applications ➤ Extensions and create a Generic SIP Device (center/right image).

10Installing and registering SIP clients:

  1. Download and install Telephone (free) SIP softphone on your Mac. Open Preferences ➤ Accounts
  2. Add an account: domain name: raspbx.local, username is the extension number, and password the secret string.
  3. The softphone should register with your PBX, and immediately work! Call your VoiceMail with *98.

  4. Finally, if you have an iPhone or iPad, search for 3CX in the App Store (free). Install it, and add a new Account...
    "User" & "ID" are the extension, "Password" is the secret string, and "Local Server IP" is raspbx.local
Telephone Account Settings 3CX Account Settings
Mac: "Telephone" Account SettingsiPhone: "3CX" Account Settings

You can also use the terminal disk-copy technique above (steps 2 thru 5) to try out other software images.
For example, to turn your RaspberryPi into a media server with OpenELEC, or a retro-gaming console with RetroPie.

ApplePi-Baker ApplePi-Baker v2 is a GUI application which allows you to 'flash' an IMG file to an SD-Card, or make IMG backups without needing to use any OS X terminal commands. It's also useful for creating or restoring an IMG backup of USB drives!