Browse By

Step by Step Installation of Asterisk / FreePBX on Raspberry Pi

Planning to Install Asterisk on Raspberry PI?

Have you every thought of installing Asterisk on a small portable box rather than a PC or Server or VMs? The box is so small that it can go into your pocket. Yes, you heard it right! We are going to talk about Raspberry PI.

The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python.

There are various variants of Raspberry PI. Few examples below:

  • Raspberry Pi 3 – Model A+
  • Raspberry Pi 3 – B+
  • Raspberry Pi 3
  • Raspberry Pi 2
  • Raspberry Pi Zero

If you would like to see the differences in these models, you can follow the link below:

https://www.raspberrypi.org/products/

In this tutorial, we are going to use Raspberry Pi 3B board which has the following specification:

SPECIFICATION
Microprocessor: 1.3 GHz ARM Cortex-v8 Quad Core
Chipset: Broadcom BCM2837
RAM: 1 GB SDRAM
USB: 4 ports (USB 2.0)
HDMI: Full size connector (video output at 1080p)
SD Card: Micro SD
Power Supply: Up to 5V 2.5A
Input Voltage: DC 5V
Dimensions: 85mm x 56mm x 21mm


uccollabing.com
Raspberry Pi 3B

Requirements: Hardware and Software

  • 1 Raspberry Pi 3B or any compatible board which has got LAN/WiFi.
  • SD Memory Card – Minimum 8GB
  • 1 SD Memory Card Reader
  • 1 HDMI Cable
  • 1 USB Keyboard
  • 1 Mobile Charger
  • Asterisk Image Software
  • SD Card Formatter Software
  • Win32 Disk Imager Software

Download the software(s) from the below link:

Let’s get started: 

Insert SD Card in SD Card Reader and Format it

  • Insert the SD Card in the SD Card Reader
  • Launch SD Card Formatter application
  • Select the SD Card drive from the drop down menu
  • Radio Check Quick Format
  • Click on Format
  • Press Yes to continue formatting. Formatting the SD Card will erase existing data from SD Card. Please make sure that you copy the files from your SD card to your PC.
  • Click on OK

Write Image File to SD Card using Win32 Disk Imager

  • Launch Win32DiskImager Application
  • Click on Browse and select raspbx-04-04-2018.img file which you extracted from the downloaded asterisk zip file. (I downloaded raspbx-04-04-2018.img file but there are chances that you may get a different version in case there is a new version available in the official website.)
  • Click on Write
  • Press Yes to confirm overwrite.
  • It will take around 8-15 minutes to write the image file to your SD Card depending on the read and write speed of your SD card.
  • Once the files are successfully written, you will get a message as “Write Successful”.

It’s time to configure Asterisk on your Raspberry Pi

  • Remove the SD Card from your SD Card Reader
  • Insert it in the back side of your Raspberry Pi (Micro SD Card written on the board)
  • Connect HDMI cable from your Raspberry PI to TV/Monitor
  • Connect USB Keyboard to your Raspberry PI
  • Connect Mobile Charger to your Raspberry Pi
  • You will see the Raspberry Pi to be turned on and you will see some output on your TV/Monitor screen.
  • Once you see the login prompt, enter the username as “root” and the password as “raspberry
  • Configuring IP Address for Asterisk

    • It’s time to configure IP Address for your Asterisk. You can connect your Asterisk to the network using LAN and WiFi. In our tutorial, we will use WiFi to connect to the network.
    • Enter the following command in order to configure WiFi.
    • sudo nano /etc/network/interfaces
      uccollabing.com
      auto wlan0
      allow-hotplug wlan0
      iface wlan0 inet static
      address 192.168.1.199
      netmask 255.255.255.0
      gateway 192.168.1.1
      wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
      • Ctrl-X, then type Y to quit and save
      • Enter the following command :
      sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
      network={
      ssid="YOUR_NETWORK_NAME"
      psk="YOUR_NETWORK_PASSWORD"
      proto=RSN
      key_mgmt=WPA-PSK
      pairwise=CCMP
      auth_alg=OPEN
      }
      • Ctrl-X, then type Y to quit and save
      • Type reboot and hit enter to reboot raspberry pi
      • Enter the following command to see if your WLAN0 has been assigned with an IP Address and is up.
      ifconfig wlan0

      Hurray! You have set the IP Address for your Asterisk.

      Configuring Core Credentials to Administer Asterisk

      • Launch your favorite browser and enter Asterisk URL which you configured in above step. As per your scenario it is “192.168.1.199”
      • Enter a Username:
      • Enter a Password:
      • Enter a Confirm Password:
      • Enter Admin Email Address:
      • Click on Create Account:
      uccollabing.com
      • Click on FreePBX Administration
      • Enter Username and Password that you created in above step
      • Click on Continue
      • Sound Prompt Language – Select your prompt language from drop down menu
      • System Language – Select your system language from drop down menu
      • Timezone – Select appropriate timezone
      • Click on Submit
      uccollabing.com

      Your Asterisk / FreePBX is ready for use

      Hurray! Now you don’t necessary need HDMI cable and Keyboard connected to your Raspberry PI.

      You can remotely access the console via SSH to your Asterisk IP Address. Username and Password would be “root” and “raspberry” respectively

      If you want to access GUI page remotely, enter Asterisk IP Address on your browser and you can access the page.

      Hope this helps!

      Published by Team UC Collabing

One thought on “Step by Step Installation of Asterisk / FreePBX on Raspberry Pi”

  1. Pingback: PSTN/GSM calls via Asterisk Raspberry Pi
  2. Trackback: PSTN/GSM calls via Asterisk Raspberry Pi

Leave a Reply

Your email address will not be published. Required fields are marked *

Approved

Electrical Engineer CCNA Collaboration CCNA Voice CCNA R&S. I'm Electrical Engineer and I work like Support Engineer for a Telephony Service Provider Company. Before that I had position like Pre-Sale Engineer about small and medium multivendor telephony solutions. I have 5 years of experience working in Telephony Multivendor Projects. I am also 3 years of experience working in Support and implementation about Cisco Collaboration platforms: UCS server, UCM, Cisco Unity, Presence Server, Jabber, Gateway. Support Community is most useful in finding design, implementation and support tricks and shortcuts that greatly help me in my daily activities. If you need to contact me, please you can writte me.

Approved

CCNA Routing and Switching
Am a technology enthusiast. I work in network support providing support with implementation, maintaining and precisely troubleshooting the infra.
Realm of collaboration makes me want to learn and face new challenges more and more.