Sie sind auf Seite 1von 15

Design and Implementation of Asterisk VoIP Server on a Beaglebone Black

Tides Anugraha
I-Cyrec: Telecommunication Division
20 August 2015

Abstract

VoIP (Voice over Internet Protocol) is a technology that allows distance voice
conversations via the IP network. The voice data is converted into digital code and streamed
through the network to send data packets, and not through the traditional telephone analog
circuits. In a simple definition VoIP is a voice that is sent over the internet protocol.

One of the popular open source application for building VoIP server is Asterisk.
Asterisk is an open source framework for building communication applications, the asterisk
has the ability to transform ordinary computer into a communications server.

This paper is intended to provide information on the techniques for building portable
asterisk server on Beaglebone Black device. Topics covered include the specification,
installation, and configuration of asterisk server on a Beaglebone Black.

1. Introduction

Asterisk is a software implementation of a telephone private branch exchange (PBX);


it allows attached telephones to make calls to one another, and to connect to other telephone
services, such as the public switched telephone network (PSTN) and Voice over Internet
Protocol (VoIP) services. Its name comes from the asterisk symbol, *.
Asterisk is released with a dual license model, using the GNU General Public
License (GPL) as a free software license and a proprietary software license to permit licensees
to distribute proprietary, unpublished system components.
Asterisk was created in 1999 by Mark Spencer of Digium. Originally designed
for Linux, Asterisk runs on a variety of operating systems,
including NetBSD, OpenBSD, FreeBSD, Mac OS X, and Solaris. Asterisk is small enough to
run in an embedded environment such as Customer-premises equipment-hardware
running OpenWrt. There are complete self-contained versions that can boot from a storage
device such as a flash drive or external disk drive (preferably IDE/PATA, SATA or mSATA;
a USB-connected device can be used, but is often not recommended). A live CD or virtual
machine can also be used.
Beaglebone Black is a low-cost credit-card-sized development platform with good
support from a fast growing community. The Beaglebone Black differs slightly from the
regular version by providing you with an onboard micro HDMI port, 512MB of DDR3L
DRAM, 4GB onboard flash memory, an AM3358 processor at 1GHz, and making JTAG
optional with a user supplied header. Beaglebone Black is a good option for physical computing
and smaller embedded applications.
2. Theory

General VoIP architecture

Figure 1: General VoIP Architecture

Figures 1 shows VoIP general architecture which provides not only voice services, but also
instant messaging, video call, and connectivity with public networks. The IP PBX (VoIP
server) connected to the router and the other network clients, such as VoIP phone or PC
installed with SIP softphone client. The IP PBX (VoIP server) are also connected to the PSTN
(Public Switched Telephone Network) either by VoIP Gateway or the services provided by
commercial VoIP provider.

In order to build portable IP PBX (VoIP) server, asterisk will be used as the software platform
to provide the VoIP services. Asterisk is small enough to run in an embedded environment such
as Beaglebone Black. Beaglebone Black is chosen by considering the capability to operate as
a low-power open-source hardware single-board computer.

Several researchers have been developed asterisk to be able to be implemented on embedded


device such as Raspberry Pi and Beaglebone Black. This type of asterisk distribution is known
as RasPBX, Asterisk for Raspberry Pi and also suitable for Beaglebone Black.

3. Experiments

Several experiments are conducted to observe the capability and performance of a portable
asterisk VoIP server on Beaglebone Black.
3.1. Requirements

 Software:

Figure 2: RasPBX image

 Hardware:

Figure 3: Beaglebone Black Rev C

Figure 4: Beaglebone Black Power Adapter (5V; 2 A)


Figure 5: micro-SD card

Figure 6: Android SIP Clients

3.2. Installation and Configuration

a. Download the latest image from: http://www.beaglebone-asterisk.org/downloads/


The latest RasPBX image for Beaglebone Black is based on Ubuntu 14.04.2 and includes:
 Asterisk 11.17.0
 FreePBX 12.0.57
A micro-SD card with 2GB or more is required for the image. On Windows, use 7-Zip to
extract the .img.xz file and write it to micro-SD card with Win32 Disk Imager.

Insert the micro-SD card into the unpowered Beaglebone Black and plug the power adapter
to power on the Beaglebone Black.

Configuration details set during install:


Mysql root password: beaglebone
SSH login:
user: root
password: beaglebone

Default FreePBX login:


user: admin
password: admin

b. Determine hostname / IP address


Once the Beaglebone Black is booted, the next step is to find out the ip address and the
hostname of the Beaglebone Black for ssh login or to open the web GUI. This can be
done by running ping commands to the raspbx server.

ping raspbx

c. Basic configuration
After Beaglebone Black has booted successfully, log in either on the console or by ssh with
user root and password beaglebone. Follow these steps to complete the initial
configuration:
System Upgrade
raspbx-upgrade

Choosing timezone
configure-timezone
3.3. Test Environment

Internet

Beaglebone Black
Android Phone (SIP Client)

Android Phone (SIP Client)

Laptop

Figure 7: Test Environment Ilustration

The following configuration is applied to observe the capability and performance of the system:
 Beaglebone Black connected to the router as the entity of the local network, but not
accessible from the external network.
 Laptop will be used as a device for controlling Beaglebone Black via ssh and accessing
FreePBX (asterisk GUI) via internet browser.
 Android phone (sip client) will be used to test the quality of the voice services, instant
messaging, and video call.

3.4. Test Procedure


3.4.1. Server settings

a. Voice call services


To enable the voice call services, the following steps are required
 Create the sip user account in the FreePBX (asterisk GUI). Type the ip address of
Beaglebone Black on browser’s address field.
 Click on FreePBX administration to login and type the username and password
(default username and password is admin; admin).

 Go to applications menu and select Extensions.

 Click on the submit button to create new user account.


 Type the User Extension and Display/Name.

 Type the user password on the secret column and select Yes – (force_rport,comedia)
for NAT Mode. Click submit button on the bottom of the page.

 Click Apply Config to reload the configuration.


b. Instant messaging services
To enable video call services the following steps are required:
 Go to the settings menu and select asterisk SIP settings

 On the top right panel select Chan SIP

 On the Other SIP Settings field add the following lines:


 Access the asterisk console via ssh and edit the extensions_custom.conf. Add the
following lines on the files and reload the configuration from asterisk command line
interface
[SMS]
exten => _X.,1,NoOp(SMS receiving dialplan invoked)
exten => _X.,n,NoOp(To ${MESSAGE(to)})
exten => _X.,n,NoOp(From ${MESSAGE(from)})
exten => _X.,n,NoOp(Body ${MESSAGE(body)})
exten => _X.,n,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})
exten => _X.,n,MessageSend(${ACTUALTO},${MESSAGE(from)})
exten => _X.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
exten => _X.,n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?sendfailedmsg)
exten => _X.,n,Hangup()
;
; Handle failed messaging
exten => _X.,n(sendfailedmsg),Set(MESSAGE(body)="[${STRFTIME(${EPOCH},,%d%m%Y-
%H:%M:%S)}] Your message to ${EXTEN} has failed. Retry later.")
exten => _X.,n,Set(ME_1=${CUT(MESSAGE(from),<,2)})
exten => _X.,n,Set(ACTUALFROM=${CUT(ME_1,@,1)})
exten => _X.,n,MessageSend(${ACTUALFROM},ServiceCenter)
exten => _X.,n,Hangup()
exten => _X.,n,Hangup()

c. Video call services


To enable video call services the following steps are required:
 Go to the settings menu and select asterisk SIP settings.
 On the top right panel select Chan SIP.

 Select Enabled on video support section and checklist the codecs option.
3.4.2. Client settings

Setting up the user account on the client side will be done in the following order:

 Install the app client from the Play Store (for android zoiper has the availability to
provide call service, instant messaging, and video call).

 Open the zoiper application, go to config menu and select Accounts. Click Add
account button.

 Select Yes and Manual configuration for the Account setup prompt option.
 Select SIP as the type of account and fill SIP account details as follows:

This will be used as the name of the account

The ip address of the Asterisk FreePBX server

Refer to the user extension on the FreePBX settings

Refer to the secret field on the FreePBX settings

 Click save and the android sip client will register to the Asterisk FreePBX server.

3.4.3. Test results

a. Voice call test

Test call from extension 8001 to 8002


b. Instant messaging test

Test instant message from extension 8002 to 8001

c. Video call test

Test video call from extension 8002 to 8001

4. Conclusions

During the experiment Beaglebone Black has shown the ability to perform the functions of
Asterisk FreePBX server. The functions include call services, instant messaging services, and
video call services. The main aim of this experiment is to create portable VoIP server and
Beaglebone Black is one of the options that available on the market with affordable price and
capability to operate as a low-power open-source hardware single-board computer.

This option is worth to consider because the Beaglebone performance when running the
function as a VoIP server is quite stable.

5. Further research

The next research will be focus on the following topics:


 Providing secure portable VoIP server by implementing TLS and SRTP mechanism.
 Connectivity with GSM network either by GSM VoIP Gateway or chan dongle
option in Asterisk FreePBX server.
References

http://www.beaglebone-asterisk.org/documentation/

https://en.wikipedia.org/wiki/Asterisk_(PBX)

https://www.sparkfun.com/products/12857

https://en.wikipedia.org/wiki/BeagleBoard#BeagleBone_Black

http://www.esds.co.in/blog/voip-voice-over-internet-protocol-architecture-and-features/

Das könnte Ihnen auch gefallen