EmpireUC: alerts and webhooks - Empire Telecom

EmpireUC: alerts and webhooks

Empire Telecom · EmpireUC developers

Get every phone event and AI alert in email, text, chat apps or your own system, signed and in real time.

Open Phones in the portal →Where: Sign in at empiretelecom.io/phones with your portal login.
Direct link: https://empiretelecom.io/phones/

EmpireUC tells you when something happens on your phones: a missed call, a voicemail, a 911 call, a text, a caller on hold too long, or (with the AI add-on) a caller who sounds upset or wants to cancel. Each alert rule picks the events, which calls it covers and where to send them. Sending to a webhook gives your own system every detail as JSON, signed so you know it is real.

At a glance

ItemDetail
WherePhones > Alerts in the Empire Telecom customer portal (portal admins)
Rule typesPhone events (anyone) and AI alerts (needs the AI add-on: describe what to catch in plain words, mood, key words)
DestinationsEmail, text message, Slack, Microsoft Teams, Google Chat, Discord, Zapier, Make, and any number of webhooks. Several per rule
TimingInstantly, or a daily or weekly summary
FormatJSON, POST, Content-Type: application/json
SecurityHTTPS only. Each rule has its own signing secret; every post carries X-EmpireUC-Signature
FiltersInbound or outbound, which extensions, minimum call length, and a schedule (only during or only outside its hours)
TestingSend a test on every rule posts a sample to each destination

Set up a rule

1Open Phones > Alerts and press New alert.
2Name it, and pick Phone events or AI alert.
3Events: pick All events or switch on the ones you want.
4Which calls: direction, extensions (the whole company or chosen people), shortest call to count, and a schedule (attach an existing one or make one there).
5Send to: click each place it should go and paste its details. For your own system, paste your HTTPS address under Webhook. Copy the signing secret shown there.
6Test: press Send a test, check every destination received it, then save.

Events

Event (the event field)What it meansHow fast
call.answeredCall answeredwithin about a minute of the call
call.completedCall completedwithin about a minute of the call
call.missedCall missedwithin about a minute of the call
call.recordedCall recordedwithin about a minute of the call
call.rec_failedCall recording failedwithin about a minute of the call
call.emergencyEmergency call (911)within about a minute of the call
queue.answeredRing group call answeredwithin about a minute of the call
queue.missedRing group call missedwithin about a minute of the call
voicemail.receivedVoicemail receivedwithin about a minute
call.ringingCall ringingwithin seconds, as it happens
call.busyCall busywithin seconds, as it happens
call.blockedCall blockedwithin seconds, as it happens
call.forwardCall forwardedwithin seconds, as it happens
call.holdCall on holdwithin seconds, as it happens
call.resumeCall resumedwithin seconds, as it happens
call.transferCall transferred (blind)within seconds, as it happens
call.consultCall transferred (consultative)within seconds, as it happens
call.parkCall parkedwithin seconds, as it happens
call.unparkCall unparkedwithin seconds, as it happens
call.pickupCall picked upwithin seconds, as it happens
queue.enteredRing group call waitingwithin seconds, as it happens
message.receivedText message receivedwithin seconds, as it happens
message.sentText message sentwithin seconds, as it happens
click_to_callClick to call resultas soon as the call is placed

AI alert rules send ai_alert. Daily and weekly summaries send call_alert_summary or ai_alert_summary (below).

What your webhook receives

One POST per alert, with these headers:

HeaderValue
Content-Typeapplication/json
User-AgentEmpireUC-AI-Alerts/1.0
X-EmpireUC-EventThe event, for example call.missed
X-EmpireUC-Signaturesha256=<hex HMAC-SHA256 of the raw body, keyed with the rule's signing secret>

Example body:

{ "event": "call.missed", "event_label": "Call missed", "from": "12125550100", "to": "101", "number_dialled": "17325550100", "ring_group": "", "answered": false, "id": "a7Hk2LmPq9", "rule": "Missed calls to the front desk", "rule_id": "rK3f8Zq1", "kind": "call", "call_id": "20261029143502004912-7d9", "direction": "inbound", "seconds": 0, "caller": "Pat Smith (212) 555-0100", "extension": "101", "ours": "Front desk", "why": [ "Call missed" ], "summary": "", "said": "", "mood": "", "at": "2026-10-29T18:35:02+00:00", "link": "https://empiretelecom.io/phones/#/aialerts", "account": "Sunrise Senior Living" }
FieldMeaning
event, event_labelWhat happened (see the events table)
idThe alert ID (unique; use it to ignore repeats)
rule, rule_idThe rule that sent it
from, toCaller and called party
number_dialledYour number the caller dialled
ring_groupThe ring group or queue, when there is one
answeredtrue, false, or null when it does not apply
kindcall, voicemail or message
call_idThe phone system's ID for the call (matches call history and recordings)
directioninbound or outbound
secondsCall length
callerCaller name and number, as shown in the portal
extension, oursYour extension and its name
whyList of reasons the rule matched
summary, said, moodAI alerts only: summary of the call, the key words said, and the caller's mood
atWhen it happened (ISO 8601, UTC)
linkOpens Alerts in the portal
accountYour account name

Daily and weekly summaries

{ "event": "call_alert_summary", "period": "daily", "rule": "Missed calls to the front desk", "rule_id": "rK3f8Zq1", "count": 2, "account": "Sunrise Senior Living", "link": "https://empiretelecom.io/phones/#/aialerts", "alerts": [ { "event": "call.missed", "from": "12125550100", "at": "2026-10-29T13:02:10+00:00", "...": "same fields as above" } ] }

Check the signature (recommended)

Compute an HMAC-SHA256 of the raw request body (the exact bytes, before parsing) with your rule's signing secret, and compare it with the header in constant time. Reject the post if they differ.

Node.js (Express)

const crypto = require('crypto'); app.post('/empireuc', express.raw({ type: 'application/json' }), (req, res) => { const sig = req.get('X-EmpireUC-Signature') || ''; const mine = 'sha256=' + crypto.createHmac('sha256', process.env.EMPIREUC_SECRET).update(req.body).digest('hex'); if (sig.length !== mine.length || !crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(mine))) return res.sendStatus(401); const alert = JSON.parse(req.body); // ... handle alert.event, alert.from, alert.call_id ... res.sendStatus(200); });

Python (Flask)

import hmac, hashlib, os from flask import Flask, request, abort app = Flask(__name__) @app.post("/empireuc") def empireuc(): raw = request.get_data() mine = "sha256=" + hmac.new(os.environ["EMPIREUC_SECRET"].encode(), raw, hashlib.sha256).hexdigest() if not hmac.compare_digest(mine, request.headers.get("X-EmpireUC-Signature", "")): abort(401) alert = request.get_json() return "", 200

PHP

$raw = file_get_contents('php://input'); $mine = 'sha256=' . hash_hmac('sha256', $raw, getenv('EMPIREUC_SECRET')); if (!hash_equals($mine, $_SERVER['HTTP_X_EMPIREUC_SIGNATURE'] ?? '')) { http_response_code(401); exit; } $alert = json_decode($raw, true); http_response_code(200);

Rules for your endpoint

  • HTTPS on a public address.
  • Answer fast with any 2xx status (within 8 seconds). Do the slow work after you reply.
  • No redirects: a 3xx counts as a failure.
  • Ignore repeats by id. Use call_id to join with call history and recordings from the API.
  • Failures show on the rule in the portal with the destination that failed. Fix the address and press Send a test.
  • New secret: press Regenerate on the rule; the old one stops working at once.

Chat apps: what to paste

DestinationPaste
SlackAn Incoming Webhook URL (hooks.slack.com/services/...)
Microsoft TeamsA Workflows webhook URL for the channel (Teams > channel > Workflows > "Post to a channel when a webhook request is received")
Google ChatThe space's webhook URL (chat.googleapis.com/...)
DiscordThe channel webhook URL (discord.com/api/webhooks/...)
ZapierA "Catch Hook" URL from Webhooks by Zapier (gets the same signed JSON as a webhook)
MakeA Custom webhook URL (gets the same signed JSON)
Email, textAddresses or mobile numbers, several allowed

More

Need a hand? Call Empire Telecom support at (732) 363-9898, email support@empiretelecomnj.com, or open a ticket in the customer portal.