No Jitter is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Asterisk REST Interface: Providing a Complete Toolkit for Building Business Communications Apps

At this year's 10th-anniversary AstriCon, developers, business leaders and Asterisk users from around the world converged on Atlanta for three days of communications and VoIP discussions. Although many exciting announcements were made at AstriCon, the one generating the most interest from conference-goers involved a new API, the Asterisk REST Interface (ARI), which was made available in the first beta release of Asterisk 12.

What is ARI? And why did Asterisk need a new API?

Asterisk has traditionally had two interfaces: the Asterisk Manager Interface (AMI) and Asterisk Gateway Interface (AGI). AMI is typically used for call control and system inspection; AGI is typically used to control execution of a single channel in Asterisk.

Both are great at manipulating channels to execute the existing dialplan applications in Asterisk, and can be used to customize and control Asterisk. However, actually replacing an existing dialplan application using either--or both--interfaces can be challenging. With the existing interfaces, you can control how a channel enters into a dialplan application such as Queue or Voice Mail, but it is far more challenging to replace those dialplan applications with an externally-controlled version.

This is where ARI enters the API space in Asterisk. It is not a replacement for either AMI or AGI. It does not control how a channel enters into a dialplan application; rather, it allows a developer to replace that dialplan application with a custom, externally controlled application that they've developed. ARI simplifies development for business application developers who use Asterisk as a communications platform.

ARI does this by giving developers a high-level REST interface that permits them to control Asterisk's fundamental operations. This includes channel and bridge manipulation, endpoint inspection, asynchronous media control, media recording, and much more. Information about these entities being controlled by the developer is conveyed asynchronously via JSON events over a WebSocket.

The asynchronous events provide a developer who is using ARI with up-to-date information about those parts of Asterisk that they want to control. The REST interface provides an intuitive interface to enact that control. This gives developers a complete toolkit for building custom communications applications.

Previously, the level of control enabled by ARI had been reserved for C programmers who built dialplan application modules that were directly linked into Asterisk. Using ARI, powerful communications applications can now be quickly and easily built using common development languages such as Python, Ruby, PHP and JavaScript.

We in the Asterisk Developer Community are excited about the new capabilities in Asterisk 12 afforded by ARI. The new interface opens Asterisk up not only to the existing Asterisk community of users and developers, but also to a much wider audience of business application developers. It promises to be an exciting year of application development using Asterisk, and we will be thrilled to see what people build using Asterisk and ARI over the months to come!

Comments shared on Twitter from community members at AstriCon:

Steve Davies
Asterisk 12 ARI: Asterisk REST Interface. How nice is that? A well designed REST interface for 3rd party call control and app development!

Ben Klang
The best news out of #Astricon: @Asterisk 12 with ARI. Can't wait to get @Adhearsion talking to this.