Call quality is not a single number you check once. It is a stream of measurements — MOS, jitter, latency, packet loss — that arrive while a call is active and that you need to inspect afterward. This sample puts that stream into a Flask dashboard with live SSE updates, SQL-backed history, and threshold alerting, all verifiable without a Telnyx account.
I work with Telnyx. The code is available here: https://github.com/team-telnyx/telnyx-code-examples/tree/main/call-quality-monitor
What the sample does
The Call Quality Monitor receives Telnyx call quality webhooks, verifies each payload's Ed25519 signature, and stores the metrics in SQLite for historical analysis. An in-memory key-value store tracks per-call state so the dashboard can show what is happening right now. When MOS drops below a threshold or jitter exceeds a limit, an alert fires and is pushed to the browser over a Server-Sent Events stream.
The dashboard at / shows live metrics and alerts. The API exposes filtered queries by call ID, time range, and aggregate statistics. A demo server (demo/demo_server.py) generates an Ed25519 keypair on first run, signs webhook payloads, and posts them to the real /webhooks/call-quality endpoint — the full pipeline runs end-to-end on localhost:5555 without Telnyx credentials or ngrok.






