Issue 021 · Independently publishedFriday, 20 November 2026Open Communications · Technology Watch

AsteriskASTERISKCOMMS WATCH

Product & Technology

ARI and AMI: two ways to wire Asterisk into your business systems

One is event-driven, one is control-driven. Picking the wrong interface raises no error, and becomes an unmaintainable debt six months later.

Sooner or later almost every Asterisk project reaches the same second stage: the phone system has to talk to the business system. Tickets need customer context, outbound campaigns need results recorded, agent states need to appear on a dashboard. The choice is not whether to integrate, but through which interface.

AMI: the veteran, universal and rough

The Asterisk Manager Interface is the original management interface: one TCP connection, a text protocol, commands out and events in. Its strength is total coverage — nearly everything happening in the system is emitted as an event. Its weakness is granularity: a single call can produce dozens of events, leaving the business side to do the aggregation.

AMI suits monitoring and light control: state dashboards, call records, originating calls, hanging up. It does not suit complex call-flow orchestration.

ARI: the modern, resource-oriented interface

The Asterisk REST Interface exposes channels, bridges, playback and recording as REST resources, with a WebSocket for events. Its model matches how programmers think: create a bridge, put two channels in it, play audio into one of them.

ARI suits flow control: custom IVRs, intelligent routing, voice bots, anything that dynamically creates and tears down conversations. The learning curve is steeper than AMI, and the resulting code is far more maintainable.

AMI tells you what happened. ARI lets you decide what happens next.

Is AGI still useful

AGI is the old method of calling an external script from the dialplan. It is simple and direct, well suited to small logic such as looking up a database and reading out the result. It is also synchronous and blocking: a slow script stalls the entire call. In modern projects, use ARI wherever you can.

A comparison table

Engineering advice

Whichever you choose, put your own communications service between the business system and Asterisk. That service handles event aggregation, state machines, reconnection and compensation. Projects that push raw AMI events straight into business code usually start to drift on the second change request.

Also decide authentication and network exposure in advance. AMI and ARI are both high-privilege interfaces; exposing them to the public internet is the same as handing over the entire phone system.

ARIAMIAGIIntegration

R E L A T E D