How to Install VoIP System Asterisk on Raspberry Pi

How to Install VoIP System Asterisk on Raspberry Pi

Are you looking for a phone system for a small business or home office? I have always been interested in scalable VoIP (Voice over IP) solutions, and later I found an implementation of Asterisk on the Raspberry Pi.
— Don Watkins
Table of Contents

Are you looking for a phone system for a small business or home office?

Are you looking for a phone system for a small business or home office? I have always been interested in scalable VoIP (Voice over IP) solutions, and later I found an implementation of Asterisk[1] on the Raspberry Pi.

My curiosity was piqued, and I was determined to give it a try, so I downloaded it from the Asterisk[2] official websitedownload[3] (RasPBX), and then built the server using my Raspberry Pi 3.

Getting Started

First, I will burn the downloaded image to a MicroSD card. The recommended minimum is 4 GB. After transferring the image to the MicroSD card and inserting it into the appropriate slot on the Raspberry Pi, I will connect an Ethernet cable to the Raspberry Pi and the Ethernet port on my home router.

More about Raspberry Pi:

  • What is Raspberry Pi?[4]

  • Getting Started with Raspberry Pi[5]

  • Send us your Raspberry Pi projects and tutorials[6]

Next, I opened a terminal on Linux and entered ssh [email protected], which is the IP address of my server. I was prompted to log in as the root user on RasPBX. The default password is raspberry. (For security reasons, be sure to change the default password if you plan to try it more.)

After logging into the shell on RasPBX, the next step is to prepare the configuration. According to the documentation provided on the website[7], I entered regen-hostkeys in the shell to create new host keys. Then I entered configure-timezone to configure the server’s timezone. I configured the locale by entering dpkg-reconfigure locales at the prompt. I also installed Fail2Ban[8] to secure the server.

Now I am ready to test my configuration.

Testing

I logged out of the shell from RasPBX and then opened a browser and entered my server’s IP address. Loading the server IP address in the browser, I saw a lovely login page.

FreePBX[9] provides a very nice web-based open-source graphical user interface that I use to control and configure Asterisk (available on GitHub[10]). (FreePBX is GPL licensed). I used it to complete the rest of the configuration. The default login account for FreePBX is username: admin; password: admin.

How to Install VoIP System Asterisk on Raspberry Pi

FreePBX_Login_Screen

After logging in, I accessed the Application MenuApplication Menu located at the upper left of the display. I clicked the menu link and selected the second option, “Applications”Applications, and then chose the fourth option, “Extensions”Extensions. From there, I chose to create a New Chan_Sip extension.

How to Install VoIP System Asterisk on Raspberry Pi

I configured a sip extension user with a password. The password is automatically generated, but you can choose to create your own password.

Now I have a complete extension, and I am eager to try my new VoIP server. I downloaded and installed the Yate client[11], which I discovered during the server building process. After installing Yate[12], I wanted to test the connection to the server. I found I could connect to the server using Yate and enter *43 for an echo test. I was thrilled when I heard the client’s prompt.

How to Install VoIP System Asterisk on Raspberry Pi

I decided to create another sip extension so that I could test the voicemail feature of the system. After completing it, I used the Yate client to call this extension and left a short voicemail. Then I called the extension again using Yate and entered *97 to retrieve the voicemail. After that, I wanted to see if I could use my new server to call an outside line. I returned to the menu, chose the “Connectivity”Connectivity option, and added a Google Voice number.

How to Install VoIP System Asterisk on Raspberry Pi

Google_Voice_Connectivity

Then I returned to the “Connectivity” menu and added Google Voice to the outbound route.

How to Install VoIP System Asterisk on Raspberry Pi

Google_Voice_outbound_route

Completing a Call

Back at the Yate client, I called an outside line and successfully completed the call.

I believe this particular VoIP solution can easily work for a small office. According to the FAQ section on the RasPBX website[13], a typical Raspberry Pi system can support up to 10 concurrent calls on the Raspberry Pi 1.

Asterisk has many nuanced features, and FreePBX can easily leverage them.

For more information about Asterisk on Raspberry Pi, refer to their blog[14]. You can find more information about FreePBX source code[15] on their website.

(Cover image: Pixabay, CC0)

Author Bio:

Don Watkins – Educator, educational technology expert, entrepreneur, open-source advocate. Master’s in Educational Psychology, Master’s in Educational Leadership, Linux system administrator, CCNA, virtualization using Virtual Box. Follow me @Don_Watkins.

via: https://opensource.com/article/17/4/asterisk-raspberry-pi-3

Author: Don Watkins[16] Translator: geekpi Proofreader: jasminepeng

This article was originally compiled by LCTT and honored by Linux China.

LCTT Translator
How to Install VoIP System Asterisk on Raspberry Pi

geekpi
Total Translations: 438 articles
Contribution Time: 2014-05-21 -> 2017-05-03

Recommended Articles

< Swipe left and right to view related articles >

How to Install VoIP System Asterisk on Raspberry PiHow to Install VoIP System Asterisk on Raspberry PiHow to Install VoIP System Asterisk on Raspberry PiHow to Install VoIP System Asterisk on Raspberry PiHow to Install VoIP System Asterisk on Raspberry PiHow to Install VoIP System Asterisk on Raspberry PiHow to Install VoIP System Asterisk on Raspberry Pi

Enter article ID or long press the QR code to reach

Leave a Comment

×