🚀 Release v1.0.1 🛡️ Enterprise Hardened 🦀 OpenAlert v0.2.0 Hub

Emergency-grade alerting and response

Command every call, every time.

py-phone-caller is a production-ready emergency alert and notification platform that orchestrates voice calls and SMS with Python microservices, Asterisk PBX, and a cloud-native toolchain.

14
services & gateways
5
TTS engines
8081-9443
service ports
Stylized waveform representing outbound calls
Alert pipeline
Prometheus UI API Scheduler Asterisk
Calls + SMS Retry + Escalate

Architecture overview

An alert flow that never drops the signal

py-phone-caller is built as an event-driven, independently deployable microservice mesh. Triggers enter through a webhook, UI, or API, then fan out to a call pipeline that handles generation, playback, and escalation.

System map diagram for the emergency alert pipeline
01

Trigger and schedule

Prometheus Alertmanager, the dashboard, or a REST call pushes a notification. The scheduler and Celery worker handle future execution with Redis-backed tasks.

02

Call orchestration

The Asterisk caller places outbound calls, resolves on-call contacts, and plays generated audio through ARI channels.

03

Live monitoring

WebSocket listeners monitor call lifecycles, request text-to-speech audio on demand, and log outcomes in the call registry.

04

Retry and escalation

Failed or unacknowledged calls are retried automatically, escalating to backup contacts while SMS flows keep people informed.

Microservice lineup

14 services, one coordinated response

Each service is independently deployable, Docker-ready, and wired through Apache APISIX edge routing, Keycloak IAM single sign-on, REST APIs, and asynchronous queues.

asterisk_caller

Outbound call orchestrator that queues, places, and plays audio via Asterisk ARI.

Port 8081
Call path

asterisk_recaller

Retry engine that enforces windows, backoff, and escalation to backup contacts.

Worker
Resilience

asterisk_ws_monitor

Real-time ARI WebSocket listener for lifecycle events and playback triggers.

WebSocket client
Realtime

caller_register

Call registry that stores attempts, acknowledgements, and message payloads.

Port 8083
Persistence

generate_audio

Text-to-speech engine supporting gTTS, MMS, Piper, AWS Polly, and Kokoro.

Port 8082
TTS

caller_scheduler

Celery-driven scheduler for future calls with Redis-backed task queues.

Port 8086
Scheduling

caller_address_book

Contact and on-call rotation management, including CSV import and export.

Port 8087
Contacts

caller_sms

SMS gateway with Twilio support and an on-premise USB modem backend.

Port 8085
Messaging

caller_prometheus_webhook

Alertmanager-compatible webhook that fans alerts into calls and SMS flows.

Port 8084
Integration

py_phone_caller_ui

Flask dashboard for calls, schedules, users, and WebSocket event logs.

Port 5000
Interface

celery_worker

Background task processor that executes queued and scheduled call jobs.

Worker
Workers

py-phone-caller-utils

Shared library with Dynaconf settings, Piccolo ORM models, and telemetry hooks.

Library
Shared core

apache_apisix

Unified edge API gateway with SSL termination, dynamic path rewriting, rate limiting, and OIDC auth.

Port 9080 / 9443
API Gateway

keycloak_iam

Enterprise identity and access management providing SSO, RBAC roles, and M2M credentials.

Port 8180 / 8443
IAM / SSO

openalertd

Decentralized emergency alerting bridge (LoRa RF, BitChat BLE, Nostr, off-grid Wi-Fi /sos Captive Portal) with embedded NOC control plane.

Port 8090 / /sos
Decentralized

Capabilities

Built for urgent moments

Every layer is tuned for delivery speed, reliability, and operational visibility.

Web UI tour

See dashboards, schedules, call history, and live event logs in a guided walkthrough.

Open the tour

Enterprise SSO & Gateway

Single sign-on across the UI and OpenAlert NOC with Keycloak OIDC and Apache APISIX edge security.

Managed SMS & Lifecycle Stepper

Real-time delivery progression stepper (Ingested → Dispatched → Delivered/Failed) with auto-refresh.

Alert-first delivery

Call-only, SMS-only, SMS-before-call, or parallel call-and-SMS workflows.

Multi-engine voice

Generate audio with multiple cloud or offline TTS engines and cache outputs.

On-call intelligence

Contact routing, rotations, and escalation paths keep teams in the loop.

Observability ready

Telemetry hooks and event logging keep the full call lifecycle visible.

Deployment choice

Run via Docker Compose, systemd services, or full Ansible deployment.

Secure defaults

Dynaconf configuration and secrets management keep credentials out of Git.

Stack

Modern infrastructure, pragmatic choices

Python 3.12, Asterisk 18/20, Redis, PostgreSQL, and Celery anchor the runtime.

Asterisk PBX Python 3.12+ Apache APISIX Keycloak IAM Rust (OpenAlert) Celery + Redis PostgreSQL 18 (also 15) Kokoro TTS Dynaconf Docker / Podman Ansible OpenTelemetry

Ports

Service endpoints at a glance

Each service exposes a focused API. Only the needed ports should be exposed in production.

Service Port Purpose
asterisk_caller 8081 Place calls
generate_audio 8082 Generate TTS audio
caller_register 8083 Store call status
caller_prometheus_webhook 8084 Alertmanager webhook
caller_sms 8085 SMS gateway
caller_scheduler 8086 Schedule calls
caller_address_book 8087 Contact management
py_phone_caller_ui 5000 Web dashboard
apache_apisix 9080 / 9443 Unified Edge API Gateway & SSL
keycloak 8180 / 8443 IAM OIDC Realms & Admin Console
openalertd 8090 (/sos on :80) Decentralized Bridge, NOC Dashboard & Off-Grid SOS Portal

Deploy

From local runs to production stacks

Configure once with Dynaconf and ship in the model that fits your environment.

Configuration

Set configuration directories or point to a specific settings file.

export CALLER_CONFIG_DIR=src/config
# OR
export CALLER_CONFIG=/path/to/settings.toml

Docker Compose

Bring up the full stack with containers and service definitions.

cd deploy/compose
docker compose up -d

Get started

Local run example

Each service can run standalone with a shared configuration and PYTHONPATH.

export CALLER_CONFIG_DIR=src/config
export PYTHONPATH="src:$PYTHONPATH"
python3 -m asterisk_caller.asterisk_caller