Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

telnyx-sms-voice-bot

A lightweight Python automation tool for sending SMS messages and initiating voice calls using the Telnyx API. Built for personal automation workflows, notifications, and call routing.

Features

  • Send outbound SMS messages via Telnyx
  • Initiate and manage outbound voice calls
  • Webhook handler for inbound SMS and call events
  • Simple CLI interface for quick one-off sends
  • Environment-based config (no hardcoded credentials)

Requirements

  • Python 3.9+
  • A Telnyx account with an API key and a phone number
  • pip install -r requirements.txt

Installation

git clone https://github.com/Cyber1245-ai/telnyx-sms-voice-bot.git
cd telnyx-sms-voice-bot
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your Telnyx API key and phone number

Configuration

Copy .env.example to .env and fill in your credentials:

TELNYX_API_KEY=your_api_key_here
TELNYX_PHONE_NUMBER=+1XXXXXXXXXX

Usage

Send an SMS

python cli.py sms --to +1XXXXXXXXXX --message "Hello from the bot!"

Make a Voice Call

python cli.py call --to +1XXXXXXXXXX --say "This is an automated message."

Start the Webhook Server

python server.py

The webhook server listens on port 5000 by default and handles inbound SMS and call events from Telnyx.

Project Structure

telnyx-sms-voice-bot/
├── bot/
│   ├── __init__.py
│   ├── sms.py          # SMS send/receive logic
│   ├── voice.py        # Voice call logic
│   └── webhooks.py     # Inbound event handlers
├── cli.py              # Command-line interface
├── server.py           # Flask webhook server
├── config.py           # Config loader
├── requirements.txt
├── .env.example
└── README.md

Webhook Events Handled

Event Description
message.received Inbound SMS received
call.initiated Outbound call started
call.answered Call was answered
call.hangup Call ended

License

MIT License. See LICENSE for details.

About

Lightweight Python tool for SMS and voice call automation via the Telnyx API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages