Metadata-Version: 2.4
Name: py-phone-caller
Version: 1.1.0
Summary: Sovereign Asterisk 22 voice alerting, offline neural TTS, and SMS/SIP notification platform
Author: Jorge Carlos Franco & py-phone-caller contributors
License: BSD-3-Clause
Project-URL: Homepage, https://jcfdeb.github.io/py-phone-caller/
Project-URL: Documentation, https://jcfdeb.github.io/py-phone-caller/manual/
Project-URL: API Explorer, https://jcfdeb.github.io/py-phone-caller/manual/api-explorer/
Project-URL: Repository, https://github.com/jcfdeb/py-phone-caller
Project-URL: Changelog, https://github.com/jcfdeb/py-phone-caller/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/jcfdeb/py-phone-caller/issues
Keywords: asterisk,ari,voip,sip,alerting,prometheus,alertmanager,tts,sms,incident-response
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Telecommunications Industry
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Communications :: Telephony
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.9.0
Requires-Dist: aiobreaker>=1.2.0
Requires-Dist: asyncpg>=0.30.0
Requires-Dist: billiard>=4.2.0
Requires-Dist: celery[redis]>=5.4.0
Requires-Dist: click<8.2.0
Requires-Dist: dynaconf>=3.2.0
Requires-Dist: flask-login>=0.6.3
Requires-Dist: kombu[redis]>=5.4.0
Requires-Dist: opentelemetry-api>=1.24.0
Requires-Dist: opentelemetry-exporter-otlp>=1.24.0
Requires-Dist: opentelemetry-exporter-prometheus>=0.45b0
Requires-Dist: opentelemetry-instrumentation-aiohttp-client>=0.45b0
Requires-Dist: opentelemetry-instrumentation-aiohttp-server>=0.45b0
Requires-Dist: opentelemetry-instrumentation-asyncpg>=0.45b0
Requires-Dist: opentelemetry-instrumentation-celery>=0.45b0
Requires-Dist: opentelemetry-instrumentation-flask>=0.45b0
Requires-Dist: opentelemetry-instrumentation-requests>=0.45b0
Requires-Dist: opentelemetry-instrumentation-system-metrics>=0.45b0
Requires-Dist: opentelemetry-sdk>=1.24.0
Requires-Dist: piccolo>=1.28.0
Requires-Dist: prometheus-client>=0.20.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: PyJWT[crypto]>=2.8.0
Requires-Dist: pytz>=2024.1
Requires-Dist: requests>=2.31.0
Requires-Dist: twilio>=9.0.0
Requires-Dist: websockets>=13.0
Requires-Dist: werkzeug>=3.0.0
Provides-Extra: services
Requires-Dist: aiohttp>=3.9.0; extra == "services"
Requires-Dist: aiobreaker>=1.2.0; extra == "services"
Provides-Extra: ui
Requires-Dist: asgiref>=3.8.0; extra == "ui"
Requires-Dist: flask>=3.0.0; extra == "ui"
Requires-Dist: flask[async]>=3.0.0; extra == "ui"
Requires-Dist: flask-babel>=4.0.0; extra == "ui"
Requires-Dist: flask-session>=0.8.0; extra == "ui"
Requires-Dist: gunicorn>=21.2.0; extra == "ui"
Requires-Dist: hypercorn>=0.16.0; extra == "ui"
Provides-Extra: audio
Requires-Dist: audioop-lts>=0.2.1; python_version >= "3.13" and extra == "audio"
Requires-Dist: boto3>=1.34.0; extra == "audio"
Requires-Dist: gTTS>=2.5.4; extra == "audio"
Requires-Dist: huggingface-hub>=0.24.0; extra == "audio"
Requires-Dist: kokoro>=0.9.4; extra == "audio"
Requires-Dist: num2words<0.5.15,>=0.5.13; extra == "audio"
Requires-Dist: numpy>=2.0.0; extra == "audio"
Requires-Dist: piper-tts>=1.2.0; extra == "audio"
Requires-Dist: pydub>=0.25.1; extra == "audio"
Requires-Dist: scipy>=1.13.0; extra == "audio"
Requires-Dist: soundfile>=0.12.1; extra == "audio"
Requires-Dist: torch>=2.4.0; extra == "audio"
Requires-Dist: torchaudio>=2.4.0; extra == "audio"
Requires-Dist: torchvision>=0.19.0; extra == "audio"
Requires-Dist: transformers>=4.44.0; extra == "audio"
Provides-Extra: all
Requires-Dist: asgiref>=3.8.0; extra == "all"
Requires-Dist: audioop-lts>=0.2.1; python_version >= "3.13" and extra == "all"
Requires-Dist: boto3>=1.34.0; extra == "all"
Requires-Dist: flask>=3.0.0; extra == "all"
Requires-Dist: flask[async]>=3.0.0; extra == "all"
Requires-Dist: flask-babel>=4.0.0; extra == "all"
Requires-Dist: flask-session>=0.8.0; extra == "all"
Requires-Dist: gTTS>=2.5.4; extra == "all"
Requires-Dist: gunicorn>=21.2.0; extra == "all"
Requires-Dist: huggingface-hub>=0.24.0; extra == "all"
Requires-Dist: hypercorn>=0.16.0; extra == "all"
Requires-Dist: kokoro>=0.9.4; extra == "all"
Requires-Dist: num2words<0.5.15,>=0.5.13; extra == "all"
Requires-Dist: numpy>=2.0.0; extra == "all"
Requires-Dist: piper-tts>=1.2.0; extra == "all"
Requires-Dist: pydub>=0.25.1; extra == "all"
Requires-Dist: scipy>=1.13.0; extra == "all"
Requires-Dist: soundfile>=0.12.1; extra == "all"
Requires-Dist: torch>=2.4.0; extra == "all"
Requires-Dist: torchaudio>=2.4.0; extra == "all"
Requires-Dist: torchvision>=0.19.0; extra == "all"
Requires-Dist: transformers>=4.44.0; extra == "all"
Dynamic: license-file

# py-phone-caller (`v1.1.0`)

<p align="center">
  <img src="https://raw.githubusercontent.com/jcfdeb/py-phone-caller/main/docs/assets/og-py-phone-caller.png" alt="py-phone-caller & OpenAlert Banner" width="820">
</p>

Sovereign emergency alerting, **Asterisk 22** outbound voice telephony, offline neural **Text-to-Speech (TTS)**, and dual-channel **SMS / RFC 3428 SIP `MESSAGE`** notification suite for production NOC and air-gapped environments.

- **Documentation Manual**: https://jcfdeb.github.io/py-phone-caller/manual/
- **Interactive OpenAPI 3.0 Explorer**: https://jcfdeb.github.io/py-phone-caller/manual/api-explorer/
- **Suite & OpenAlert Mesh Showcase**: https://jcfdeb.github.io/py-phone-caller/
- **Source Repository**: https://github.com/jcfdeb/py-phone-caller

---

## Installation

```bash
# Core services, Asterisk ARI caller, webhooks, scheduler, SMS & unified CLI:
pip install py-phone-caller

# Include the multilingual Flask Management Web UI (:5000):
pip install "py-phone-caller[ui]"

# Include offline neural TTS engines (Kokoro-82M, Silero, Piper ONNX, MMS, Polly, gTTS):
pip install "py-phone-caller[audio]"

# Install everything in one command:
pip install "py-phone-caller[all]"
```

---

## Quick CLI Usage

```bash
# Check installed version
py-phone-caller --version

# Inspect all 11 bundled microservices and their ports
py-phone-caller list-services

# Start any microservice via the unified dispatcher (or dedicated ppc-* binaries)
export CALLER_CONFIG=/etc/py-phone-caller/settings.toml
py-phone-caller run caller-register
py-phone-caller run asterisk-caller
py-phone-caller run ui
```

### Bundled CLI Entrypoints

| Command | Unified Equivalent | Default Port | Purpose |
| :--- | :--- | :--- | :--- |
| `py-phone-caller` | `py-phone-caller list-services` | — | Unified service launcher & CLI inspector |
| `ppc-asterisk-caller` | `py-phone-caller run asterisk-caller` | `8081` | Outbound voice calls via Asterisk ARI |
| `ppc-generate-audio` | `py-phone-caller run generate-audio` | `8082` | Multi-engine offline/cloud neural TTS (`8 kHz` WAV) |
| `ppc-caller-register` | `py-phone-caller run caller-register` | `8083` | Call registry, DTMF `'4'` ACK & Piccolo DB migrations |
| `ppc-caller-prometheus-webhook` | `py-phone-caller run caller-prometheus-webhook` | `8084` | Prometheus Alertmanager & OpenAlert webhook receiver |
| `ppc-caller-sms` | `py-phone-caller run caller-sms` | `8085` | Dual-channel SMS (USB GSM UCS-2 / Twilio) & SIP `MESSAGE` |
| `ppc-caller-scheduler` | `py-phone-caller run caller-scheduler` | `8086` | Celery/Redis scheduled & `p0_emergency` call dispatcher |
| `ppc-caller-address-book` | `py-phone-caller run caller-address-book` | `8087` | Contacts & time-windowed `oncall` rotation directory |
| `ppc-ui` | `py-phone-caller run ui` | `5000` | Multilingual Web Console (`7` languages + RTL) |
| `ppc-asterisk-ws-monitor` | `py-phone-caller run asterisk-ws-monitor` | *(worker)* | Asterisk Stasis WebSocket event consumer |
| `ppc-asterisk-recaller` | `py-phone-caller run asterisk-recaller` | *(worker)* | Unacknowledged call retry & backup escalation loop |
| `ppc-celery-worker` | `py-phone-caller run celery-worker` | *(worker)* | Priority queue & scheduled task execution worker |

---

## License

Released under the **BSD 3-Clause License**. Companion `OpenAlert` (`openalertd`) Rust mesh daemon is dual-licensed under **MIT OR Apache-2.0**.
