The great thing about the Raspberry Pi is it’s ability to change it’s OS with a swap of an SD card. This allows the Pi to change functions and testing almost as easily as spinning up a Virtual Machine (VM).
There’s currently a project which packages FreePBX and Asterisk all setup and ready to go in a image file for the Raspberry Pi. It’s all self contained so it has it’s own database and web server.
The install will be performed from a Windows machine but as long as the image can be copied to the SD card it should not be a problem.
Go to Raspberry-Asterisk project page and go to the download section. Grab the latest version (at the time of writing raspbx-27-04-2013.zip) as a zip file. It may require some scrolling to find the link.
Next download Win32 Disk Imager which will create and copy the Raspberry Pi image to the SD card.
Unzip both Raspberry-Asterisk image and Win32 Disk Imager. The image file should have an extension .img and the disk imager program should have an .exe.
Insert an SD card and note the drive letter assigned. Double check this because you could be overwriting another drive!
Select the image file by pressing the folder icon or by typing the path directory into the textbox.
Select the drive letter which corresponds to the SD card. By default it will hide all non removeable media drives so you can’t accidentally write over Windows drive.
Press write button, confirm any dialog boxes.
Once complete, eject / unmount the SD card, put it into the Raspberry Pi and power up the device.
The default information to log in are as follows:
Log into the terminal either locally or via SSH. The first thing to do is to change the root account password. Issue the command
passwd and follow the on-screen prompt to change the password.
raspi-config and a menu should appear. If an SD card larger than 4GB is used run the expand_rootfs option to resize the partition to use up the whole SD card.
Other options to check include the time zone, locale and keyboard settings.
Go to the IP address of the Raspbx. The IP can be found by typing
ifconfig into the terminal. Log in using the default credentials.
Go to Admin > Select Admin from the list on the right to edit the user and change the password.
Go to Settings > Advanced Settings and change Asterisk Manager Password? under Asterisk Manager section and User Portal Admin Password in System Setup section. On changing these fields a tick icon appears. Ensure it is pressed to commit the change otherwise nothing has been set. This must be done per setting change. Also under in advanced settings change the Country Indication Tones in Dialplan and Operational section. This will change the ring tones to country specific tones.
Follow the following to setup email capabilities using Gmail SMTP to deliver email. Emails can be sent when new voicemail message appears for example. Setup will be done via the console.
Raspberry Pi Asterisk uses Exim4 as the Mail Transport Agent (MTA). The role of the MTA is to route emails.
Run the configuration wizard
Ok to the postmaster and root setting notice.
Once complete it will automatically restart Exim MTA for the configuration to take hold.
The file should have (and if not add) text SMTP_HOSTNAME:USERNAME:PASSWORD. For example *.google.com:email@example.com:password
Save and exit the file.
/etc/email-addresses add the following to the end of the file:
changing the email address to a personal one. This should be the same email address as the Gmail address.
Due to the additional changes run
update-exim4.conf to update Exim’s configuration,
invoke-rc.d exim4 restart to restart Exim and
exim4 -qff to force send any pending mail.
To check the connection is working
tail /var/log/exim4/mainlog and check for no error messages.
Every now and then it is best to check for updates. This is done via FreePBX Module Admin menu from the web page but also in the terminal run
raspbx-upgrade to keep the Linux distro up to date.