text
stringlengths
0
152
handle this, as we did earlier in our quick-start example.
Understanding the workings of Stasis() is generally not necessary unless you are
going to be developing the Asterisk product itself (i.e., joining the Asterisk develop‐
ment team and coding new capabilities into Asterisk).
Typically, after your initial experimentation with ARI, you will want to implement a
framework to help ease the work of developing your external application.
Frameworks
A production-grade application using ARI will benefit from the implementation of a
framework to simplify development effort, add a layer of security, and provide a con‐
trol environment.
There are several such libraries available. Which one you choose will in part be dicta‐
ted by which language you prefer to use, and should also take into account whether
338
|
Chapter 19: Asterisk REST Interface
the framework you’re interested in has an active community and is still being actively
maintained.
The ones described next are listed in the Asterisk wiki. We examined the code reposi‐
tory for each, and while some projects are still actively maintained, others have not
been updated in quite some time. If you are planning to implement one of these
frameworks, you will need to do your own due diligence to ensure you can get sup‐
port for it. In many cases, it may be worthwhile to reach out to the developers, and
determine their consulting rates so you can ensure priority access to their time
should you need it.
ari-py (and aioari) for Python
The ari-py framework was written by Digium in 2013–2014, and as of this writing
had not been updated since then. This framework builds on Asterisk’s Swagger.py cli‐
ent.
Shortly after the relase of ari-py, it was forked into the aioari project, which delivers
an asynchronous version of ari-py. This code has been more steadily updated since
then (although as of this writing had not been updated since early 2018). This frame‐
work should be included in your evaluation of a Python framework for ARI.
If you are looking to develop ARI applications in Python, one of these two frame‐
works may be what you are looking for. If you are looking to build a large ARI appli‐
cation, you will need to ensure that you have carefully tested the performance
implications of using Python for what you are doing.
Digium has provided samples for this framework (and others) at https://github.com/
asterisk/ari-examples.
node-ari-client
For the JavaScript folks, there is a Node.js-based ARI framework that was first
released in early 2014, and as of this writing is still being updated. It is based on the
automatically generated API that comes from swagger-js.
For JavaScript/Node developers, this is where you’ll want to start: https://github.com/
asterisk/node-ari-client.
Digium has provided samples for this framework (and others) at https://github.com/
asterisk/ari-examples.
AsterNET.ARI
The Windows folks are not left out. The AsterNET.ARI project delivers a framework
for .NET that augments the AsterNET project (which also includes integration with
Asterisk’s FastAGI and AMI interfaces).
Frameworks
|
339
You can find the repository for AsterNET.ARI here: https://github.com/skrusty/Aster
NET.ARI.
Digium has provided samples for this framework (and others) at https://github.com/
asterisk/ari-examples.
ari4java
The ari4java project is one of the most actively developed ARI frameworks we have
found. It has been developed since 2013, and the repository was receiving commits at
the same time as this writing.
If Java is your language, you will want to check out the ari4java repository at https://
github.com/l3nz/ari4java.
phpari
The phpari project delivers an ARI framework for the PHP community. It has been
developed since 2014, and the repository was still being updated as of this writing.
For the PHP fans, you’ll find the repository at https://github.com/greenfieldtech-nirs/
phpari.
aricpp
If you’re used to writing in C++, there’s even an ARI project for you. The aricpp
framework consists of header files only, so you can build its functions right into what‐
ever you’re developing. This library has also been performance tested with SIPp, and
while we don’t have any numbers on that, it seems to us that a compiled framework