npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hasna/telephony

v0.1.1

Published

Telephony platform for AI agents — SMS, WhatsApp, voice calls, TTS/STT, real-time streaming

Downloads

34

Readme

@hasna/telephony

Telephony platform for AI agents — SMS, WhatsApp, voice calls, TTS/STT, real-time streaming.

Each agent gets their own phone number. Agents can send/receive SMS, WhatsApp messages (text + audio), make voice calls, handle voicemail, and schedule automated messages using AI.

Install

bun install -g @hasna/telephony

Quick Start

# Register an agent
telephony agent register --name my-agent

# Search available phone numbers
telephony number search-available --country US

# Send an SMS
telephony sms send --to +1234567890 --body "Hello from AI"

# Send WhatsApp message
telephony whatsapp send --to +1234567890 --body "Hello"

# Text-to-speech
telephony tts --text "Hello world"

# AI-powered scheduling
telephony schedule ai "Send a follow-up SMS to +1234567890 tomorrow at 9am"

# Start the server (REST API + webhooks + dashboard)
telephony serve

Features

  • SMS — Send/receive via Twilio
  • WhatsApp — Text + audio messages via Twilio WhatsApp API
  • Voice Calls — Outbound/inbound calls, TwiML generation
  • Voicemail — Auto-greeting (TTS), recording, transcription
  • TTS — ElevenLabs text-to-speech
  • STT — ElevenLabs speech-to-text
  • Phone Numbers — Buy, release, configure via Twilio API
  • Contacts — Per-agent address book
  • Scheduling — Cron jobs with Cerebras AI natural language parsing
  • Webhooks — Inbound Twilio callbacks + custom webhook dispatch
  • OpenAI Realtime — Live voice streaming (cloud-only)
  • Projects — Organize agents and numbers by project
  • Dashboard — Web UI at http://localhost:19451

Binaries

| Binary | Purpose | |--------|---------| | telephony | CLI | | telephony-mcp | MCP server (37 tools) | | telephony-serve | REST API + webhook server + dashboard |

MCP Server Setup

Claude Code

Add to .claude/settings.json:

{
  "mcpServers": {
    "telephony": {
      "command": "telephony-mcp",
      "env": {
        "TWILIO_ACCOUNT_SID": "your-sid",
        "TWILIO_AUTH_TOKEN": "your-token",
        "TWILIO_PHONE_NUMBER": "+1234567890"
      }
    }
  }
}

Codex CLI

Add to .codex/config.json:

{
  "mcpServers": {
    "telephony": {
      "command": "telephony-mcp"
    }
  }
}

Gemini CLI

Add to .gemini/settings.json:

{
  "mcpServers": {
    "telephony": {
      "command": "telephony-mcp"
    }
  }
}

Open Code

Add to your Open Code MCP config:

{
  "mcpServers": {
    "telephony": {
      "command": "telephony-mcp"
    }
  }
}

Pi.dev

{
  "mcpServers": {
    "telephony": {
      "command": "telephony-mcp"
    }
  }
}

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | TWILIO_ACCOUNT_SID | Yes | Twilio Account SID | | TWILIO_AUTH_TOKEN | Yes | Twilio Auth Token | | TWILIO_PHONE_NUMBER | Yes | Default outbound number | | ELEVENLABS_API_KEY | For TTS/STT | ElevenLabs API key | | CEREBRAS_API_KEY | For AI scheduling | Cerebras API key | | OPENAI_API_KEY | For Realtime | OpenAI API key | | TELEPHONY_PORT | No | Server port (default: 19451) | | TELEPHONY_WEBHOOK_URL | For cloud | Public webhook base URL |

Also supports HASNAXYZ_TWILIO_LIVE_* and HASNAXYZ_ELEVENLABS_LIVE_* variable naming conventions.

REST API

All endpoints available at http://localhost:19451/api/:

  • POST /api/sms/send — Send SMS
  • POST /api/whatsapp/send — Send WhatsApp
  • POST /api/call/make — Make call
  • GET /api/messages — List messages
  • GET /api/calls — List calls
  • GET /api/numbers — List numbers
  • POST /api/numbers/search — Search available
  • POST /api/numbers/provision — Buy number
  • GET /api/agents — List agents
  • GET /api/projects — List projects
  • POST /api/tts — Generate speech
  • GET /api/voices — List voices
  • POST /api/schedules/ai — AI schedule
  • GET /health — Health check

SDK

import { createClient } from "@hasna/telephony";

const client = createClient("http://localhost:19451");
await client.sendSms("+1234567890", "Hello from AI");
await client.listMessages();

License

Apache-2.0