๐ py-phone-caller Documentation Library¶
Welcome to the official documentation library for py-phone-caller and OpenAlert (openalertd).
py-phone-caller is an automated phone call, SMS, and SIP MESSAGE incident dispatching platform designed for mission-critical IT infrastructure, SRE teams, air-gapped appliances, and emergency operations. It bridges monitoring systems (Prometheus Alertmanager, Nagios, Zabbix, Grafana) and decentralized field mesh networks (OpenAlert LoRa RF, BitChat BLE, /sos Captive Portal, Nostr) with telephony networks (Asterisk 22 PBX, SIP Trunks, local SIP extensions, on-premise USB GSM/LTE modems with always-UCS-2 UTF-8 encoding, and Twilio) so critical alerts reliably reach on-call personnel even when the public Internet is unavailable.
๐งญ Documentation Map¶
docs/
โโโ README.md # ๐ You are here: Master Documentation Index
โโโ ../CHANGELOG.md # ๐ Unified Suite Changelog (v1.1.0)
โโโ 1.0.1-release.md # ๐ v1.0.1 Enhancement Deep-Dive Notes
โ
โโโ ๐๏ธ Architecture & Technical Reference
โ โโโ architecture-and-call-flows.md # ๐ End-to-End Call, Dual-Channel SMS/SIP, DTMF & Mesh Flows
โ โโโ services-and-endpoints.md # ๐ Complete Microservices & REST API Reference
โ โโโ uv-migration-and-workspace-guide.md # ๐ Python 3.14 UV Workspace, Maturin Rust SMS & Packaging
โ โโโ appsec-and-supply-chain-guide.md # ๐ก๏ธ AppSec, Supply-Chain & Non-Regression Developer Guide
โ
โโโ ๐ Operations, Gateway & Telephony Setup
โ โโโ ../deploy/docs/README.md # ๐ Modular Deployment Hub (Ansible, Compose, K8s/Helm, DEB/RPM, PyPI, ARM64/Air-Gap, 12-Gate Validation)
โ โโโ ENTERPRISE_GATEWAY_AND_IAM_GUIDE.md # ๐ก๏ธ Apache APISIX Gateway & Keycloak OIDC SSO Guide
โ โโโ freepbx-asterisk-setup-guide.md # ๐ FreePBX & Asterisk ARI / PJSIP / Ext 1000 Setup Guide
โ
โโโ ๐จ OpenAlert Decentralized Mesh & Nostr Bridge
โ โโโ openalert/README.md # ๐ก OpenAlert (`openalertd`) Architecture, BLE/LoRa/Captive Portal
โ โโโ openalert/NIP-ALERT.md # ๐ Formal NIP-ALERT (Kind 30000) Nostr Specification
โ โโโ openalert/CONFIGURATION_GUIDE.md # โ๏ธ Multi-Layered Configuration, Embedded Relay & NIP-57 Zaps
โ
โโโ ๐ฅ๏ธ Web Console & User Interface
โ โโโ web-ui-tour/README.md # ๐ฅ๏ธ Visual Walkthrough of the Multilingual Web Management UI
โ
โโโ ๐ Observability & Monitoring
โ โโโ opentelemetry-guide.md # ๐ Metrics (/metrics), Probes (/health, /ready), & OTel Tracing
โ โโโ tempo_traces.md # ๐ Grafana Tempo & TraceQL Distributed Tracing
โ
โโโ ๐๏ธ Archive
โโโ archive/README.md # ๐ฐ๏ธ Historical Pre-Release, Audit & Superseded Documentation
๐ Core Documentation Index¶
1. ๐ Operations & Deployment¶
-
5-Minute Local Quickstart (Zero VoIP Trunk Needed)
Fastest way to experience the suite live. Register the free Linphone softphone to local Asterisk PJSIP extension1000, receive a real offline-synthesized neural TTS voice alert, press4on your keypad to acknowledge, and receive an instant RFC 3428 SIPMESSAGEtext alert. -
Centralized Deployment Documentation Hub (
deploy/docs/)
The canonical, verified installation and operations hub. Covers modular guides01โ10:- Native Ansible (
site.yml) for Debian 13 (AllStarLink), Ubuntu 26.04 LTS, Rocky Linux 10, and AlmaLinux 10 (Tucny Asterisk22.9.0-1.el10,SELinux Enforcing) with ready-to-use local SIP extension1000(asterisk_sip_exten_1000_enabled), backup/restore/rollback, and OpenAlert adoption. - Docker / Podman Compose (full stack + hardware passthrough + gateway overlays).
- Kubernetes & Helm v3 (
43-resource Kustomize manifests &py-phone-caller-1.1.0.tgzchart withEndpointSlice). - Native Linux
.deb/.rpmpackages, PyPI wheels +systemd, and Release Packaging (build_all_releases.py). - Physical ARM64 & 100% Air-Gapped Appliances (Orange Pi 5 Plus RK3588, offline signed
file:APT mirror, offline TTS weights,IPAddressDeny=any). - 12-Gate End-to-End Validation Checklist (
deploy/docs/10-end-to-end-installation-validation.md). - Enterprise Gateway & Keycloak SSO Guide
Automated (Ansiblestack_topology: enterprise) and manual copy-and-paste deployment guide for Apache APISIX unified API gateway, Keycloak OIDC IAM, 3-tier RBAC (alert-admin,alert-operator,alert-viewer), M2M Alertmanager OAuth2 tokens, and public TLS termination. Also seedeploy/docs/07-enterprise-gateway-and-observability.md.
- Native Ansible (
-
Asterisk PBX Configuration & Examples (Native Linux)
Complete, copy-pasteable/etc/asterisk/configurations (sanitized with<PASSWORD>) for standalone Asterisk 18โ22 servers:http.conf,ari_py_phone_caller.conf,pjsip_py_phone_caller.conf(VoIP SIP trunks + mobile/VPN-ready local extension1000),extensions_py_phone_caller.conf(Stasis + TTS + DTMF4ACK${CURL(...)}callbacks),iax_py_phone_caller.conf,modules.conf, SELinux rules, and matchingsettings.toml/.secrets.toml. -
FreePBX & Asterisk GUI Setup Guide
Visual FreePBX configuration walkthrough (SIP/PJSIP Trunks, Extensions, Stasis Dialplan, ARI users, G.711 codecs) plus native Asterisk 22 Ansible automation and ready-to-use local SIP extension1000/ RFC 3428 SIPMESSAGEsetup.
2. ๐๏ธ Architecture & Technical Reference¶
-
Architecture & Call Flows
Comprehensive architecture guide detailing the 11 Python microservices +openalertdmesh bridge, domain-driven data boundaries, Mermaid sequence diagrams for outbound calls, real-time DTMF acknowledgment (4to ack,5to repeat), recaller/backup escalation, dual-channel contact routing (phone_number+sms_phone_number), smart SMS/SIPMESSAGEfailover, always-UCS-2 70-unit chunked USB GSM SMS, multi-engine offline TTS (Kokoro, Silero, Piper, MMS), Celeryp0_emergencyscheduling, and air-gapped design principles. -
Services & Endpoints Reference & Interactive OpenAPI 3.0 Explorer
Authoritative REST API reference and interactive multi-service OpenAPI 3.0.3 explorer (curlgenerator + downloadable.jsonspecs) covering all 8 Python services +openalertd, exact port allocations (8081โ8087,5000,8090/8088),/readyprobes, and Piccolo ORM database tables. -
Hardware Compatibility & Sovereign Field-Kit BOM Guide
Reference BOM for NOC rack appliances,/sosemergency field kits, and hilltop solar repeaters: Orange Pi / Raspberry Pi sizing, SIM7600 / Quectel EC25 USB GSM modems + persistentudevrules, sub-GHz LoRa serial radios, BlueZ BLE adapters, and rugged SIP handsets. -
Day-2 SRE Runbook & Self-Monitoring ("Who Watches the Watchmen?")
Turnkey Prometheus self-monitoring alert rules (prometheus-alerting-rules.yml), zero-downtime PostgreSQL & SQLite WAL backups, secret rotation, and DLQ/spool triage. -
Release Notes & Current Capabilities
Feature summary covering the Strategy-pattern TTS overhaul (Silero V3,/languages, cross-engine fallback), multilingual Flask-Babel RTL Web UI, Asterisk ARI circuit breaker, Redis distributed locks, dual-channel SMS/SIP routing, always-UCS-2 GSM SMS, OpenAlert mesh bridge, and upgrade guidance. -
UV Workspace & Packaging Guide
Developer guide covering the Python 3.14 multi-packageuvworkspace, unifieduv.lock, editable shared library linking (py_phone_caller_utils),maturinRust SMS backend (rust_engine) builds,pytest/ruffworkflows, wheel publishing, and multi-stage container builds. -
AppSec, Supply-Chain & Non-Regression Developer Guide
Contributor onboarding and operations playbook forTaskfile.yml,mise.toml, pre-commit hooks (task sec:fast), full SAST/SCA/IaC/SBOM/Cosign gates (task sec:ci,task sec:release), non-regression checks (task verify:all), and transactional single-package CVE upgrades with auto-rollback (task sec:fix:py,task sec:fix:rust).
3. ๐จ OpenAlert Decentralized Mesh & Nostr Bridge¶
-
OpenAlert Architecture (
openalertd)
Native Rust field mesh daemon bridging LoRa 868 MHz RF, BitChat BLE (Noise XX E2EE + BlueZ/Spreadtrum HCI self-healing),/sosWi-Fi Captive Portal (offline SVG CAPTCHA + GPS + optional NIP-57 Zaps), Nostr (NIP-ALERTKind 30000, 0xChat NIP-17 E2EE C2, Embedded Micro-Relay:8088), and direct USB GSM always-UCS-2 SMS topy-phone-caller. -
NIP-ALERT Specification (
Kind 30000)
Formal Nostr specification for parameterized replaceable alert events andXChaCha20-Poly1305group encryption. -
OpenAlert Configuration Guide
Multi-layered configuration reference (openalertd.toml), webhook auth, peering, and NIP-57 Lightning Zap adapter setup.
4. ๐ฅ๏ธ Web Console & Operator Experience¶
- Web UI Operator Tour
Visual screenshot walkthrough of the Flask-Babel multilingual Web Management UI (with Arabic/Hebrew RTL support): Dashboard & live TTS preview, Managed Calls & bulk ACK, Incident Audit Reports, Call Diagnostics, PBX WebSocket Events, Scheduled Calls, Dual-Channel Address Book (phone_number+sms_phone_number) & On-Call Calendars, User Management, and Managed SMS with CSV export.
5. ๐ Observability & Monitoring Integration¶
-
OpenTelemetry & Observability Guide
Dual-mode observability framework: Prometheus/metricsscraping, standardized/healthand/readyprobes, turnkey Grafana dashboard (deploy/dashboards/), and distributed OpenTelemetry tracing (OTLP gRPC). -
Grafana Tempo Tracing Guide
Querying and visualizing end-to-end distributed call and SMS traces using Grafana Tempo and TraceQL. -
Monitoring Script Integrations:
6. ๐๏ธ Historical Archive¶
- Archived Documentation Index
Preserved pre-release, historical audit, and superseded legacy guides (OPERATOR_INSTALLATION_GUIDE.md,1.0.0-release.md,release-1.0.0-audit-report.md,deployment-validation-report.md,virtualbox-setup.md, and 2025/2026 pre-release notes).
๐ฏ Quick Navigation by Role¶
| If you are... | Start here: |
|---|---|
| Evaluating the project in 5 minutes (no SIP trunk) | โก๏ธ 5-Minute Local Quickstart (Linphone + Exten 1000) |
| A Sysadmin / SRE installing for the first time | โก๏ธ Centralized Deployment Documentation Hub (deploy/docs/) |
| Deploying on ARM64 / 100% Air-Gapped hardware | โก๏ธ ARM64 Appliance & Air-Gapped Guide |
| Deploying Enterprise SSO (APISIX + Keycloak) | โก๏ธ Enterprise Gateway & Keycloak SSO Guide |
| A Telephony / PBX Administrator | โก๏ธ Asterisk PBX Configuration & Examples & FreePBX GUI Guide |
| Deploying Off-Grid Field Mesh (LoRa / BLE / Nostr) | โก๏ธ OpenAlert Architecture Guide |
| A Developer integrating with the REST API | โก๏ธ Services & Endpoints Reference |
| A Software Engineer contributing code | โก๏ธ UV Workspace & Packaging Guide ยท AppSec & Supply-Chain Guide |
| An Operations Engineer setting up Monitoring | โก๏ธ OpenTelemetry & Observability Guide |
๐ Security & Deployment Notice¶
Warning
py-phone-caller is designed to run within trusted local area networks (LANs), air-gapped segments, or isolated VLANs behind firewalls and gateways.
- Never expose internal microservice ports (
8081โ8087) directly to the public Internet. - Use the Enterprise Gateway & Keycloak SSO Guide (or Deployment Guide 07) for public ingress with TLS termination, Apache APISIX route protection, and OIDC RBAC authentication.