The Asterisk–Elbuz CRM integration runs on your server: Elbuz places calls from the customer card via AMI, and a ready-made dialplan snippet reports every call. Works with Asterisk, FreePBX and Issabel.
When you need this:
- Managers don't know who's calling — the dialplan shows the customer's name from Elbuz on the phone.
- Numbers are dialed by hand — “Call” in the card: Asterisk connects the manager first, then the customer.
- Missed calls get lost — each becomes a “Call back” task in “Pulse”.
- Managers are busy — the administrator routes the number to the voice AI.
Where to start: ask your server administrator for an AMI user (what exactly).
What Elbuz does with Asterisk
- The customer's name on the phone — the dialplan looks it up in Elbuz by number (what reaches Elbuz).
- One-click calls from the customer card — through AMI, to the selected number (how the call goes).
- Call log — incoming and outgoing calls from the dialplan, with the manager who actually talked (how the manager is identified).
- Incoming and missed call card — the customer's city, recent orders, a “Call back” task (call card).
- AI employee on the number — call forwarding is set up by the server administrator (voice AI).
What you need from Asterisk
The AMI user is created by the server administrator. According to the Asterisk documentation, AMI is configured in the manager.conf file:
- In the
[general]section —enabled = yes; the default port is5038(theportparameter). - A separate user section, for example
[elbuz], with asecretpassword. - The user's
writemust include theoriginateclass — without it Asterisk won't let anyone place a call. - Reload the manager configuration on the server.
Access to AMI is restricted with the permit / deny parameters; the Asterisk documentation advises against exposing AMI to the internet unprotected. The Elbuz documentation doesn't list Elbuz server addresses for such a list — ask Elbuz support for them.
In FreePBX, AMI users are usually created in the web interface; check the FreePBX documentation for the exact menu item in your version.
The server must be reachable from the internet: Elbuz doesn't connect to local network addresses — the app checks the AMI address and rejects reserved ranges. Asterisk itself must also reach the Elbuz address over HTTPS, otherwise CURL() in the dialplan returns nothing.
Sources — the official Asterisk documentation:
How to connect Asterisk to Elbuz
Three steps in order: keys, extensions and the dialplan snippet. Without extensions the “Call” button doesn't work. Without the snippet the log stays empty: there is no hourly reconciliation for Asterisk.
Step one: Asterisk keys
Open the “Asterisk / FreePBX” row in the “Telephony” group. The “Active” switch is already on. The fields you fill in:
| Form field | What to enter |
|---|---|
| “AMI address (host:port)” | the server's public address and port, for example pbx.company.com:5038; without a port, 5038 is used |
| “AMI user and secret” | separated by a colon: elbuz:secret |
| “Line for outgoing calls” | the number the customer will see (Caller ); empty — the dialplan decides |
| “Employee channel” | how to dial an extension; the default is Local/{ext}@from-internal, other examples from the hint — PJSIP/{ext}, SIP/{ext} |
| “Dialplan context” | the context outgoing calls are allowed from; the default is from-internal, as in FreePBX |
1
Guide link2
Active switch3
AMI address4
AMI user and secret5
Employee channel6
Dialplan context7
Line for outgoing calls8
Check connection- The “Where exactly — step by step in the guide for your operator” link leads to this page.
- The “Active” switch — the integration is on.
- The “AMI address (host:port)” field — the public address of the server; without a port, 5038 is used.
- The “AMI user and secret” field — separated by a colon.
- The “Employee channel” field — Local/{ext}@from-internal by default.
- The “Dialplan context” field — from-internal by default.
- The “Line for outgoing calls” field — becomes the Caller ID shown to the customer.
- The “Check connection” button — a read-only request to the operator; changes nothing in the account.
The form saves itself about a second after each edit: “Saving...” appears at the bottom, then “Saved”. There is no “Save” button.
Finally, click “Test connection”. Elbuz only signs in to AMI without performing any action. The list of extensions isn't requested from Asterisk, so the reply is “Connected to the PBX. Employees in the PBX: 0”. Port and login errors are covered in troubleshooting.
Step two: extensions
When a manager clicks “Call”, Asterisk first rings their extension and dials the customer only after they answer. The same number links calls in the log to the manager.
Where: the employee card (“Users”) → the “Internal phone” field.
Elbuz substitutes the number for {ext} in “Employee channel”. With the default channel, extension 101 becomes Local/101@from-internal. Below the connection form, the “Employee extensions” card shows who doesn't have a number yet.
Step three: the dialplan snippet on the server
Instead of a webhook address, the form has a “PBX setup file” card with a “Download setup file” button. The elbuz-asterisk.conf file is a ready-made dialplan snippet with the Elbuz address and a secret key inside. The instructions are written in the file itself:
- Paste the block into
/etc/asterisk/extensions_custom.conf. - In the incoming context, before Dial, add
same => n,Gosub(elbuz-lookup,s,1(${CALLERID(num)},in,<extension the call goes to>)), and in its h extension —exten => h,1,Gosub(elbuz-report,s,1(${CALLERID(num)},in,)). - In the outgoing context, before Dial —
same => n,Gosub(elbuz-lookup,s,1(${EXTEN},out,${CALLERID(num)})), in the h extension —exten => h,1,Gosub(elbuz-report,s,1(${CDR(dst)},out,${CALLERID(num)})). - Reload the dialplan:
asterisk -rx "dialplan reload".
1
Download setup file- The “Download setup file” button — a ready file with the address and key inside.
The file contains the Elbuz address with the key and the host you opened the form from. If you changed the domain or re-created the service in the list, download the file again and replace the block on the server.
If you pasted the snippet earlier, replace it with the new one from the form. In the old one, the calls were the same for incoming and outgoing: incoming calls were logged without a manager, outgoing ones as incoming, and the call time was the time it ended.
To get Asterisk working with Elbuz
What reaches Elbuz
Everything below has been checked against the Elbuz Asterisk integration module, written according to the AMI documentation.
| Feature | How it works with Asterisk |
|---|---|
| Calls from the card and the log (“Call”) | yes, through AMI Originate: Asterisk rings the manager's channel, then dials the customer after they answer; it waits 30 seconds |
| Incoming and outgoing calls in the log | yes, only from dialplan events; each direction is connected with its own lines from the setup file |
| The customer's name on the phone screen | yes: the dialplan asks Elbuz for the name and puts it in CALLERID(name) |
| Incoming call card in Elbuz | yes: the employee's extension is passed as the third argument of the elbuz-lookup call |
| Call recording | no: the recording is a file on your server; there's no AI analysis either |
| Hourly log reconciliation | no: Asterisk has no call history via (log without reconciliation) |
| Number shown to the customer | yes: “Line for outgoing calls” becomes the Caller ID |
| Voice AI employee | set up by the server administrator (below) |
| Hanging up from the incoming call card | no: the card has no “Hang up” button for Asterisk |
The dialplan snippet makes two calls. Their arguments are the same: the first is the customer's number, the second is the direction (in or out), the third is the employee's extension.
- elbuz-lookup asks Elbuz who is calling before Dial: the name goes to CALLERID(name) on the phone, and in Elbuz the employee gets a pop-up with the customer card.
- elbuz-report sends to the log after the call ends: the number, direction, status, talk time, wait time (total duration minus talk time), call start time and identifier.
The snippet uses the CURL() function from the standard Asterisk build.
Asterisk specifics
Log without reconciliation
With cloud operators, an hourly reconciliation picks up missed events. Asterisk keeps call history (CDR) in a database on your server, unreachable via API, so reconciliation skips Asterisk. If the dialplan didn't call Elbuz, the call never appears in the log. Resending the same report won't create a duplicate: the call is recognized by its identifier.
How the manager is identified
The snippet passes the employee's extension as the third argument. For an incoming call, before Dial you specify which extension the call goes to — that employee gets the card pop-up. After the call, in the h extension, the number is taken from the channel that answered: if the call was transferred, the log gets the person who actually talked.
For an outgoing call, the extension is the employee's ${CALLERID(num)}, and the customer's number is ${EXTEN} before dialing and ${CDR(dst)} after.
Call result
The status is taken from the Asterisk DIALSTATUS. An unknown status is determined by the talk time.
| DIALSTATUS | “Result” in the Elbuz log |
|---|---|
| ANSWER | “Answered” |
| BUSY | “Busy” |
| NOANSWER | “No answer” |
| CANCEL | “Canceled” |
| CONGESTION, CHANUNAVAIL | “Connection failure” |
How a call from the button goes
Elbuz opens a short AMI session, sends Originate with the employee channel, context and customer number, and exits right away without waiting for a reply. If Asterisk rejects the command, you'll see its reason from the Message field.
Voice AI employee on an Asterisk number
The Elbuz AI employee can answer calls and call customers by itself. The conversation is handled not by your PBX but by the Elbuz voice platform, so the number has to be routed to it. The settings of the “Voice on the phone” section are in the article Voice AI employee.
Your Asterisk administrator routes the number to the AI. In the “Voice on the phone” section, enter the number, choose “Other operator” and copy the address <number>@<SIP domain>. Per the Asterisk documentation, any SIP URI can be dialed through an existing PJSIP endpoint: Dial(PJSIP/<endpoint>/sip:<number>@<SIP domain>). Elbuz doesn't provide a ready-made dialplan snippet for voice.
In the “Operator addresses” field, enter your server's public or domain — Elbuz then accepts calls to the SIP address only from it. A domain is resolved to an IP when the section is saved; if the server IP changes, edit any field in the “Voice” section to save it again. Empty — any address.
For outgoing AI calls, the “Outgoing calls” block needs “SIP server” (your Asterisk address), “Line login” and “Line password” — a SIP account the AI registers with as a phone. The administrator creates it the same way as for a regular SIP phone. For “Other operator”, the SIP server is required.
Outgoing calls work only when “Answer calls” is on: otherwise a test call replies “Outgoing calls are not set up: enter the line login and password and turn on answering calls”. By default the AI calls from 9 to 20 in the account's time zone — the “Call during hours” field.
Scenarios
Connect FreePBX in a typical setup
- The administrator creates an AMI user with the originate class and opens port 5038 externally (what you need).
- In the form — the address and
user:secret; “Employee channel” and “Dialplan context” stay at their defaults. - The dialplan snippet goes into extensions_custom.conf, the Gosub calls into the incoming and outgoing contexts (step three).
- A test call to the company number — and it's in the log.
A call was transferred to a colleague
An incoming call went to 101, and the manager transferred it to 102. The card pops up for the employee with extension 101, while the log records the call with manager 102 — the number is taken from the channel that answered (how the manager is identified).
A missed call doesn't get lost
The manager didn't pick up — a “Missed call” card pops up, and a “Call back” task appears in “Pulse”. In the log, “Missed only” filters these calls. More: missed calls.
What to do when Asterisk doesn't work with Elbuz
General telephony problems — no call button, an empty log — are covered in Telephony in Elbuz. This section covers what's specific to Asterisk.
| What you see | Why | What to do |
|---|---|---|
| There's no “Call” button in the contact list or in the card | The keys aren't entered or the “Active” switch is off — call buttons aren't shown at all then | Check the fields and the switch in the connection form (step one) |
| “Your employee card has no extension number” | The “Internal phone” field in your card is empty: the PBX has nowhere to call as the first step | Enter the number in the employee card (step two) |
| “The PBX rejected the request: not an Asterisk AMI port” | Something other than AMI answers at the specified host and port | Check the AMI port (5038 by default) and that it's open externally |
| “The PBX rejected the request: AMI login rejected (check user and secret)” | Wrong AMI user or secret, or they aren't separated by a colon | Check the user:secret pair in the AMI configuration |
| “The PBX rejected the request: PBX address must be a public host” | The AMI address points to a local network or doesn't resolve to a public one | Enter the server's public address |
| The log is empty although calls are coming in | The dialplan snippet isn't pasted, the Gosub calls aren't added, or the dialplan wasn't reloaded | Go through the three steps from the setup file and check that the server reaches the Elbuz address over HTTPS |
FAQ
Which Asterisk-based PBXs does the integration work with?
Asterisk, FreePBX and Issabel: all that matters is access to AMI and the ability to paste a dialplan snippet.
What should I enter in “Employee channel” and “Dialplan context”?
For most FreePBX setups — the default values already in the fields. For PJSIP or without FreePBX, take the PJSIP or SIP option from the hint under the “Employee channel” field (step one).
Why are there no calls in the log for the time the server was unavailable?
There is no hourly reconciliation for Asterisk: the call history sits in your server's database and can't be fetched via API. The log is filled only by dialplan events.
Does the integration work if Asterisk is in a closed office network?
No. AMI must be reachable from the internet at a public address, and the server must reach Elbuz over HTTPS (what you need).
Can I listen to a call recording from Asterisk?
No. The recording is a file on your server, and Elbuz can't build a link to it. There is no playback or AI analysis button for Asterisk.
Is there a ready-made dialplan for the voice AI?
No. Forwarding the number to the AI's SIP address is set up by the server administrator (voice AI).
Where to find it and who has access
The Asterisk connection lives among the other integrations, not in the call log. The window that opens from the operator row is called “API access settings for external services”.
- Menu
- Account → System settings → “Other settings” → “External services and integrations” → “Telephony” → “Asterisk / FreePBX”
- Other entry points
- “Call log” → menu → “Telephony connection”
- Access right
- system settings and the “Call log” window; you don't need any rights just to make calls
- Prepare
- the public address of Asterisk, an AMI user, administrator access to the dialplan
Without the right to “Call log”, “Test connection” and the setup file don't work.
Related topics
- If you need the big picture of telephony and a comparison of operators — Telephony in Elbuz.
- If the call is already in the log and you need to understand the columns or “Result” — Call log.
- If you want the AI to answer and call customers by itself — Voice AI employee.
- If calls aren't linked to a manager — Users, the “Internal phone” field.
- If you need to find a conversation in the customer's history — Contact card.
