FAQ & Troubleshooting
April 28, 2026 · View on GitHub
Common questions and setup problems for the OpenSIPS MCP Server.
Setup & connectivity
Claude doesn't see any OpenSIPS tools
- Restart the MCP client after editing its config (Claude Desktop, Cursor, Continue don't auto-reload).
- Check the client's MCP server list. In Claude Desktop, it's the hammer icon.
- Run the server manually with
opensips-mcp --transport stdio— if it errors out in your terminal, the same error is silently killing the client's launch. - On Windows, use full paths in the client config;
PATHisn't inherited the same way.
mi_reachable: false
The server is running but can't reach OpenSIPS's MI endpoint.
- Confirm
MI_URLin.envmatches your OpenSIPS deployment. - The OpenSIPS config must load either
mi_http,mi_datagram, ormi_fifo. This server talks HTTP by default. - Test directly:
curl -X POST http://<host>:<port>/mi -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"ps","id":1}'
"Permission denied: role 'readonly' lacks '...'"
The server runs as readonly by default. For any mutating tool (create,
update, delete, reload), set ROLE=admin in .env. For production, use a
reverse proxy that sets the role per-request based on the caller's API key.
"Unknown MI command"
The tool is wrapping an MI command that doesn't exist on your OpenSIPS build (either because the module isn't loaded or the version doesn't support it).
- Call
mi_list_commands— returns what the live instance actually supports. - Load the relevant module in
opensips.cfg(loadmodule "foo.so").
Docker
docker compose up fails
- Ensure Docker 20+ and
docker composeplugin (not legacydocker-compose). - Free ports 5060/udp, 5061/udp, 5060/tcp, 8888 (MI), 3306 (MySQL), 8700 (MCP).
- If you see
Error response from daemon: Ports are not available, another SIP proxy (Kamailio? Asterisk?) is already listening.
Containers are unhealthy
docker compose -f docker/docker-compose.yml ps
docker compose -f docker/docker-compose.yml logs opensips
Ninety percent of the time it's a DB connection failure — the MySQL container
wasn't ready before OpenSIPS started. docker compose restart opensips usually
fixes it; for a permanent fix, make sure depends_on.condition: service_healthy
is set.
Config generation
Generated config won't start
Always run in this order:
cfg_validate— syntaxcfg_lint— semantic rulescfg_explain_route— sanity-check route blocks
If cfg_validate passes but OpenSIPS errors at boot, the most common causes:
- Missing
loadmodulefor a function you used - DB URL pointing at the wrong host (Docker: use service name, not
localhost) - Port already in use (another SIP proxy running)
- UDP socket permission (low ports need
cap_net_bind_serviceor root)
"I asked for X and Claude keeps generating Y"
Be explicit about scenarios and versions:
Generate a residential-auth scenario for OpenSIPS 3.5 with MySQL auth and nathelper.
If the scenario doesn't exist, call cfg_list_scenarios first and pick one by
name. For non-standard combinations, use cfg_compose_flags +
cfg_build_from_flags (Kamailio-style WITH_* flags).
Runtime behaviour
Calls are failing — what do I run first?
Use the opensips-troubleshoot skill or ask:
Run a quick diagnostic — health, dialogs, dispatcher state, recent SL/TM stats. Flag anything unusual.
Claude will chain:
health_checkdlg_listget_statistics(sl, tm, core)dispatcher_list_db/lb_listpike_list_blocked- Recent
docker_logsif containerised
One-way audio
Almost always a NAT/media issue. Check:
rtpengine_show— is RTPEngine allocating ports?- Nathelper modparams — is
fix_nated_sdpbeing called? - Firewall — is the RTP port range (typically 10000-20000/udp) open?
The opensips-troubleshoot skill has a full media branch.
Migrations
"Which version should I migrate to?"
- 3.4 is the long-term-support branch.
- 3.5 / 3.6 are production-quality.
- 3.7 / 4.0 are current/edge — safe for new deployments, review migration notes for existing ones.
- Skip no hops: 2.4 → 4.0 goes through every minor version in between.
"Claude wants to apply the migration — is it safe?"
The opensips-migrator subagent refuses to apply a migration without an explicit acknowledgement of silent-behaviour findings. Always:
- Backup the original config.
- Review the full plan.
- Apply in dev/staging first.
- Use
cfg_diffto review the result before deploying to prod.
Security
"Should I run this on a public IP?"
Not without an auth proxy. The server has an API key setting but does not
enforce it at the transport layer for SSE/streamable-http. Use a reverse
proxy (nginx config provided in docker/nginx/) to validate the
Authorization: Bearer header.
Role separation
| Role | Use for |
|---|---|
readonly | Dashboards, alerts, inspection-only automations |
admin | Config generation, runtime mutations, CRUD on DB tables |
Set via ROLE= in .env or per-request via proxy.
Learning SIP / OpenSIPS
"I'm new to SIP — where do I start?"
Use the opensips-teacher subagent, or these prompts:
teach_concept— any topicexplain_sip_ladder— paste a SIP trace, get an ASCII ladder + analysisexplain_route— paste a route block, get a line-by-line walkthroughdebug_sip_message— paste a raw SIP message, get it parsed + explained
The opensips://docs/guide/sip-101 and opensips://docs/guide/quickstart
resources are also good primers.
"The generated config uses features I don't understand"
Call cfg_explain with the directive/function name, or cfg_explain_route
for a whole route. Both work offline — no running OpenSIPS needed.
Feature requests / reporting bugs
File issues at https://github.com/OFFICERINGLLC/opensips-mcp-server/issues
Include:
- OpenSIPS version (
get_statistics group=coreshows it) - MCP server version (
python -m opensips_mcp --version) - What tool you called and what you expected vs got