Astervis Docs

amoCRM Integration

Connect amoCRM for click-to-call, incoming call notifications, and automatic call logging

The amoCRM integration enables click-to-call directly from the customer card, incoming call notifications, automatic call logging with recordings, and CRM data synchronization.

Features

FeatureDescription
Click-to-callCall a customer with one click from the amoCRM widget
Incoming callsPop-up notification with contact name on incoming call
Call loggingAutomatic call record in the contact card
Call recordingsListen and download recordings from amoCRM
Missed callsAutomatic "Callback" task on missed call
Auto-create contactsNew contact + deal when an unknown number calls
Pipeline syncImport pipelines and statuses from amoCRM
User syncMap amoCRM users to Astervis operators
Contact syncImport contacts with phone numbers
Deal syncImport deals linked to contacts
Company syncImport companies from amoCRM

Requirements

  • amoCRM account with admin access
  • Astervis version 1.0.78 or higher
  • Configured ARI (Asterisk REST Interface) on the PBX server

When installing via astervis-installer v0.0.52+, ARI is configured automatically.

Setting Up

Copy the API Token in Astervis

  1. Go to SettingsIntegrationsamoCRM (click "Manage")
  2. In the AmoCRM Widget section, copy the API Token

The API Token is needed to link the amoMarket widget to your Astervis server.

Install the widget from amoMarket

  1. Open amoMarket and find Astervis Telephony
  2. Fill in the widget details:
    • Astervis Server URL — your server address (e.g., https://mycompany.astervis.io:8443)
    • API Token — copied from the previous step
  3. Click Save

Connect AmoCRM via OAuth

  1. Go back to Astervis → SettingsIntegrationsamoCRM
  2. In the Connect to AmoCRM section, enter your amoCRM subdomain (e.g., mycompany)
  3. Click Connect AmoCRM
  4. The amoCRM authorization page will open — click Allow to grant access

Sync data

After successful authorization, perform the initial sync:

  1. Go to the Pipelines tab → click Sync
  2. Go to the Users tab → configure mapping and sync
  3. If needed, sync Contacts, Deals, Companies

User Mapping

For click-to-call to work correctly, you need to map amoCRM users to Astervis operators.

  1. Go to the Users tab
  2. Click Sync amoCRM Users
  3. In the table, for each amoCRM user select the corresponding Astervis operator
  4. Click Save Mapping

Without user mapping, click-to-call will not work because the system cannot determine which extension to use for the call.

Click-to-call

After setting up user mapping, the widget allows one-click calling:

  1. Open a contact card in amoCRM
  2. In the Astervis widget, click a phone number or the call button
  3. First, a call will ring on your extension (SIP phone or softphone)
  4. After you answer, the system automatically dials the customer's number

How it works

Operator clicks "Call" in amoCRM

Astervis sends a command via ARI (Asterisk REST Interface)

Asterisk calls the operator's extension

Operator picks up the phone

Asterisk dials the customer via trunk

Both channels are joined in a bridge

Incoming Calls

On incoming calls, the amoCRM widget automatically shows a pop-up notification:

  • Known contact — displays the name with a link to the contact card
  • Unknown number — automatically creates a new contact and deal

What happens on an incoming call

  1. Asterisk receives an incoming call via trunk
  2. Astervis detects the call via ChannelCreated event through ARI WebSocket
  3. The system searches for the contact by phone number in amoCRM
  4. If found — sends a notification with contact data to the widget
  5. If not found — creates a new contact and deal, then sends the notification

Incoming call detection works universally on any FreePBX/Asterisk configuration, without dialplan changes.

Missed Calls

When an incoming call is missed, the system automatically:

  1. Sends a call_missed notification to the widget
  2. Creates a "Callback" task in amoCRM linked to the contact
  3. The task is of type "Call" with a deadline of tomorrow

Call Logging

All completed calls are automatically logged to the contact card in amoCRM:

FieldDescription
DirectionInbound / Outbound
DurationCall duration in seconds
StatusAnswered / Not answered
RecordingLink to listen/download
Source"Astervis"
Date and timeCall start time

Call Recordings

If Asterisk records calls, recordings are automatically attached to the call log. Recording links are:

  • Protected with HMAC signature (SHA-256)
  • Valid for 30 days
  • Available for playback directly in amoCRM

Asterisk typically stores recordings in /var/spool/asterisk/monitor/. This directory is mounted into the backend Docker container as /records.

Data Synchronization

Pipelines

Import pipelines and their statuses from amoCRM:

  1. Go to the Pipelines tab
  2. Click Sync
  3. All pipelines with their stages will be imported

Contacts

Import contacts with phone numbers:

  1. Go to the Contacts tab
  2. Select a date range (optional)
  3. Click Sync

Deals

Import deals linked to contacts and pipelines:

  1. Go to the Deals tab
  2. Select a date range
  3. Click Sync

Companies

Import companies from amoCRM:

  1. Go to the Companies tab
  2. Click Sync

Troubleshooting

Authorization error

  • Check that the subdomain is entered without .amocrm.ru (e.g., just mycompany)
  • Ensure the Astervis Telephony widget is installed in amoMarket and the API Token is entered correctly
  • Verify that your Astervis server is reachable at the specified URL

Click-to-call not working

  • Make sure user mapping is configured
  • Check that ARI is connected (backend logs should show ARI WebSocket connected)
  • Ensure the operator is using a SIP phone or softphone registered on the PBX

No incoming call notifications

  • Check that the widget is installed and Widget Token is entered
  • Ensure ARI WebSocket is connected with subscribeAll=true
  • Check backend logs for [ARI] Incoming call detected

Recordings not attaching

  • Verify the recordings directory is mounted (/var/spool/asterisk/monitor:/records)
  • Ensure RECORDING_SIGN_SECRET is set in .env
  • Check recording file name format (should contain the phone number)

Architecture

amoCRM Widget ←→ SSE (Server-Sent Events) ←→ Astervis Backend

                                            ARI WebSocket ←→ Asterisk PBX

                                              Redis Pub/Sub

                                            amoCRM REST API
  • SSE — real-time events from backend to widget (incoming call, answer, hangup)
  • ARI WebSocket — channel events from Asterisk (ChannelCreated, ChannelStateChange, ChannelDestroyed)
  • Redis Pub/Sub — internal event bus between modules
  • amoCRM REST API — contact search, task creation, call logging

Last updated on