Baresip Speakerphone MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Baresip-Speakerphone-MCP
Turn a USB speakerphone (tested: Jabra Speak 510) on a Linux box into a SIP extension that a voice assistant can drive. baresip (v4.13.0, built from source) handles SIP and audio, and a small Python controller adds two things:
Caller announcements while it rings: a ring tone alternating with a spoken "Call from Alice on the work line" (or the number, read in digit groups), synthesised by any Wyoming TTS server (Piper, Kokoro, ...). The line is taken from a caller-ID name prefix your PBX adds (e.g.
Work).Call control over MCP (streamable HTTP at
/mcp):phone_status("who's calling?"),phone_answer,phone_reject,phone_hangup,phone_mute,phone_volume,phone_call,phone_check_number.
Pages and intercom calls carrying Call-Info: answer-after=0 or Alert-Info: info=alert-autoanswer are answered
automatically and not announced.
Dialling safely
The model never formats a phone number. phone_call(number_or_contact, line=None, confirmed=False) takes the
number as the user said it ("02 434 5678") or a contact name, normalises it deterministically
(src/speakerphone/numbers.py), and on the first call returns needs_confirmation with a spoken read-back
("Calling plus nine seven two, two, four three four, five six seven eight on the home line. Shall I dial?"). It
dials only when called again with confirmed=true. Numbers in emergency_numbers dial at once.
Number rules: locale IL (Israel) converts local numbers to E.164 and checks their length (mobile 05x and VoIP 07x
are 10 digits with the 0, landlines 02/03/04/08/09 are 9). It keeps +972/972, passes 00/+ international
numbers through, and dials short codes (1xx) and star numbers (*2700) as they are. Any other locale accepts
international format only (a PR adding your country is welcome). Extensions matching internal_pattern are dialled
as is.
Related MCP server: Ringback
Run
docker build -t baresip-speakerphone-mcp .
docker run -d --name speakerphone --network host --user 1000:1000 --group-add audio \
-e SIP_PASSWORD=... \
-e XDG_RUNTIME_DIR=/run/user/1000 -e PULSE_SERVER=/run/user/1000/pulse/native \
-v /run/user/1000:/run/user/1000 -v ./config:/config:ro \
baresip-speakerphone-mcpAudio goes through the host user's PulseAudio/PipeWire socket, so other apps (e.g. a voice-assistant satellite on the same speakerphone) keep working alongside it.
config/speakerphone.json: copyconfig.example.json. Every key is insrc/speakerphone/config.py. Find the sink and source names withpactl list short sinks/sources.The password comes from
SIP_PASSWORDorSIP_PASSWORD_FILE, never the JSON file.Host networking: baresip listens on
sip_listen(default0.0.0.0:5070, so it can share a host with a PBX on 5060) and usesrtp_portsfor media.GET /healthzreturns{"ok": true, "registered": true}when baresip is up.Test from a shell:
uv run scripts/mcp_call.py http://HOST:8840/mcp phone_status.
Notes and gotchas (verified with baresip 4.13.0, MCP Python SDK 2.3)
baresip's own ring is replaced by
silence.wav(the controller plays ring + announcement itself throughpaplay).sip_autoanswer_beep=offis required. With the default beep, baresip answers a page only when the beep finishes playing, and on the pulse alert device that never happened, so auto-answer calls rang until timeout.muteis a call-scoped baresip command: it exists only while a call is up, and it toggles, so the controller tracks the state itself.Registration can complete before the controller connects to ctrl_tcp, so the state is read once from
reginfoon connect, then kept up to date fromREGISTER_OK/REGISTER_FAILevents.Distro packages of baresip are old (Debian trixie ships 1.1.0), hence the source build in the
Dockerfile.MCP SDK 2.x runs the server lifespan per session in streamable HTTP, so baresip is started from the HTTP app's lifespan instead (
server.py).
Tests
uv run --with pytest pytest -q (number normalisation and read-back).
MIT licence.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Lets Claude, Cursor or any MCP client build voice agents and place real phone calls.
Give your AI a real phone: place calls, send SMS, fetch recordings and transcripts. Local or hosted.
Give any AI agent a phone: make and answer calls, get through phone menus, and send texts.
Phone, SMS and email for AI agents. One remote MCP endpoint, OAuth login, zero install.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to control Home Assistant smart home devices via MCP, with zero external dependencies. Supports calling services, getting states, and looking up service parameters.MIT
- AlicenseAqualityCmaintenanceLet your AI agent call your phone and talk to you — MCP servers for live, interruptible voice calls + tiered alerts, using free self-hosted pieces (pjsua2 + whisper.cpp + Linphone). No paid telephony, no extra API key.332Apache 2.0
- AlicenseBqualityBmaintenanceEnables MCP-compatible agents to make safe, consented phone calls using Twilio and Deepgram.4Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to place phone calls for reservations, appointments, confirmations, and inquiries through a self-hosted MCP server, with language support and learning capabilities.1MIT