Skip to content

Add Telegram messenger as alternative to phone calls#16

Open
alexfilatov wants to merge 4 commits intoZeframLou:mainfrom
alexfilatov:feature/telegram-messenger
Open

Add Telegram messenger as alternative to phone calls#16
alexfilatov wants to merge 4 commits intoZeframLou:mainfrom
alexfilatov:feature/telegram-messenger

Conversation

@alexfilatov
Copy link

Summary

This PR adds Telegram as an alternative communication channel alongside the existing phone call functionality. Users can now choose between:

Mode Cost Setup Time Best For
Telegram Free 2 minutes Text-based, quick responses
Phone ~$0.03/min 10 minutes Voice, hands-free, away from computer

Changes

New Files

  • server/src/providers/telegram.ts - Telegram Bot API provider
  • server/src/telegram-chat.ts - Chat manager with long-polling for user responses
  • server/src/index-telegram.ts - MCP server entry point for Telegram mode

Modified Files

  • server/package.json - Added start:telegram and dev:telegram scripts
  • server/src/providers/index.ts - Export Telegram provider
  • .claude-plugin/plugin.json - Added callme-telegram MCP server
  • .claude-plugin/marketplace.json - Added Telegram plugin option
  • .env.example - Added Telegram configuration options
  • README.md - Added Telegram quick start guide and tools documentation

Telegram Tools

Tool Description
send_message Start conversation, wait for response
continue_chat Follow-up messages
notify_user One-way notifications (no response expected)
end_chat Close conversation

Setup (2 minutes)

  1. Message @BotFather/newbot → copy token
  2. Message @userinfobot → copy your ID
  3. Add to ~/.claude/settings.json:
{
  "env": {
    "CALLME_TELEGRAM_BOT_TOKEN": "your-token",
    "CALLME_TELEGRAM_CHAT_ID": "your-id"
  }
}
  1. Install: /plugin install callme@callme-telegram

Benefits

  • Free - No phone provider costs, no OpenAI TTS/STT costs
  • No ngrok required - Uses Telegram's long-polling API
  • Simple setup - Only 2 environment variables needed
  • Non-breaking - Existing phone functionality unchanged

Test Plan

  • Telegram bot sends messages successfully
  • Long-polling receives user responses
  • MCP server starts and registers tools
  • Plugin configuration loads correctly

@alexfilatov alexfilatov force-pushed the feature/telegram-messenger branch 2 times, most recently from a6fa020 to da0d725 Compare January 10, 2026 12:37
- Add TelegramBotProvider for Bot API integration
- Implement sendMessage, getUpdates, deleteWebhook methods
- Add retry logic with exponential backoff for transient errors
- Smart retry: skip client errors (4xx) except rate limits (429)
- Export provider from providers/index.ts
- Manage text-based conversations via Telegram Bot API
- Long-polling for user responses with configurable timeout
- Support for multiple concurrent chat sessions
- Background command polling for /verbose, /help commands
- Broadcast mode for one-way streaming messages
- Listen mode for receiving tasks from user
- Add index-telegram.ts as stdio MCP server for Telegram mode
- Implement tools: broadcast, send_message, continue_chat,
  notify_user, end_chat, listen_for_commands
- Verbose mode: encourage liberal broadcast usage
- Listen mode: optional tool for receiving tasks via Telegram
- Update plugin.json with callme-telegram MCP server config
- Add marketplace.json category
- Add Telegram quick start guide (Option A in README)
- Document MCP server config for ~/.claude.json
- Add environment variables: BOT_TOKEN, CHAT_ID, VERBOSE, LISTEN
- Update .env.example with Telegram configuration
- Explain verbose mode (streaming) and listen mode (remote control)
@alexfilatov alexfilatov force-pushed the feature/telegram-messenger branch from da0d725 to 4ce259c Compare January 10, 2026 12:40
xicv pushed a commit to xicv/call-me that referenced this pull request Feb 24, 2026
…m docs

Merge community PRs ZeframLou#29 (Cloudflare Tunnel) and ZeframLou#16 (Telegram messenger)
with fixes, plus documentation for issues ZeframLou#14, ZeframLou#15, ZeframLou#21, ZeframLou#25.

Cloudflare Tunnel (PR ZeframLou#29):
- Tunnel abstraction layer with TunnelProvider interface (ngrok + cloudflare)
- Deferred MCP initialization for fast handshake, fixes orphaned processes (ZeframLou#14)
- Explicit CALLME_ALLOW_UNSIGNED_WEBHOOKS replaces implicit ngrok bypass (ZeframLou#15, ZeframLou#21)
- Extract audio-utils.ts, webhook-security.ts with proper TypeScript interfaces
- Fix memory leak in waitForHangup, add cleanupCallState helper
- 55 unit tests (up from 15)

Telegram mode (PR ZeframLou#16):
- Free text-based alternative to phone calls via Telegram Bot API
- Separate MCP server entry point (index-telegram.ts)
- Tools: send_message, continue_chat, notify_user, end_chat, broadcast
- Fix JSON syntax errors in plugin.json and package.json

Documentation:
- Multi-platform support: Gemini CLI, OpenCode config examples (ZeframLou#25)
- Improved troubleshooting for Twilio auth errors (ZeframLou#15) and marketplace install (ZeframLou#13)
- Updated .env.example with tunnel, security, and Telegram options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant