Overview
In-house outbound and inbound dialer on Asterisk.
CRM pushes leads into dialer_master_data. Agents join a Socket.IO panel. One process claims rows, originates through AMI, and settles hangups. Mode is Progressive or Predictive from dialer_config. Inbound PSTN is always on.
Skill-only claim
No master agent pin
AMI originate
Unlimited hold
How the pieces fit
HTTP APICRM upserts leads, closes tickets, schedules callbacks, unholds disposed rows. Does not originate.
Socket hubAgent ready/pause (picker reason required), dashboard snapshot, dialer phases, inbound ringing, redial.
EnginesProgressive: one call per idle agent. Predictive: customer first, then skill bridge.
AMI + inboundDevice state, originate, bridge, MOH. PSTN park and skill offer.
Roster is dialer_employee for module_id = in_house_operations. Skills JSON must include the lead form_type. AMI only tracks those extensions. Config reloads every 30 seconds; switching dialer_type waits until the floor is idle.
Engine
Progressive Agent-first AMI originate. One live outbound per desk. Guide →Engine
Predictive Customer-first Local originate, ratio pacing, unlimited hold, decline cooldown. Guide →PSTN
Inbound Park on hold music, look up by phone, offer a skilled idle agent. Blocks outbound on that desk. Guide →Lead type
Callback Time gate on callback priorities. Any matching skill may take it when due. Guide →Shared
Settle & retry Hangup map,retry_pattern for NC, Abandoned retry_seconds, wrap, pauses, remarks, maintenance, redial, CRM posts.
Guide →
Reference
HTTP API Auth, lead push, escalated tickets, callback request, unhold, pause reasons, health. Guide →Life of a lead
- CRM
POST /api/leadsupserts byoli_idand mints a newdata_id(returned on the 201). Status is Pending, or Callback if a callback priority has a time. - An idle ready agent with matching skill claims the row:
Calling, reserved.call_countdoes not increment here. - Progressive originates the agent channel. Predictive originates the customer Local channel, then bridges a skilled agent on answer.
- Hangup settles master + a row on
dialer_call_attempts(agent,call_type, and the masterdata_idat settle). - Not Connected retries on
dialer_config.retry_pattern(currently[4,4,3,2,1,1,1,1,1,1,1]) untilmax_tries(currently 20). Abandoned is not on that cycle — it keeps a futurenext_retry_at, otherwise waitsretry_seconds(currently 3600). Received / Rejected / Disposed stop unless socketredialor CRMPOST /api/unholdDialerData.
Master has no agent_id column. Sending it on the API is a 400. Connected agent is on dialer_call_attempts only.
Dial status
| Status | Meaning | Claimed again? |
|---|---|---|
| Pending | In the pool | Yes, skill + priority allowlist |
| Callback | Waiting on callback_scheduled_at | When due, skill + priority allowlist |
| Calling | Reserved, originate in flight | No |
| Received | Talked | No (unless redial) |
| Not Connected | No answer / busy / congestion | After retry_pattern / retry_seconds |
| Abandoned | Customer left while waiting (predictive / inbound) | After retry_seconds (or existing next_retry_at) |
| Rejected | Cancel / invalid / reject cause | No (unless redial) |
| Disposed | NC cap or CRM Close | No unless redial or unholdDialerData |
Tables this process owns
| Table | Role |
|---|---|
dialer_employee | Roster, skills, priority_ids, panel pause/active |
dialer_config | Mode, wrap, ratio, retry, hours, isMaintainance |
dialer_priority | Queue order, callback flags |
dialer_master_data | Leads. No agent pin |
dialer_master_push_log | One row per lead written by POST /api/leads / /api/master: oli_id, data_id, priority_id, pushed_date |
dialer_call_attempts | Every settle, with agent, hold seconds, master data_id snapshot, previous_dial_status (master at claim), and call_type (outgoing / incoming / redial) |
dialer_agent_declines | SIP deny on a live hold (same call_type values) |
dialer_agent_pauses | Panel pause intervals |
dialer_api_call_log | Hold / RNR / NC / remarks CRM posts |
dialer_after_hours_calls | After-hours DID misses (announce path only) |
What this dialer does not do
- Pin a lead to one employee on master.
- Cap hold time (
hold_timeout_secondsis unused leftover). - Apply a drop-rate brake (
max_abandon_rateis unused). - Originate through
call.php. - Count Abandoned toward
max_tries. - Hang a live call when maintenance or pending remarks turn on (only new originates / redials / inbound offers stop).