Hold Lead Auto Dialer
Outbound hold-queue auto dialer on Asterisk.
CRM pushes leads into hold_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 hold_dialer_config. PSTN inbound stays on FreePBX.
Any idle agent
No master agent pin
AMI originate
Outbound only
How the pieces fit
HTTP APICRM upserts leads, closes tickets, schedules callbacks. Does not originate.
Socket hubAgent ready/pause, dashboard snapshot, dialer phases.
EnginesProgressive: one call per idle agent. Predictive: customer first, then any idle agent.
AMIDevice state, originate, bridge, MOH. Shared AMI_CALLERID. No inbound park.
Roster is hold_dialer_employee for module_id = hold_dialer. Skills are unused. form_type is stored for CRM/logging only. AMI only tracks roster 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 Off. Incoming DIDs stay on FreePBX. This process does not park or offer. Guide →Lead type
Callback Time gate on callback priorities (seeded id 2). Any idle agent may take it when due. Guide →Shared
Settle & retry Hangup map, [2,2,2,2], Abandoned +5 min, dispose archive, wrap, pauses. Guide →Reference
HTTP API Auth, lead push, escalated tickets, callback request, health. Guide →Life of a lead
- CRM
POST /api/leadsupserts byoli_id. Status is Pending, or Callback if a callback priority has a time. - Any idle ready agent claims the row:
Calling, reserved.call_countdoes not increment here. - Progressive originates the agent channel with shared
AMI_CALLERID. Predictive originates the customer Local channel, then bridges any idle agent on answer. - Hangup writes
hold_dialer_call_attempts(that is where the agent is stored). - Not Connected retries on
[2,2,2,2]. Abandoned retries in 5 minutes. At 8 NCs the row moves tohold_dialer_disposed.
Master has no agent_id column. Sending it on the API is a 400. Connected agent is on hold_dialer_call_attempts only. Agent SIP phones never show the customer number.
Dial status
| Status | Meaning | Claimed again? |
|---|---|---|
| Pending | In the pool | Yes, any idle agent |
| Callback | Waiting on callback_scheduled_at | When due, any idle agent |
| Calling | Reserved, originate in flight | No |
| Received | Talked | No (unless redial) |
| Not Connected | No answer / busy / congestion | After [2,2,2,2] next_retry_at |
| Abandoned | Customer left while waiting (predictive) | After 5 minutes |
| Rejected | Cancel / invalid / reject cause | No |
| Disposed | NC cap or CRM Close | No — archived off master |
Tables this process owns
| Table | Role |
|---|---|
hold_dialer_employee | Roster, panel pause/active. Skills unused for claim |
hold_dialer_config | Mode, wrap, ratio, retry, hours |
hold_dialer_priority | Queue order, callback flag (id 2) |
hold_dialer_master_data | Working leads. No agent pin |
hold_dialer_disposed | Final Disposal archive |
hold_dialer_call_attempts | Every settle, with agent + hold seconds |
hold_dialer_agent_declines | SIP deny on a live hold |
hold_dialer_agent_pauses | Panel pause intervals |
What this dialer does not do
- Take PSTN inbound (
handleInboundis off). - Match leads to agent skills.
- 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. - Leave Final Disposal rows on master.