Developers

Webhooks & click-to-call.

Signed webhooks for every call event, and four ways to start a call from your CRM, from a plain link to the REST API.

Click-to-call

There are four ways to start a call from outside the dialpad, from zero setup to a full integration.

Inside Meridian, every phone number (in contacts, call history, callbacks and voicemail) is a link. Click it and the softphone dials. In a tab that doesn't run the phone, the call is placed through the tab that does, and you see "Calling in your other tab". If the phone isn't started yet, the agent workspace opens with the confirmation bar described below.

Any page can link straight into the agent workspace:

text
https://centers.xoloip.com/agent?dial=%2B14155550148

The workspace opens with a confirmation bar, "Call +1 415 555 0148?", with Call (or Go available & call if the phone isn't started yet) and a button to dismiss it. The agent confirms, and the call goes through the same checks as a dial from the dialpad: calling hours, DNC, caller ID and usage.

  • Auto-dial. Owners and admins can switch on Auto-dial deep links in Workspace › Settings › General. Links then dial straight away, without the confirmation click, whenever the agent's softphone is ready.
  • Another tab. If the phone runs in another tab, the call is placed there and the bar reads "Calling … in your other tab".
  • Encoding. In a URL query, a raw + can be read as a space. Encode it as %2B when you build links in code.
  • tel: links are accepted too, so /agent?dial=tel:+14155550148 works.
  • Emergency numbers are never dialed. The bar says so instead.

3. Make Meridian your tel: handler

Agents can make every tel: link in any web app open Meridian. In the agent workspace, open Audio settings and choose Open phone links with Meridian. The browser asks to confirm. From then on, clicking a tel: link in your CRM, helpdesk or email opens the deep link above, in browsers that support this.

4. The REST API

For server-side integrations, POST /api/v1/calls places a call from a named agent's softphone. The agent's softphone connects on its own, with no click, then the customer is dialed. DNC and calling hours always block over the API, with no override.

Shell
curl -X POST https://centers.xoloip.com/api/v1/calls \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "agent_email": "agent@example.com", "to": "+14155550148" }'

See Place a call for every parameter and error.

Embedding in a CRM

Meridian can't be embedded in an iframe: it tells browsers never to show it inside another site's frame, and only Meridian's own pages may use the microphone. This protects agents from clickjacking and keeps the softphone in one place.

To connect a CRM, use a link or a new window instead:

Markup
<a href="https://centers.xoloip.com/agent?dial=%2B14155550148" target="meridian">Call</a>

A named target reuses the same tab for every click, so the agent keeps one workspace open next to the CRM. Or register the tel: handler and keep the CRM's own phone links.

Webhooks

Webhooks push events to your server as they happen: calls ringing, answered and completed, recordings ready, new voicemail, callbacks scheduled, contacts created, agents changing state and campaigns completing. They work when your plan includes webhooks. If it doesn't, the Webhooks page says so and no events are sent. To add them to your plan, contact us.

Add an endpoint

Owners and admins manage endpoints in Workspace › Developers: press Webhooks, then Add endpoint.

  • Endpoint URL: must use HTTPS and resolve to a public address. Private, loopback and link-local addresses are refused, and so are user names or passwords in the URL. The address is checked again on every delivery.
  • Description: optional, up to 200 characters.
  • Events: choose All events or Selected events and tick the ones you want. With All events, new event types are sent to the endpoint automatically.
  • Signing secret: shown once when you add the endpoint, starting with whsec_. Copy it then.

Payload

Every delivery is a POST with a JSON body:

Data
{
  "id": "0192f6d0-…",
  "type": "call.completed",
  "created_at": "2026-09-26T14:02:11.000Z",
  "tenant_id": "0192f6c0-…",
  "data": {
    "id": "0192f6c2-…",
    "direction": "outbound",
    "origin": "api",
    "status": "completed",
    "customer_number": "+14155550148",
    "agent": { "id": "0192f6c4-…", "name": "Example Agent", "email": "agent@example.com" },
    "talk_sec": 184,
    "metadata": { "crm_ticket": "T-1042" }
  }
}

The example is shortened. call.* events carry the full Call object.

Events

Fieldtypedescription
call.ringingRingingAn outbound customer is ringing, or an inbound call is offered to its first agent. Data: Call.
call.answeredConnectedAgent and customer are connected. Data: Call.
call.completedEndedThe call ended, whatever the outcome. Data: Call.
call.missedInbound, no agentAn inbound call ended without reaching an agent: abandoned, voicemail, after hours, overflow or no agents. Also fires call.completed. Data: Call.
call.abandonedInbound, hung upThe caller hung up in a queue after the queue's short-abandon time. Also fires call.completed. Data: Call.
call.dispositionedWrap-upThe agent saved a disposition. Data: Call.
recording.completedRecording readyA recording is ready to download, usually just after the call ends. Data: id, call_id, duration_sec, url.
voicemail.createdNew voicemailData: id, call_id, from, duration_sec, queue_id, user_id, created_at.
callback.scheduledCallbackFrom wrap-up, a queue, the app or the API. Data: id, contact_id, phone, scheduled_at, assigned_user_id, notes.
contact.createdContactCreated by hand, through the API, or automatically when a callback is scheduled for a number that has no contact yet. CSV imports don't fire it. Data: Contact.
agent.state_changedStatusAn agent changed status. Data: user_id, state, since, break_reason.
campaign.completedCampaignA campaign completed. Data: id, name, completed_at, reason.

The url in recording.completed is the API path /api/v1/calls/{call_id}/recording. Fetch it from https://centers.xoloip.com with an API key that has recordings:read.

Send test event posts a signed event of type webhook.test straight away, with data.message set. It isn't added to the delivery log. Make sure your receiver accepts it.

Headers

Fieldtypedescription
webhook-idstringThe event id, the same as id in the body. Identical on every retry: use it to ignore duplicates.
webhook-timestampintegerUnix time in seconds when the attempt was signed.
webhook-signaturestringv1, followed by the base64 HMAC-SHA256 signature. Read it as a space-separated list.
content-typestringapplication/json.
user-agentstringMeridian-Webhooks/1.

Deliveries follow the Standard Webhooks specification, so any Standard Webhooks library can verify them.

Verify the signature

The signature is an HMAC-SHA256 over the string webhook-id.webhook-timestamp.body, keyed with your secret without its whsec_ prefix, base64-decoded. Always verify against the raw request body, before parsing it, and reject timestamps older than 5 minutes. The Verifying signatures panel on the Webhooks page has a copy-ready version.

JavaScript
import crypto from "node:crypto"
import express from "express"

const secret = process.env.MERIDIAN_WEBHOOK_SECRET
const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64")
const TOLERANCE_SEC = 5 * 60

function verify(headers, body) {
  const id = headers["webhook-id"]
  const timestamp = headers["webhook-timestamp"]
  const signatures = headers["webhook-signature"] ?? ""
  if (!id || !timestamp) return false

  const age = Math.abs(Date.now() / 1000 - Number(timestamp))
  if (!(age <= TOLERANCE_SEC)) return false

  const expected = crypto
    .createHmac("sha256", key)
    .update(`${id}.${timestamp}.${body}`)
    .digest("base64")

  return signatures.split(" ").some((entry) => {
    const [version, signature] = entry.split(",")
    return (
      version === "v1" &&
      signature?.length === expected.length &&
      crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))
    )
  })
}

const app = express()

app.post(
  "/webhooks/meridian",
  express.raw({ type: "application/json" }),
  (req, res) => {
    const body = req.body.toString("utf8")
    if (!verify(req.headers, body)) return res.status(401).end()

    const event = JSON.parse(body)
    res.status(204).end()
    queueForProcessing(event)
  }
)

queueForProcessing stands for your own background work. Answer first, then process.

Retries and disabling

  • A delivery succeeds when your server answers with a 2xx status within 10 seconds. Anything else counts as a failure, including a redirect: redirects aren't followed.
  • Failed deliveries are retried after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours and 24 hours: 8 attempts over about two days. After the last attempt, the delivery is marked Dead.
  • If deliveries keep failing for 3 days since the last success, the endpoint is switched off with the reason "Deliveries failed for 3 days", and the workspace's owners and admins get an email. A disabled endpoint gets no new events, and events that happen while it's off aren't kept for it.
  • To turn it back on, fix your server, open the endpoint's Edit dialog and switch Enabled on. This resets the failure count. Then Redeliver the deliveries you need.
  • Retries mean an event can arrive more than once, and later events can overtake earlier ones. Deduplicate on webhook-id, and use created_at and the call's own timestamps to order what you store.

Manage an endpoint

The endpoints table shows each endpoint's URL, its events, its status (Enabled, Failing with the number of failures in a row, or Disabled), its last delivery and how many deliveries are queued. The row buttons are:

  • Send test event: sends a signed webhook.test event straight away.
  • Edit: change the URL, description, events or Enabled.
  • Rotate secret: makes a new signing secret, shown once. Deliveries are signed with it right away and the old secret stops working, so update your receiver first.
  • Delete: removes the endpoint and its delivery log.

Click an endpoint to open its delivery log. Filter it by All, Pending, Succeeded, Failed or Dead. Each delivery shows its event, attempts, response code, duration, next attempt and the start of your server's response. Press Redeliver to send any delivery again that isn't already queued.