Skip to main content

A self-hosted automated outbound dialer phone bot

Project description

Autodial PhoneBot

A self-hosted automated outbound dialer phone bot capable of using speech recognition and LLM to navigate IVRs and DTMFs, understand calls intelligently, process multiple calls concurrently, and broadcast messages.

Features

  • Concurrent Calls: Runs on FastAPI websockets handling multiple simultaneous Twilio Media Streams.
  • Transcripts: Auto-generates local call_logs/ JSON transcripts, tracking the context between user and AI continuously.
  • Fast Speech Recognition: Utilizes faster-whisper dynamically processing audio chunks in real-time.
  • Intelligent Response: Pipes transcribed data to an LLM via Ollama and outputs context-aware conversation responses natively handling IVR DTMF tone demands.
  • Message Broadcasting: Enables dispatching multiple calls programmatically via the /broadcast REST Endpoint.
  • Local TTS: Near-real-time vocal response generation via Piper TTS integration encoded gracefully to Twilio u-law compatibility standards over Websockets.

Installation

You can install the pacakge directly from the source code via pip in editable mode:

pip install -e .

Prerequisites Checklist:

  1. Have an active Ollama process serving the defined LLM_MODEL.
  2. Have Piper executable in PATH natively, downloading its required onnx models (PIPER_MODEL) to the execution directory.

Configuration

Make sure your target environment configures these necessary .env variables:

PORT=8000
OLLAMA_CHAT_URL=http://localhost:11434/api/chat
LLM_MODEL=llama3.2:3b
PIPER_MODEL=./en_US-lessac-medium.onnx
TWILIO_ACCOUNT_SID=...
TWILIO_AUTH_TOKEN=...
TWILIO_PHONE_NUMBER=...

Running the System

Start the server using its PyPI distributed script bin:

autodial

Or use:

python -m autodial.server

Endpoints

  • POST /dial: Trigger single call
    • Body: {"to_number": "+1...", "context": "...", "goals": "...", "keywords": "..."}
  • POST /broadcast: Broadcast to list of targets
    • Body: {"numbers": ["..."], "message": "Direct message to play", "context": "...", "goals": "...", "keywords": "..."}
    • Note: If message is provided, the bot plays it exactly once and hangs up immediately.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autodial-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autodial-0.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file autodial-0.1.0.tar.gz.

File metadata

  • Download URL: autodial-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for autodial-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6785d6fa65c7896ebd76da44ebe9d30c4946817d4cba06ba9191b7fc1e0d7a76
MD5 9c2fc7d9b2693a408b69629c2d86d2bf
BLAKE2b-256 5c9d1e894af0a424f758e493b84a29dc86721fe49f54b340fcb406dac5b0c264

See more details on using hashes here.

File details

Details for the file autodial-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: autodial-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for autodial-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f5befa1a9a7c5cbe9efe34b76fb833c3eddce1cae813c009417cdf1d76c7f52
MD5 977d5c8600b2e75185e91b9277d21c22
BLAKE2b-256 bad038f537d1e0e7410d2217cab91f2236582212fbca5c6c3418d70f428c1499

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page