asterisk-voice-mcp
Enables initiating VoIP phone calls, playing TTS messages, capturing DTMF input, and recording voice responses via an Asterisk PBX.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@asterisk-voice-mcpCall the office line and ask for feedback"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Asterisk Voice MCP Server
A self-hosted Model Context Protocol (MCP) server that lets an AI agent place VoIP phone calls via Asterisk, play TTS messages, capture DTMF input, and optionally record voice responses to be transcribed.
Architecture
graph TD
Agent[AI Agent (Claude/Hermes)] -->|MCP over stdio| MCPServer[MCP Server (Python)]
MCPServer -->|ARI HTTP/WebSocket| Asterisk[Asterisk PBX (Docker)]
Asterisk -->|SIP/RTP| Softphone[Linphone Softphone]
MCPServer -->|TTS API / STT API| Speechmatics[Speechmatics API]Features
Place Calls: Initiate calls to a SIP endpoint.
TTS: Play dynamically generated speech.
DTMF Capture: Prompt the user for keypad input.
Voice Capture & STT: Record user audio and transcribe it via Speechmatics.
Tool integration: Fully compliant MCP server that exposes tools
place_call,send_dtmf,hangup_call,health_check.
Prerequisites
Docker & Docker Compose
Python 3.11+
Linphone app
Speechmatics API Key (optional, defaults to mock if absent)
Setup
Clone the repository (or navigate to directory).
Configure environment variables:
cp .env.example .env # Edit .env and provide your SPEECHMATICS_API_KEY if desired.Start Asterisk:
docker compose up -dRegister Linphone:
SIP Server: your host IP or domain
Port: 5060 (UDP/TCP)
Username:
linphone-userPassword: the value of
SIP_PASSWORDfrom your.env(generated at deploy time; see setup.sh)
Usage
Start the MCP server to expose tools:
python src/mcp_server.pyExample MCP Client Configuration
See config/mcp.json for an example of how to configure an MCP client (like Claude Desktop) to use this server.
Testing without a phone
Run the self-test script, which spins up a mock PJSIP endpoint and runs an end-to-end call test using a local bot.
python scripts/self_test.pySecurity Notes
Never expose ARI/SIP to the public internet without proper authentication, firewalls, and Fail2Ban.
Secrets should remain in
.env.Use strong endpoint secrets for SIP registrations.
Lock down RTP ports.
License
MIT License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SSOURABH58/asterisk-voice-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server