Skip to content

feat: Add inbound call support with hook-based notifications#31

Open
olavl wants to merge 1 commit intoZeframLou:mainfrom
olavl:feature/inbound-calls
Open

feat: Add inbound call support with hook-based notifications#31
olavl wants to merge 1 commit intoZeframLou:mainfrom
olavl:feature/inbound-calls

Conversation

@olavl
Copy link

@olavl olavl commented Jan 31, 2026

Summary

This PR adds full inbound call support to the callme plugin, allowing users to call Claude directly.

Changes

  • MCP Server: Added logging capability to enable notifications/message (fixes "Server does not support logging" error)
  • Inbound Call Flow: Answer incoming calls, play greeting, capture speech via STT, play hold message
  • Hook Integration: Stop and UserPromptSubmit hooks to alert Claude about pending inbound calls
  • New Config Options:
    • CALLME_TTS_MODEL - Configure TTS model (default: gpt-4o-mini-tts)
    • CALLME_INBOUND_GREETING - Customize the greeting message
    • CALLME_PHONE_PROVIDER and CALLME_NGROK_DOMAIN - Added to env passthrough

How Inbound Calls Work

  1. User calls the configured phone number
  2. Server answers and plays greeting ("Hello, this is Claude...")
  3. STT captures user's speech
  4. Server plays hold message and writes pending call info to temp file
  5. Hooks detect the pending call and inject prompt to Claude
  6. Claude uses continue_call to respond to the caller

Test Plan

  • Inbound call answers and plays greeting
  • Speech-to-text captures caller's message
  • Hook notifies Claude about pending call
  • continue_call sends response to caller
  • Full conversation flow works (multiple turns)
  • Outbound callback after task completion works

🤖 Generated with Claude Code

- Add `logging` capability to MCP server to enable notifications
- Implement full inbound call flow: answer, greet, capture speech, notify Claude
- Add Stop and UserPromptSubmit hooks to alert Claude about pending calls
- Add configurable TTS model support (CALLME_TTS_MODEL env var)
- Add customizable inbound greeting (CALLME_INBOUND_GREETING env var)
- Add CALLME_PHONE_PROVIDER and CALLME_NGROK_DOMAIN to plugin env passthrough

The inbound call flow:
1. User calls the configured phone number
2. Server answers and plays greeting
3. STT captures user's speech
4. Server plays hold message and writes pending call info
5. Hooks detect the pending call and inject prompt to Claude
6. Claude uses continue_call to respond to the caller

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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