PearlPBX2
Integrations

Connect PearlPBX2 to your CRM

An open, documented contract instead of a closed set of connectors for specific systems.

Webhooks

Two independent event chains for inbound and outbound calls. Every payload is signed with HMAC-SHA256, and the JSON template is edited right in the admin with ${placeholder} syntax — changes apply with no service restart, because the webhook configuration is pushed to Redis immediately. Filtering by dialplan context, routing table, or queue lets a webhook fire only for the calls you care about, and correlation via linkedid ties together every leg of a multi-part call (transfers, conferences). Delivery is best-effort, with a configurable timeout and a retry after 2 seconds; call.ended is deduplicated via Redis, so your CRM should still dedupe by uniqueid.

Inbound call
call.incomingcall.answeredcall.missedcall.ended
Outbound call
call.outgoingcall.outgoing_answeredcall.outgoing_ended
  • Every payload is signed with HMAC-SHA256 in the X-PearlPBX-Signature header.
  • Multi-leg calls (transfers, conferences) are correlated via linkedid.
  • Delivery is best-effort with a retry after 2 seconds; call.ended is deduplicated via Redis.
POST /your-crm/webhook · call.ended
{
  "event": "call.ended",
  "uniqueid": "1753000000.42",
  "linkedid": "1753000000.42",
  "channel": "PJSIP/trunk1-0000001a",
  "caller_id_num": "380501234567",
  "caller_id_name": "Customer",
  "exten": "s",
  "context": "incoming",
  "direction": "inbound",
  "answered": true,
  "duration": 42,
  "cause": "16",
  "cause_txt": "Normal Clearing",
  "billsec": "38",
  "answered_by_member": "Operator Petrenko",
  "recorded": true,
  "recording_url": "https://pbx.example.com/api/v1/recordings/1753000000.42/",
  "channel_vars": { "ULINE": "42" }
}

A 33-variable vocabulary

The payload template is validated against a fixed vocabulary of variables — any text outside this list is rejected right in the webhook edit form.

eventuniqueidlinkedidchannelchannel_varscaller_id_numcaller_id_nameextencontextqueuetimestampdurationcausecause_txtanswered_timebillsecrecordedrecording_expectedrecording_urlrecording_filemissedwait_timemember_namemember_interfacemember_numberringtimeholdtimeanswered_by_memberanswered_by_interfacedirectiondest_channeldial_statusanswered

Typical use cases

  • A screen pop in the CRM right on call.incoming.
  • Showing the agent's info on call.answered.
  • Closing the call card with duration and a recording link on call.ended.
  • A callback task on call.missed.
  • Click-to-call from the customer's card via the REST API.

REST API

Token authentication and a live OpenAPI 3.0 schema with Swagger UI and ReDoc. Architecture details are on the for engineers page.

POST/api/v1/calls/originate/Click-to-call without exposing the AMI secret to the CRM.
POST/api/v1/calls/conference/An ad-hoc conference with 2+ participants.
GET/POST/api/v1/queues/members/Queue-agent status and pause control.
GET/api/v1/recordings/<uniqueid>/Recording download with Range support.

The dashboard WebSocket feed

ws/asterisk/ accepts either a Django session or a DRF API token — which lets you embed the live PearlPBX2 dashboard right inside your own CRM interface, instead of only watching it on its own.