Integration of Asterisk IP-PBX With ESP32 Embedded System For Remote Code Execution
Integration of Asterisk IP-PBX With ESP32 Embedded System For Remote Code Execution
Integration of Asterisk IP-PBX With ESP32 Embedded System For Remote Code Execution
Colombia
* Correspondence: [email protected]; Tel.: +57-304-439-7353
† Presented at the 2nd XoveTIC Congress, A Coruña, Spain, 5–6 September 2019.
Abstract: This paper explains the design and construction of a platform that implements the ESP32
embedded system and connects it to a telephone asterisk plant, to exchange data on both sides,
commands sent from a telephone to the esp32 and make calls from an order of sending from a digital
input of esp32. It is a low-cost device that can be implemented through the use of Wi-Fi, and as a
use in the industry, it has a role in analogue communication in buildings, for example.
Keywords: sensors; wireless fidelity; internet of things; microcontrollers; ESP32; embedded systems
1. Introduction
Internet of Things is a concept based on the connection of electronic devices with each other or
through the Internet, which has been generating expectation for years as it is expected to be a great
driver of digital transformation in homes and cities, as well as in companies. IP telephony has taken
a central role in the information highway so that the network can interconnect each home and each
business through a packet switching network [1,2].
In this work, the Asterisk pbx was used based on the Issabel Linux distribution, which allowed
to create dial plans to receive calls from the users and through an IVR to make a POST request to the
ESP32 platform, which within its code has established methods that for investigation, allowed to
move a servo motor and turn on led lights. Since the communication was bidirectional, from the side
of the ESP32, push buttons were connected, which when pushed, sent commands to the code
execution esp32, within this code a POST is made to a site ready to listen to POST requests in the
Apache server that runs ISSABEL, this web service, performs an internal code execution through
Asterisk and allows to raise telephone calls using Festival as a voice dictation service [3].
The connectivity technology used was Wi-Fi, the possibilities that this work opens up for a real
application are several, among them the use of esp32 technology to connect with IP-PBX inside
buildings, an additional infrastructure different from the IP will not be necessary.
(a) (b)
Figure 1. (a) Device topology; (b) web form.
The received web requests are interpreted in bash language and make a PORT request through
curl in Linux, to send the POST request again to ESP32 and this perform an action like opening a
garage, which can be seen implemented in Figure 2.
Also in Figure 2, you can see two buttons, which allow interacting from the esp32 to the SERVER-
PBX, making automatic calls, which use the voice dictation of the service included in Issabel called
Festival, which is a Text To Speech, and was given a use for example to warn if someone is pressing
the P or G button.
The implementation of the work allows the use of this connection architecture in a real case such
as analogue cytophony, which can be replaced in its common point by an esp32 and in the end users
by ip telephony, allowing to obtain greater benefits such as interacting with actions to be executed
remotely and not only the voice.
References
1. Herranz, A.B. Desarrollo de Aplicaciones Para IoT con el Modulo ESP32. Universidad de Alcalá, Spain.
2019. Available online: https://ebuah.uah.es/dspace/handle/10017/35420 (accessed on 20 May 2019).
2. Gomez, J.; Gil, F. Lógica de marcado de dialplan. In VoIP y Asterisk, 2nd ed.; Grupo Editorial Ra-Ma:
Madrid, Spain, 2014; Volume 1, Chapter 4, pp. 99–125.
3. Cusco, V.A. Implementación de una Central Telefónica Voip Interactiva, Utilizando Agi-Php y un Motor
de Base de Datos, Para Consulta de Información de Estudiantes en el ditic de la u.t.a. Universidad Técnico
de Ambato, Ecuador. 2016. Available online: http://repositorio.uta.edu.ec/jspui/handle/123456789/24022
(accessed on 20 May 2019).
4. Oracle VM Virtualbox. Available online: https://www.virtualbox.org/ (accessed on 15 May 2019).
5. Issabel Project—Unified Communications and More. Available online: https://www.issabel.org/ (accessed
on 15 May 2019).
© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC BY) license (http://creativecommons.org/licenses/by/4.0/).