feat: add initial Hold Slayer AI telephony gateway implementation
Complete project scaffolding and core implementation of an AI-powered telephony system that calls companies, navigates IVR menus, waits on hold, and transfers to the user when a human answers. Key components: - FastAPI server with REST API, WebSocket, and MCP (SSE) interfaces - SIP/VoIP call management via PJSUA2 with RTP audio streaming - LLM-powered IVR navigation using OpenAI/Anthropic with tool calling - Hold detection service combining audio analysis and silence detection - Real-time STT (Whisper/Deepgram) and TTS (OpenAI/Piper) pipelines - Call recording with per-channel and mixed audio capture - Event bus (asyncio pub/sub) for real-time client updates - Web dashboard with live call monitoring - SQLite persistence via SQLAlchemy with call history and analytics - Notification support (email, SMS, webhook, desktop) - Docker Compose deployment with Opal VoIP and Opal Media containers - Comprehensive test suite with unit, integration, and E2E tests - Simplified .gitignore and full project documentation in README
This commit is contained in:
62
.env.example
Normal file
62
.env.example
Normal file
@@ -0,0 +1,62 @@
|
||||
# ============================================================
|
||||
# Hold Slayer Gateway Configuration
|
||||
# ============================================================
|
||||
# Copy to .env and fill in your values
|
||||
|
||||
# --- Database ---
|
||||
DATABASE_URL=postgresql+asyncpg://holdslayer:changeme@localhost:5432/holdslayer
|
||||
|
||||
# --- SIP Trunk ---
|
||||
SIP_TRUNK_HOST=sip.yourprovider.com
|
||||
SIP_TRUNK_PORT=5060
|
||||
SIP_TRUNK_USERNAME=your_sip_username
|
||||
SIP_TRUNK_PASSWORD=your_sip_password
|
||||
SIP_TRUNK_TRANSPORT=udp
|
||||
# Your phone number on the trunk (E.164)
|
||||
SIP_TRUNK_DID=+15551234567
|
||||
|
||||
# --- Gateway SIP Listener ---
|
||||
# Port for devices (softphones/hardphones) to register to
|
||||
GATEWAY_SIP_HOST=0.0.0.0
|
||||
GATEWAY_SIP_PORT=5080
|
||||
GATEWAY_SIP_DOMAIN=gateway.helu.ca
|
||||
|
||||
# --- Speaches STT ---
|
||||
SPEACHES_URL=http://perseus.helu.ca:22070
|
||||
SPEACHES_PROD_URL=http://pan.helu.ca:22070
|
||||
SPEACHES_MODEL=whisper-large-v3
|
||||
|
||||
# --- Audio Classifier ---
|
||||
# Thresholds for hold music detection (0.0 - 1.0)
|
||||
CLASSIFIER_MUSIC_THRESHOLD=0.7
|
||||
CLASSIFIER_SPEECH_THRESHOLD=0.6
|
||||
CLASSIFIER_SILENCE_THRESHOLD=0.85
|
||||
# Analysis window in seconds
|
||||
CLASSIFIER_WINDOW_SECONDS=3.0
|
||||
|
||||
# --- LLM (OpenAI-compatible API) ---
|
||||
# Ollama, LM Studio, vLLM, or OpenAI — any OpenAI-compatible endpoint
|
||||
LLM_BASE_URL=http://localhost:11434/v1
|
||||
LLM_MODEL=llama3
|
||||
LLM_API_KEY=not-needed
|
||||
LLM_TIMEOUT=30.0
|
||||
LLM_MAX_TOKENS=1024
|
||||
LLM_TEMPERATURE=0.3
|
||||
|
||||
# --- Hold Slayer ---
|
||||
# Default device to transfer to when human detected
|
||||
DEFAULT_TRANSFER_DEVICE=sip_phone
|
||||
# Max hold time before giving up (seconds)
|
||||
MAX_HOLD_TIME=7200
|
||||
# How often to check classification while on hold (seconds)
|
||||
HOLD_CHECK_INTERVAL=2.0
|
||||
|
||||
# --- Notifications ---
|
||||
# SMS notification number (optional)
|
||||
NOTIFY_SMS_NUMBER=+15559876543
|
||||
|
||||
# --- Server ---
|
||||
HOST=0.0.0.0
|
||||
PORT=8000
|
||||
DEBUG=true
|
||||
LOG_LEVEL=info
|
||||
Reference in New Issue
Block a user