Skip to content
EN

Integrations

Asterisk connector: AMI, AGI, and ARI

The CONTACT.WORK connector is a service that brings Asterisk telephony into any application: web, desktop, or mobile, a third-party service, or software your own team built. You can place calls, transfer them, and see queues right from that app. It runs on two Asterisk protocols, AMI and AGI: through them, the connector tracks calls and sends commands to the PBX. We add ARI only for special use cases. Call data goes straight to real-time monitoring, reports, the agent's call form, and your CRM.

Every callvisible at every stageFrom the menu to the call outcome
Real-timequeue monitoringAvailable agents and wait times
17 methodsAPI for any appCalls, transfers, statuses
Your Asteriskno PBX replacementPBX settings stay as they are

Capabilities

What you get with AMI, AGI, and ARI

See the whole callEvery step of a call is logged, from the IVR to the end of the conversation.
Calls from any appWhether it's a third-party service or software your developers built, the connector gives it Asterisk calls, transfers, and queues.
Metrics for managersReal-time monitoring shows agent occupancy and queues with no lag, and every call shows up in reports afterward.
Several PBXs, one viewIf you run several Asterisk servers, the connector collects calls from all of them so managers see everything together.

Examples

How the connector handles a call

A call goes through three stages: deciding where to send it, handling the conversation, and saving the outcome. The connector is involved in each one.

Who's calling and where to send them

As soon as a call arrives, Asterisk asks the platform who's calling. If the customer has an assigned account manager, the call goes straight to that person, skipping the general queue. The menu options the customer pressed are saved, and the agent can see them.

  • Account manager matched by number
  • Menu choices on the call form
  • Routing by your rules
Option 1 of 3

Call stages appear in real-time monitoring right away, and in reports as soon as the conversation ends.

How it works

The Asterisk protocols the connector runs on

AMI

Events and commands

Over AMI, Asterisk sends a stream of events: a call started, was answered, was transferred, ended. The connector assembles them into a complete picture – where each call is right now, which agents are busy, and how many customers are in the queue – and sends commands back to the PBX over the same AMI.

  • Event stream from Asterisk
  • Commands: call, transfer, queue
  • Line status in real time

AGI

Guidance for the PBX mid-call

Through AGI, the PBX checks with the platform in the middle of a call when it needs an answer: whose customer this is and which account manager to route them to, what to save from the IVR. Call flows rely on your data, not just the PBX settings.

  • Customer's account manager by number
  • IVR answers saved
  • Call flows driven by your database

ARI

Special use cases – when needed

Day-to-day work doesn't need ARI – the connector gets by with two protocols, AMI and AGI. We turn on the third, ARI, when the PBX's built-in capabilities aren't enough and your own application has to control the call: bringing a voice bot into a live conversation, setting up a conference, playing a prompt, or recording each participant on a separate track.

  • Voice bot joins the conversation
  • Multi-party calls
  • Custom call flows

Reliability

Agents don't drop out of queues

If an agent's browser goes to sleep, the connector doesn't pull them from the queues right away: their phone still works, and they can take a call. When the tab wakes up, the agent's previous status comes back automatically. Live data is stored separately and survives a restart.

  • No false "Not ready"
  • Status restored automatically
  • Data intact after a restart

Setup

How we set up the connector with Asterisk

  1. 01AssessmentWe review how your PBX, queues, IVR, and transfers are set up.
  2. 02AccessYour PBX administrator creates an AMI user and opens a port for AGI. ARI is enabled only if you need special use cases.
  3. 03InstallationWe install the connector next to Asterisk – on our cloud server or on yours.
  4. 04Call flowsWe connect queues, customer account managers, and transfers to offices.
  5. 05TestingWe call test numbers and check monitoring and reports against the PBX log.
  6. 06Go-liveWe move agents onto the connector and check calls daily at first.

Requirements

What the Asterisk connector needs

Asterisk
A working Asterisk PBX with AMI enabled
Access
An AMI user with access to events and commands; ARI if needed
Network
The connector and Asterisk on the same network or able to reach each other
Server
2+ CPU cores and 512 MB of RAM – a dedicated or virtual machine
Platform
Our cloud server or yours
Cost
Setup and customization are billed in support plan hours

Preparation

What to prepare before connecting

What PBX do you have?Your Asterisk version, where it runs, and who maintains it today.
Is AMI open?An AMI user allowed to read events and send commands.
Which queues?A list of queues and the agents who take calls in them.
What's the call path?Your IVR, routing rules, and where calls get transferred.
Where is your customer database?Where to look up the assigned account manager for a calling customer.
What else connects to the PBX?Which other programs use AMI and ARI, so we can avoid conflicts.

Q&A

Frequently asked questions

What are AMI, AGI, and ARI in plain terms?

They're three ways software talks to Asterisk. Through AMI, the PBX reports on calls and carries out commands; through AGI, it checks with your software in the middle of a call. Our connector always uses both. ARI hands the entire call over to your application, so we turn it on only for a specific task.

Can we place calls from our own app?

From any app: web, desktop, or mobile, a third-party service, or software you built. The app sends requests to the connector's API to call a customer, transfer and end calls, change an agent's status, and get queue data.

Will we have to rebuild our Asterisk setup?

No. The connector plugs into the Asterisk you already run: we don't touch your numbers, IVR, or queues. We add only the call flows you ask for.

Why use the connector instead of working with AMI directly?

Raw AMI sends thousands of scattered events that you have to catch, parse, and link together. The connector does that for you and hands the contact center modules prebuilt "call," "agent," and "queue" objects.

What happens if an agent's browser stops responding?

At first, nothing: the agent's phone still works, so they stay in the queues. If the tab doesn't come back within a set time, the connector sets them to "Not ready" and removes them from the queues, so calls go to agents who are available.

When do you actually need ARI?

Queues, transfers, routing based on your customer database, and reports all work without it. You'll need ARI if your own application has to run the call: a bot joins mid-conversation, participants are joined by custom rules, or voices are recorded separately. It requires Asterisk 12 or later.

What if we don't have Asterisk yet?

We'll set up the PBX first – in our cloud or on your hardware – and then hook it up to the connector.

How much does the connector cost?

Setup is billed in hours from your support plan. Call flow customization is billed in development hours: $60 per hour on the Pro plan, or from the hour bundle on Maxi.

Glossary

Terms on this page

Connector
A prebuilt module that links the platform with telephony, a CRM, or another system. Learn more →
IP PBX
A company phone system that runs over the internet and your local network. Learn more →
AMI – Asterisk Manager Interface
The channel where Asterisk reports calls and takes commands. Learn more →
ARI – your own call apps in Asterisk
The interface through which your own app controls an Asterisk call. Learn more →
AGI – in-call decisions in Asterisk
How Asterisk asks an external program what to do during a call. Learn more →
IVR (interactive voice response)
A phone menu: the caller hears a greeting and picks the right department. Learn more →
CRM – customer relationship management
Where a company keeps its customers, deals, and full communication history. Learn more →
API (application programming interface)
The way programs exchange data with each other without a person in the loop. Learn more →
Cloud deployment (cloud)
The platform runs on the vendor's servers, and agents connect over the internet. Learn more →
AI voice agent
Talks to callers and resolves simple requests without a human agent. Learn more →
Agent occupancy
How much of their time on the line agents actually spend with customers. Learn more →
Virtual server
A software-defined machine that shares hardware with others. Learn more →
Call routing
Rules the system uses to decide who gets a call. Learn more →

Blog

Fresh from the blog

All articles →

Updated: