Introduction: How to Make VoIP Calls From Raspberry Pi
Have you ever thought about using your Raspberry Pi for VoIP telephony purposes? It sounds interesting, isn’t it? If so, but you did not find out yet how to implement this VoIP-SIP solution, this tutorial helps you to achieve your goals. This is the best place to start if you would like to make VoIP telephone calls from Raspberry Pi as it explains what hardware and software requirements are needed, and how to use them to be able to initiate VoIP calls.
About the VoIP technology
VoIP is the acronym for Voice over Internet Protocol. This is a methodology and group of technologies for the delivery of voice communications and multimedia sessions over IP networks, such as the Internet. VoIP is commonly associated with other terms, such as ’Internet telephony’ that refers to the provisioning of communications services (voice, fax, SMS, voice-messaging) over the public Internet, rather than via the Public Switched Telephone Network (PSTN).
Because of the bandwidth efficiency and low costs that VoIP technology can provide, businesses are migrating from traditional copper-wire telephone systems to VoIP systems to reduce their monthly phone costs.
VoIP is available on many smartphones, PCs, laptops and on other Internet access mobile devices, and on Raspberry Pi as well. To get the most out of your micro PC just follow this step-by-step tutorial that explains how to add basic VoIP functionality to your Raspberry Pi!
Below you can see the list of software and hardware devices I used to implement this solution. Some links have been inserted next to each tool to make their acquisition easier:
- Raspberry Pi: This is a series of credit card-sized single-board computers. (You can get one from here and you can get documentation and downloads from here)
- SFLphone: This is a free software-based telephone for GNU/Linux that can be installed on your Raspberry Pi. (You can get this softphone from here)
- USB headset: To be able to send your voice and listen to the other party while communicating with your Raspberry Pi, a USB headset needs to be attached to your micro PC. (Get one from here)
- PBX: To be able to make and receive VoIP phone calls, it is essentially needed to have an IP PBX. It doesn’t matter whether it is Windows-based or Linux-based, you only need to install one on a PC to be able to register the SFLphone to. (You can choose a PBX from this list)
- VoIP SDK: I usually use Ozeki VoIP SIP SDK for VoIP developments, but in this project you will only need the free softphone provided by the SDK for test purposes. To achieve the softphone, you need to download the SDK free of charge, then you need to register the softphone to your PBX. (You can download it from here)
Step 1: Install a VoIP PBX
For VoIP communication, an IP (or VoIP) PBX is essentially needed. The PBX phrase is the acronym for Private Branch Exchange that is a hardware or software solution for establishing communication lines between different types of communication end-points, regardless of using wired, mobile or VoIP technology. (Today's most advanced phone systems are software-based IP PBXs.) The PBX establishes the communication line between the end points through SIP accounts and SIP messages.
If you still haven't got any VoIP PBX, you can choose one from this list: http://alternativeto.net/browse/search?q=phone+sysem. After the installation, you need to install 2 new SIP extensions.
Let's see this process through the example of Ozeki Phone Systems (to introduce this solution I used this PBX). Of course you can use any other VoIP PBX.
- As a first step, I downloaded the PBX from its official website, then I installed it by using the quick start guide that is provided by the vendor.
- After this I added two new SIP account: numbered 100 and 200. One SIP account (numbered 100) will be used to register the SFLphone softphone (that will be installed on the Raspberry Pi), and the other one will be used to register the other softphone to be able to make a test a call.
Step 2: Setup Your Raspberry Pi
On the Raspberry Pi that I used Raspbian OS is installed. After searching on the Internet, I have recognised that SFLphone is a Linux-compatible softphone and it can be installed on Raspberry Pi computers as well. So let's follow the instructions below carefully to be able to configure your Raspberry Pi:
- Download and install the SFLphone softphone according to the instructions of its official website.
- Setup a SIP account (numbered 100) in the Edit menu. If you want to create a new SIP account, you need to provide the same SIP account details (display name, username, authorization name, password) that you have added in your PBX previously. You also need to provide the IP address and the port number of the PBX.
- Plug a USB headset into the Raspberry Pi to be able to communicate.
This way, your Raspberry Pi is ready to make and receive phone calls.
Step 3: Setup an Other Softphone to Make a Test Call
At this point, let's summarize where we are in the process:
- Well, we have a VoIP PBX installed on a PC and 2 SIP extensions have been installed as well. Their telephone numbers are as follows: 100, 200.
- We also have a client phone belonging to the numbered 100 SIP extension. This is an SFLphone that is installed on a Raspberry Pi micro PC. If you have carried out the SIP account configurations correcty within the SFLphone, now it can be used as a fully-functional IP telephone in your VoIP network.
- So, the missing piece is the numbered 200 SIP extension.
In this project the numbered 200 SIP extension belongs to an other softphone that is used to make a test call. For this purpose I used the free demo softphone of Ozeki VoIP SIP SDK. Let's see how to setup this softphone:
- Download Ozeki VoIP SIP SDK free of charge from its official website. (Actually, this is a software development kit for .NET developers, but it provides a great demo softphone application that is perfect for test purposes. After you have installed the SDK, the demo softphone will be available from your desktop directly.)
- Launch the demo softphone. Add a SIP account by clicking on the proper button and specify the necessary SIP account details (display name, user name, register name, password, the IP address and port number of your PBX). You need to provide the same data that you have specified previously in the PBX related to the numbered 200 SIP extension. Now click on the Registered button.
After this - if you have set everything properly - the Ozeki softphone (with the 200 numbered telephone number) is ready to use.
Step 4: Make a Test Call
Now you can see in your PBX that both of the SIP extensions are available. It means that the softphone client installed on your Raspberry Pi and the other softphone that is installed on an other PC have been registered to the PBX and both of them are ready to use.
So, let's verify our work by making a test call. Open the SFLphone and dial '200'. The other softphone will ring. Accept the call, and say 'Hello' - you will see how easy as that. :)
This instructable explained how to add basic VoIP functionality to your Raspberry Pi! This step-by-step tutorial demonstrated how to make VoIP telephone calls from Raspberry Pi. It introduced the necessary hardware and software requirements and presented how to use them to be able to initiate VoIP calls. I hope you enjoyed it! :)
We have a be nice policy.
Please be positive and constructive.