Audience: Admins, supervisors, and developers who need real-time visibility into calls or to trigger automations.
Goal: Enable and verify live call notifications via the dashboard widget or webhooks, with secure, reliable delivery.
Table of contents
- What are live call notifications?
- Compare notification types
- Prerequisites
- Enable Live Call Widget (UI)
- Set up Webhook notifications (API)
- Event types & payload schema
- Verify delivery & expected results
- Troubleshooting & limitations
- FAQs
- Support
What are live call notifications?
MyOperator provides two real-time streams of call activity:
- Live Call Widget (browser) — visual monitoring in the dashboard while agents/admins are logged in.
- Webhook (server-to-server) — JSON events pushed to your HTTPS endpoint for automation.
Compare notification types
Need | Use | Latency (typical) | Where it appears | Who uses it |
Visual monitoring | Live Call Widget | ~1–3s | Dashboard → Call Logs | Supervisors/agents |
Automated triggers | Webhook API | ~1–5s | Your server endpoint | Developers/ops |
Prerequisites
- Live Call Widget: Dashboard access, “Live updates” enabled, supported browser (Chrome, Firefox, Edge), reliable network/WebSocket access.
- Webhook API: Public HTTPS endpoint, ability to return 2xx within 30s, secret for signature verification, ability to log requests, and handle retries/idempotency.
Enable Live Call Widget (UI)
- Go to Dashboard → Call Logs.
- Click Settings → Live updates and toggle On.
- Keep the tab open/active to receive events (widget uses WebSocket/SSE).
- (Optional) Filter: show only specific numbers/teams.
- Confirm you see “Ringing/Connected/Disconnected” statuses updating live.
Set up Webhook notifications (API)
- Create endpoint (HTTPS POST) to receive JSON. Expect headers including a signature and event ID.
- In Admin → API Settings → Webhooks, click Add Endpoint and provide:
- Endpoint URL (HTTPS)
- Secret for HMAC signatures
- Subscribed events (initiated, connected, disconnected, missed, transferred)
- Save and click Send test event to validate 2xx response.
- Handle retries: MyOperator retries up to 3 times with backoff if your endpoint does not return 2xx.
Test with cURL
curl -X POST "https://your.api/notify" \
-H "Content-Type: application/json" \
-H "X-MO-Event-Id: ev_123" \
-H "X-MO-Signature: sha256=EXAMPLE_SIGNATURE" \
-d '{"event":"call_connected","call_id":"MO123456789","timestamp":"2025-07-21T12:45:00Z"}'
Verify signature (Node/Express)
import crypto from "crypto";
import express from "express";
const app = express();
app.use(express.json({ type: "*/*" }));
app.post("/notify", (req, res) => {
const secret = process.env.MO_SECRET;
const sig = req.header("X-MO-Signature"); // format: sha256=hex
const payload = JSON.stringify(req.body);
const hmac = crypto.createHmac("sha256", secret).update(payload).digest("hex");
if (sig !== `sha256=${hmac}`) return res.status(400).send("Invalid signature");
// idempotency: ignore duplicates
const eventId = req.header("X-MO-Event-Id");
// TODO: check store to skip if already processed
res.status(200).send("ok");
});
app.listen(3000);
Recommended responses
- Return 200 OK quickly (process async).
- Use idempotency by de-duping on X-MO-Event-Id.
- Log X-MO-Delivery-Attempt (if provided) for retry visibility.
Event types & payload schema
Common event types
- call_initiated, call_connected, call_disconnected, call_missed, call_transferred
Sample payload
{
"event": "call_connected",
"call_id": "MO123456789",
"caller_number": "+919876543210",
"receiver_number": "+911234567890",
"direction": "inbound",
"timestamp": "2025-07-21T12:45:00Z",
"duration_seconds": 0,
"metadata": {
"queue": "Sales",
"agent_id": "ag_72",
"recording_url": null
}
}
Field glossary (excerpt)
- call_id — unique per call; stable across events for correlation.
- direction — inbound | outbound.
- metadata.queue — ring group/queue name at event time.
- recording_url — may be null until available (post-processing).
Verify delivery & expected results
- Widget: statuses update within 1–3s on Call Logs when the tab is open.
- Webhook: events appear in your server logs within 1–5s; delivery success ≥ 99% with healthy endpoint.
- Where to confirm: Dashboard → API Settings → Webhooks → Delivery Logs (show event ID, attempts, response code).
- Success KPIs:
- Median event latency ≤ 3s (widget) / 5s (webhook)
- Webhook 2xx rate ≥ 99%
- Duplicate-event drop rate ~ 100% (idempotency in your app)
Troubleshooting & limitations
- Widget not updating: refresh browser; disable extensions blocking scripts; verify Live updates toggle; check network that blocks WebSocket/SSE.
- No webhook hits: ensure endpoint is HTTPS/public; check firewall/allowlist; confirm 2xx response and valid certificate.
- “Invalid signature”: compare full raw body for HMAC; ensure identical JSON serialization and correct secret.
- Duplicate events: expected during retries; de-dupe by event ID.
- Event ordering: not guaranteed across all nodes; order by timestamp or process using call_id.
- Timeouts: platform expects response within 30s; long processing should be async.
- Rate limits: burst traffic possible during campaigns; implement queueing/back-pressure.
- Security: enforce token/HMAC, HTTPS only, rotate secrets, and log minimal PII.
FAQs
Can I subscribe to only some events?
Yes—select specific event types in API Settings → Webhooks.
Can I send test events without making a real call?
Yes—use Send test event in the webhook settings or the cURL example above.
Will events include recordings?
A recording_url may be included after processing; not all events carry it.
Can I receive webhooks for specific numbers/queues only?
Create multiple endpoints with filters in API settings (if available) or filter in your handler.
Support
If deliveries fail or you see spikes in retries, open a ticket via Help → Support or email support@example.com with: Endpoint URL, Event IDs, timestamps, and your recent response codes.