Skip to content

๐Ÿ“š 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 extension 1000, receive a real offline-synthesized neural TTS voice alert, press 4 on your keypad to acknowledge, and receive an instant RFC 3428 SIP MESSAGE text alert.

  • Centralized Deployment Documentation Hub (deploy/docs/)
    The canonical, verified installation and operations hub. Covers modular guides 01โ€“10:

    • Native Ansible (site.yml) for Debian 13 (AllStarLink), Ubuntu 26.04 LTS, Rocky Linux 10, and AlmaLinux 10 (Tucny Asterisk 22.9.0-1.el10, SELinux Enforcing) with ready-to-use local SIP extension 1000 (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.tgz chart with EndpointSlice).
    • Native Linux .deb / .rpm packages, 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 (Ansible stack_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 see deploy/docs/07-enterprise-gateway-and-observability.md.
  • 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 extension 1000), extensions_py_phone_caller.conf (Stasis + TTS + DTMF 4 ACK ${CURL(...)} callbacks), iax_py_phone_caller.conf, modules.conf, SELinux rules, and matching settings.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 extension 1000 / RFC 3428 SIP MESSAGE setup.


2. ๐Ÿ›๏ธ Architecture & Technical Reference

  • Architecture & Call Flows
    Comprehensive architecture guide detailing the 11 Python microservices + openalertd mesh bridge, domain-driven data boundaries, Mermaid sequence diagrams for outbound calls, real-time DTMF acknowledgment (4 to ack, 5 to repeat), recaller/backup escalation, dual-channel contact routing (phone_number + sms_phone_number), smart SMS/SIP MESSAGE failover, always-UCS-2 70-unit chunked USB GSM SMS, multi-engine offline TTS (Kokoro, Silero, Piper, MMS), Celery p0_emergency scheduling, 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 (curl generator + downloadable .json specs) covering all 8 Python services + openalertd, exact port allocations (8081โ€“8087, 5000, 8090/8088), /ready probes, and Piccolo ORM database tables.

  • Hardware Compatibility & Sovereign Field-Kit BOM Guide
    Reference BOM for NOC rack appliances, /sos emergency field kits, and hilltop solar repeaters: Orange Pi / Raspberry Pi sizing, SIM7600 / Quectel EC25 USB GSM modems + persistent udev rules, 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-package uv workspace, unified uv.lock, editable shared library linking (py_phone_caller_utils), maturin Rust SMS backend (rust_engine) builds, pytest / ruff workflows, wheel publishing, and multi-stage container builds.

  • AppSec, Supply-Chain & Non-Regression Developer Guide
    Contributor onboarding and operations playbook for Taskfile.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), /sos Wi-Fi Captive Portal (offline SVG CAPTCHA + GPS + optional NIP-57 Zaps), Nostr (NIP-ALERT Kind 30000, 0xChat NIP-17 E2EE C2, Embedded Micro-Relay :8088), and direct USB GSM always-UCS-2 SMS to py-phone-caller.

  • NIP-ALERT Specification (Kind 30000)
    Formal Nostr specification for parameterized replaceable alert events and XChaCha20-Poly1305 group 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


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.