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.
10:02:11New call to a local number10:02:14Caller picked “2 – delivery” in the menu10:02:15Entered the “Delivery” queue, waiting 0:1810:02:33Anna answered, ext. 511810:05:45Call ended, 3:12 – sent to reportsCapabilities
What you get with AMI, AGI, and ARI
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
Asterisk asksWho's calling and where to route them?The platform findsVector LLC, account manager – AnnaMenu choice“2 – delivery” – shown in the call recordDecisionCall goes straight to ext. 5118, no general queueQueue, agent, transfers
The connector knows which agents are ready and which are on break, and adds them to queues or removes them. Transfers take one click: blind or warm, to a colleague or to an office – in which case the office numbers ring one after another, and you can see who answered.
- Blind or warm transfer
- Office numbers rung in sequence
- "Ready" and "Break" statuses
What's left after the call
When the conversation ends, the connector saves the call with all its stages: how long the customer waited, who answered, where the call was transferred. Reports are built from this, and the recording and outcome go to your CRM through integrations.
- Every stage stored in the database
- Wait times and transfers in reports
- Outcome sent to your CRM
Wait0:18 in “Delivery” queuein reportAnsweredAnna, ext. 5118in reportTransferto supervisor, with the callin reportRecording and summary“Delivery moved to Friday”in CRMCall 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
10:02:11New call to a local number10:02:14Caller picked “2 – delivery” in the menu10:02:15Entered the “Delivery” queue, waiting 0:1810:02:33Anna answered, ext. 511810:05:45Call ended, 3:12 – sent to reportsAGI
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
10:02:11+1 (555) 010-0115: rep Anna, ext. 5118found10:04:37+1 (555) 010-0142: not in database, general queuequeue10:05:02Menu answer “3 – return” saved to the callsaved10:06:19+1 (555) 010-0108: contract debt, collectionsfrom databaseARI
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
Voice botGot order number and delivery statusdoneBridgeCustomer, agent Anna, and supervisorin progressSuggestionPrompt played to the customer during the calldoneBookingSeparate customer and agent tracksin progressReliability
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
14:02Tab “fell asleep”, Anna stays in queuesin queue14:03Call from “Delivery” – Anna answered on her phoneon call14:06Tab back online, status restoredready14:10Service restarted, queues and statuses intactno lossesSetup
How we set up the connector with Asterisk
- 01AssessmentWe review how your PBX, queues, IVR, and transfers are set up.
- 02AccessYour PBX administrator creates an AMI user and opens a port for AGI. ARI is enabled only if you need special use cases.
- 03InstallationWe install the connector next to Asterisk – on our cloud server or on yours.
- 04Call flowsWe connect queues, customer account managers, and transfers to offices.
- 05TestingWe call test numbers and check monitoring and reports against the PBX log.
- 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
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 →
Updated: