Skip to main content
Glama
OpenSIPS MCP Server

OpenSIPS MCP Server

Official
by OpenSIPS

OpenSIPS MCP Server

CI Python 3.10+ License: Apache 2.0 MCP v1.27.0 Tests: 751 Scenarios: 25 Tools: 236

An AI-powered and shell-callable control plane for OpenSIPS. Connect any MCP-compatible AI client (Claude Desktop, Cursor, Cline, Continue, Cody) for natural-language operations — or use the same primitives via the opensips-mcp CLI for shell scripts, CI pipelines, and air-gapped operators.

Presented at OpenSIPS Summit 2026, Bucharest, April 28-30.

# AI client mode — connect any MCP-aware client
opensips-mcp serve

# CLI mode — no LLM required
opensips-mcp cfg list-scenarios
opensips-mcp cfg generate residential_pbx --param db_url=mysql://... --param domain=pbx.example.com
opensips-mcp cfg lint /etc/opensips/opensips.cfg --fail-on warning
opensips-mcp snapshot capture /var/lib/snapshots --label pre-deploy

Features

Category

Count

Description

Tools

236

MI, DB CRUD, cfg engine, migration, linting, tuning, diagnostics, security, B2BUA, presence, events, snapshots, benchmarks, RBAC, observability stack generator (Grafana + Prometheus + provisioning + monitoring docker-compose)

Scenarios

25

From class-4 SBC and residential PBX to IMS Cx with HSS interop, STIR/SHAKEN, SIPREC, MSRP, RADIUS auth, qrouting, RTT accessibility

Prompts

22

Config building, migration, troubleshoot, security audit, education

Operator-facing docs

15

SIP primer, error-code decoder, annotated cfg tour, ngrep/sngrep, end-to-end PBX tutorial, HA failover, NAT decision tree, TLS-from-scratch, post-deploy smoke test, IMS Cx with open5gs, compliance positioning, observability stack, Kamailio comparison + migration, limitations, more

Compliance frameworks addressed

8

HIPAA, GDPR/CCPA, SOC 2, PCI DSS, FCC § 13.114 (E911), STIR/SHAKEN, RFC 4103 RTT, NENA i3

Tests

751

Drift-prevention regression markers for every audit finding

Skills

6

Claude Code slash commands

Subagents

6

Claude Code orchestration roles

Why this over X?

If you're considering...

This project gives you

Hand-written m4 templates

A typed scenario library + auto-discovered knobs + a linter that catches what opensips -C misses

opensips-cli

Same primitives + 25 scenario templates + the migration engine + drift snapshots + 15 operator-facing docs

Kamailio (kamctl / kamcli)

An honest comparison (docs/learn/kamailio-vs-opensips.md) and a migration guide (docs/learn/migrate-from-kamailio.md)

Twilio / Telnyx / Bandwidth

Self-hosted control over your SIP — at the cost of operating it yourself

DIY without an LLM

The CLI is the same code path; nothing requires AI

DIY without a CLI

Same primitives via MCP for any AI client

Skeptical or looking for what this is NOT good for? Read docs/learn/limitations.md before adopting.

Highlights

  • Full MI Coverage -- Execute any Management Interface command, list commands, gather statistics, and run health checks.

  • Database Management -- CRUD operations for subscribers, dispatchers, dynamic routing, permissions, call center, load balancer, dialplan, and accounting tables.

  • Configuration Engine -- Generate complete OpenSIPS configs from 8 scenario templates plus the m4/local.cfg override pattern, with a Kamailio-compatible WITH_* feature-flag composer that materialises a flat config (no #!ifdef nesting hell).

  • Version-Aware Migration -- Declarative per-hop rule chain across 2.4 → 3.0 → 3.1 → 3.2 → 3.3 → 3.4 → 3.5 → 3.6 (7 fully-populated hops). Rewrites behaviour-preserving changes (MI command renames, AVP prefix drop, global param renames) and flags every manual step / silent-gotcha the engineer must handle by hand. Includes the painful 3.4 → 3.5 load_balancer_* → lb_* MI rename that silently breaks monitoring in 3.6. An eighth hop 3.6 → 4.0 is scaffolded with the MI renames anticipated in the 4.0 beta but emits an "advisory" warning until a stable 4.0 lands. (OpenSIPS skipped 3.7 entirely — the chain reflects the actual release line.)

  • Semantic Linter -- 20+ rules checking module dependency graph, orphaned modparam, deprecated parameters, missing mf_process_maxfwd_header, anti-flood absence, NAT/rtpengine gaps, and production readiness.

  • Capacity Tuner (PGTune for SIP) -- Describe your workload (role + cores + RAM + CPS + NAT + TLS + HA), get a paste-ready override snippet with a # why: comment on every line.

  • Module Catalog + Explain -- Machine-readable module metadata powers a kubectl explain-style lookup for directives, modparams, script functions, pseudo-variables, and MI commands (with rename history).

  • Diagnostics -- Process lists, memory stats, TCP connections, uptime, tracing, and comprehensive health checks.

  • Security -- RBAC with readonly/admin roles, input validation, HA1 digest generation, config audit, Pike anti-flood management, and structured audit logging.

  • Version Support -- 2.4 → 3.6 fully rule-backed; one anticipatory 3.6 → 4.0 hop with master-branch MI renames (advisory until 4.0 stable). Runtime version strategies for 3.4 and 3.6 (production-ready) plus a 4.0 strategy flagged as experimental.

  • Docker Ready -- 7 pre-built Docker scenarios and a full-stack compose for instant deployment.

Related MCP server: oitvoip-mcp-server

Quick Start

pip install

# Install from source
pip install -e .

# For MySQL support
pip install -e ".[mysql]"

# For PostgreSQL support
pip install -e ".[postgres]"

Configure

cp .env.example .env
# Edit .env with your OpenSIPS MI URL and database connection

Key environment variables:

Variable

Default

Description

OPENSIPS_MCP_MI_URL

http://127.0.0.1:8888/mi

OpenSIPS MI HTTP endpoint

OPENSIPS_MCP_DB_URL

sqlite+aiosqlite:///opensips.db

Database connection string

OPENSIPS_MCP_VERSION

3.6

Target OpenSIPS runtime version (3.4 or 3.6)

OPENSIPS_MCP_TRANSPORT

stdio

MCP transport (stdio, sse, streamable-http)

OPENSIPS_MCP_ROLE

readonly

RBAC role (readonly, admin). Defaults to least-privileged; set to admin only when write / MI-execute access is required.

OPENSIPS_MCP_LOG_LEVEL

INFO

Logging level

OPENSIPS_MCP_HOST

127.0.0.1

Bind address for network transports

OPENSIPS_MCP_PORT

8080

Listen port for network transports

OPENSIPS_MCP_API_KEY

(empty)

Optional API key for authentication

OPENSIPS_MCP_OPENSIPS_BIN

/usr/sbin/opensips

Path to opensips binary for config validation

OPENSIPS_MCP_READ_ONLY

false

Force read-only mode regardless of role

Run

# stdio transport (for Claude Desktop, Cursor, etc.)
opensips-mcp

# SSE transport (for web-based clients)
opensips-mcp --transport sse --host 0.0.0.0 --port 8080

# Streamable HTTP transport
opensips-mcp --transport streamable-http --host 0.0.0.0 --port 8080

MCP Client Integration

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "opensips": {
      "command": "opensips-mcp",
      "env": {
        "OPENSIPS_MCP_MI_URL": "http://your-opensips:8888/mi",
        "OPENSIPS_MCP_DB_URL": "mysql+asyncmy://opensips:opensipsrw@localhost/opensips"
      }
    }
  }
}
claude mcp add opensips -- opensips-mcp --transport stdio

Or edit .claude/settings.json:

{
  "mcpServers": {
    "opensips": { "command": "opensips-mcp", "args": ["--transport", "stdio"] }
  }
}

The project ships skills and subagents in .claude/ — Claude Code picks them up automatically when run inside the repo.

~/.cursor/mcp.json:

{
  "mcpServers": {
    "opensips": { "command": "opensips-mcp", "args": ["--transport", "stdio"] }
  }
}

~/.continue/config.json:

{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "opensips-mcp",
          "args": ["--transport", "stdio"]
        }
      }
    ]
  }
}
opensips-mcp --transport sse --host 0.0.0.0 --port 8700

Point any MCP-speaking client at http://<host>:8700/sse. Put an auth proxy in front in production — see docs/security.md and docker/nginx/ for a working config.

Docker Quick Start

Start OpenSIPS, MySQL, and the MCP server with a single command:

docker compose -f docker/docker-compose.yml up -d

This brings up:

  • opensips -- OpenSIPS 3.6 with MI HTTP on port 8888

  • mysql -- MySQL 8.0 with the OpenSIPS schema

  • opensips-mcp -- MCP server on port 8080 (streamable-http transport)

See docs/deployment.md for production deployment guidance.

MCP Tools

MI Commands

  • mi_execute -- Execute any MI command

  • mi_list_commands -- List available MI commands

  • get_statistics -- Retrieve runtime statistics

  • health_check -- Comprehensive health check

User Location

  • ul_show_contacts -- Show registered contacts for an AOR

  • ul_dump -- Dump all registered users

  • ul_add_contact -- Add a contact binding

  • ul_remove_contact -- Remove a contact binding

Dialog Management

  • dlg_list -- List active dialogs

  • dlg_end -- Terminate a dialog

  • dlg_get_profiles -- Get dialog profile sizes

  • dlg_push_var -- Set a dialog variable

Subscriber Management

  • subscriber_list -- List subscribers (with pagination)

  • subscriber_get -- Get subscriber by ID

  • subscriber_create -- Create a new subscriber

  • subscriber_update -- Update subscriber fields

  • subscriber_delete -- Delete a subscriber

Dispatcher (Load Balancing)

  • dispatcher_list_db -- List dispatcher destinations

  • dispatcher_add -- Add a destination

  • dispatcher_update -- Update a destination

  • dispatcher_remove -- Remove a destination

Dynamic Routing (full CRUD + reload)

  • drouting_list_rules, drouting_add_rule, drouting_update_rule, drouting_delete_rule

  • drouting_list_gateways, drouting_add_gateway, drouting_update_gateway, drouting_delete_gateway

  • drouting_list_carriers, drouting_add_carrier, drouting_update_carrier, drouting_delete_carrier

Dialplan (number translation)

  • dialplan_list_rules, dialplan_add_rule, dialplan_update_rule, dialplan_delete_rule

  • dialplan_reload, dialplan_translate

Carrier Routing & LCR

  • carrierroute_reload, carrierroute_dump, carrierroute_activate_host, carrierroute_deactivate_host, carrierroute_replace_host

  • lcr_dump, lcr_reload

B2BUA (back-to-back, SBC, SCA)

  • b2b_list_sessions, b2b_list_entities, b2b_terminate, b2b_bridge, b2b_trigger_scenario, b2b_sca_list

  • topology_hiding_list

Presence / PUA / BLF / MWI

  • presence_list_subscriptions, presence_refresh_watchers, presence_cleanup

  • pua_list_publications, pua_publish

UAC / Upstream Registrations

  • uac_reg_list, uac_reg_reload, uac_reg_enable, uac_reg_disable, uac_reg_force_register

Mid-Registrar

  • mid_registrar_dump, mid_registrar_update

NAT Helper

  • nathelper_enable_ping, nathelper_stats

Event Interface (flatstore, rabbitmq, json, etc.)

  • event_list, event_list_subscribers, event_subscribe

Stateless (SL)

  • sl_stats

AVP Operations

  • avp_get, avp_set, avp_delete

Load Balancer

  • lb_list -- List load balancer destinations

  • lb_reload -- Reload LB table

  • lb_set_status -- Enable/disable a destination

  • lb_resize -- Resize a resource

Call Center

  • cc_list_queue -- List call center queue

  • cc_list_agents -- List agents

  • cc_agent_login -- Login/logout an agent

  • cc_reload_tool -- Reload call center config

  • cc_status -- Call center statistics

Permissions

  • address_list -- List address permissions

  • address_add -- Add an address entry

  • address_remove -- Remove an address entry

Security

  • pike_list_blocked -- List Pike-blocked IPs

  • pike_unblock_ip -- Unblock an IP

  • security_generate_ha1 -- Generate HA1 digests

  • security_audit_config -- Audit a configuration

RTPEngine

  • rtpengine_show -- Show RTPEngine status

  • rtpengine_enable -- Enable/disable an RTPEngine instance

  • rtpengine_reload -- Reload RTPEngine config

Rate Limiting

  • ratelimit_status -- Show rate limit pipes

  • ratelimit_reset -- Reset a rate limit pipe

Cluster

  • cluster_status -- Cluster node status

  • cluster_topology -- Cluster topology

  • cluster_send_command -- Send a cluster broadcast command

Tracing

  • trace_control -- Enable/disable SIP tracing

  • trace_start_live -- Start live SIP trace

Registrar

  • registrar_stats -- Registrar statistics

Accounting

  • acc_query_cdrs -- Query CDR records

  • acc_query_missed -- Query missed call records

Diagnostics

  • get_process_list -- OpenSIPS process list

  • get_memory_stats -- Shared/private memory stats

  • get_uptime -- Server uptime

  • get_tcp_connections -- Active TCP connections

  • opensips_version -- OpenSIPS version info

Configuration Engine — generation

  • cfg_generate -- Generate config from a scenario template

  • cfg_generate_iterative -- Generate and iteratively validate

  • cfg_list_scenarios / cfg_get_scenario_params -- Scenario catalog

  • cfg_start_session / cfg_generate_m4 / cfg_preprocess / cfg_dry_run / cfg_save_session -- m4 / local.cfg override pattern

  • cfg_list_flags / cfg_compose_flags / cfg_build_from_flags -- Kamailio-compatible WITH_* feature-flag composer (produces a flat config with only enabled branches materialised)

Configuration Engine — understanding

  • cfg_parse -- Parse config and extract structure

  • cfg_validate -- Validate with the opensips -C -f binary

  • cfg_explain -- kubectl explain-style inline reference for any module / modparam / function / $pv / global / MI command

  • cfg_explain_route -- Analyse a specific route block

  • cfg_list_modules -- Module catalog (filter by version or category)

Configuration Engine — editing

  • cfg_diff -- Unified diff between two configurations

  • cfg_diff_reference -- Diff against the reference scenario template to see what's "custom"

  • cfg_edit -- Apply a natural-language edit and show the diff

  • cfg_add_module -- Add a module (with optional modparams) into an existing cfg

  • cfg_optimize -- Quick heuristic suggestions

Configuration Engine — linting & tuning

  • cfg_lint -- Run 20+ semantic lint rules (dependency gaps, deprecated params, missing anti-flood, etc.)

  • cfg_list_lint_rules -- Rule catalog

  • cfg_tune -- PGTune-style capacity tuner: describe workload → get override snippet with # why: comments

Configuration Engine — version migration

  • cfg_list_versions -- Supported versions and hop chain (2.4 → 3.0 → 3.1 → 3.2 → 3.3 → 3.4 → 3.5 → 3.6 fully populated; one anticipatory 3.6 → 4.0 hop)

  • cfg_check_compat -- Check a config for modules unavailable in a target version

  • cfg_migrate_plan -- Terraform-plan-style dry-run: report every rewrite and every manual step

  • cfg_migrate -- Apply the migration, emit a unified diff, validate the result

MCP Resources

URI

Description

opensips://system/version

OpenSIPS version information

opensips://system/uptime

Server uptime

opensips://system/processes

Running processes

opensips://system/memory

Memory usage

opensips://stats/all

All runtime statistics

opensips://modules/list

Available modules

opensips://modules/{name}

Module documentation

opensips://docs/mi/{command}

MI command documentation

opensips://templates/list

Available config templates

opensips://templates/{scenario}

Scenario template source

opensips://scenarios/list

Deployment scenario catalog

opensips://scenarios/{name}

Scenario detail and Docker config

opensips://db/subscribers

Subscriber table snapshot

opensips://db/dispatchers

Dispatcher table snapshot

MCP Prompts

Prompt

Description

build_config

Interactive OpenSIPS configuration builder

optimize_performance

Performance tuning advisor

design_architecture

SIP architecture designer

troubleshoot_calls

Call failure troubleshooting guide

troubleshoot_registration

Registration failure troubleshooting

explain_error

SIP/OpenSIPS error explainer

security_audit

Security configuration auditor

teach_concept

SIP/VoIP concept educator

explain_sip_ladder

SIP ladder diagram analyzer

explain_route

OpenSIPS route block explainer

debug_sip_message

SIP message parser and debugger

plan_capacity

SIP capacity planning advisor

write_module

OpenSIPS C module development guide

migrate_version

Version migration assistant (natural-language plan)

migrate_version_auto

Automated plan + apply workflow driving cfg_migrate_plan / cfg_migrate

compare_modules

Module comparison guide

Architecture

+------------------+     +-------------------+     +------------------+
|   MCP Client     |     |  OpenSIPS MCP     |     |    OpenSIPS      |
|  (Claude, etc.)  |<--->|  Server           |<--->|  (MI HTTP)       |
+------------------+     |                   |     +------------------+
                         |  +-------------+  |
                         |  | Tools (94)  |  |     +------------------+
                         |  +-------------+  |     |    Database      |
                         |  | Resources   |  |<--->|  (MySQL/PG/      |
                         |  +-------------+  |     |   SQLite)        |
                         |  | Prompts     |  |     +------------------+
                         |  +-------------+  |
                         |  | Config Eng. |  |
                         |  +-------------+  |
                         |  | Security    |  |
                         |  +-------------+  |
                         +-------------------+

Layers:
  MCP (FastMCP)  ->  Service (Tools/Resources/Prompts)
                 ->  Infrastructure (MI Client, DB, Config Engine)
                 ->  Version (3.4 / 3.6 strategies)
                 ->  Security (RBAC, Validation, Audit)

Supported OpenSIPS Versions

Version

Status

Notes

2.4

Migration source

Fully rule-backed source for cfg_migrate

3.0–3.5

Migration source

Each hop has fully-populated rule sets

3.4

Runtime supported

LTS — full MI and DB coverage

3.6

Runtime default + migration target

Latest stable LTS (3.6.4 as of 2026-04)

4.0

Anticipated migration target / experimental runtime

One advisory hop with master-branch MI renames; rules not yet validated against a stable build

OpenSIPS jumped from 3.6 directly to 4.0 — there was no 3.7 release. The migrator chain reflects the actual release line (8 hops total: 7 fully populated to 3.6, plus 1 anticipatory hop to 4.0).

Development

# Setup
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

# Test
make test

# Lint and format
make lint
make format
make type-check

See CONTRIBUTING.md for the full development guide.

Documentation

Start here:

  • Quickstart -- Zero to working proxy in 15 minutes (install → client setup → first prompts)

  • Tool Chooser -- "Which tool should I use for X?" — map goals to tools

  • FAQ / Troubleshooting -- Setup errors, runtime issues, common questions

Reference:

Claude Code skills and subagents (in .claude/skills/ and .claude/agents/):

  • Skills: /opensips-quickstart, /opensips-config-build, /opensips-troubleshoot, /opensips-migrate, /opensips-security-audit, /opensips-tool-chooser

  • Subagents: opensips-architect, opensips-config-author, opensips-incident-responder, opensips-migrator, opensips-security-auditor, opensips-teacher

Examples

License

Apache License 2.0 -- Copyright 2026 Officering LLC

Available Tools

236 tools
acc_query_cdrsA

Query accounting CDRs with optional date range and caller/callee filters.

Parameters

date_from: ISO-format start date/time filter (e.g. 2025-01-01T00:00:00). date_to: ISO-format end date/time filter. caller: Partial match on the caller field. callee: Partial match on the callee field.

Inputs: date_from, date_to, caller, callee, +2 more. Returns: object

acc_query_missedB

Query missed calls with optional date range and caller/callee filters.

Parameters

date_from: ISO-format start date/time filter (e.g. 2025-01-01T00:00:00). date_to: ISO-format end date/time filter. caller: Partial match on the caller field. callee: Partial match on the callee field.

Inputs: date_from, date_to, caller, callee, +2 more. Returns: object

address_addB

Add a new address/permissions entry. Optionally triggers MI address_reload.

Inputs: ip (required), grp, mask, port, +4 more. Returns: object

address_listB

List address/permissions entries, optionally filtered by group.

Inputs: grp, limit, offset. Returns: object

address_removeB

Remove an address/permissions entry by ID. Optionally triggers MI address_reload.

Inputs: id (required), reload. Returns: object

avp_deleteC

Delete a global AVP.

Inputs: name (required). Returns: object

avp_getA

Get an AVP value (global scope only — per-transaction AVPs are not MI-accessible).

Parameters

name: AVP name (e.g. $avp(my_var) — pass as my_var).

Inputs: name (required). Returns: object

avp_setC

Set an AVP value in the global scope.

Inputs: name (required), value (required). Returns: object

b2b_bridgeA

Bridge an existing B2B call to a new destination URI.

Useful for attended-transfer, failover, and music-on-hold scenarios.

Parameters

key: Session key from b2b_list_sessions. new_dst: Target SIP URI to bridge to (e.g. sip:agent@domain).

Inputs: key (required), new_dst (required). Returns: object

b2b_list_entitiesA

List raw B2B entities (UAC/UAS/server) tracked by b2b_entities.

Inputs: no named parameters. Returns: object

b2b_list_sessionsA

List active B2B logic sessions (entity keys, state, legs).

Inputs: no named parameters. Returns: object

b2b_sca_listA

List active Shared Call Appearance (SCA) subscriptions.

Inputs: no named parameters. Returns: object

b2b_terminateA

Terminate a B2B session by its entity key.

Parameters

key: The B2B session key as reported by b2b_list_sessions.

Inputs: key (required). Returns: object

b2b_trigger_scenarioA

Trigger a B2B scenario by id (defined in b2b_logic XML scenarios).

Parameters

scenario_id: Scenario id from the b2b_logic configuration. custom_hdrs: Optional custom SIP headers for the scenario invocation. params: Optional semicolon-delimited parameters (per-scenario).

Inputs: scenario_id (required), custom_hdrs, params. Returns: object

bench_quick_inviteB

Run a SIPp INVITE load test against TARGET.

Same shape as bench_quick_register but exercises the call path instead of the registration path.

Inputs: target (required), cps, duration_sec, out_dir, +1 more. Returns: object

bench_quick_registerA

Run a SIPp REGISTER load test against TARGET.

Captures pre/post snapshots of the proxy's state so the run is self-documenting. Default: 50 CPS for 30 s = 1500 registers, safe for any non-toy proxy.

Parameters

target: host:port of the proxy under test. cps: Calls per second. Capped at 1000. duration_sec: Test duration. Capped at 600 (10 min). out_dir: Directory for the bench artefact JSON. Must be in safe allowlist. label: Optional human tag (baseline, after-tune-shm, ...).

Inputs: target (required), cps, duration_sec, out_dir, +1 more. Returns: object

bench_summaryA

Aggregate every bench artefact in OUT_DIR into one summary.

Useful at the end of a tuning run: bench_summary produces a table of (label, kind, CPS, success_rate, p50/p95 latency, shmem delta) so you can see which knobs actually moved the needle.

Inputs: out_dir. Returns: object

carrierroute_activate_hostA

Activate a carrier route host (return to service).

Use this after maintenance to re-enable a previously deactivated gateway.

Inputs: carrier (required), domain (required), prefix (required), host (required). Returns: object

carrierroute_deactivate_hostC

Deactivate a carrier route host (drain, take out of service).

Inputs: carrier (required), domain (required), prefix (required), host (required). Returns: object

carrierroute_dumpA

Dump loaded carrier route tables (carriers, domains, prefixes, hosts).

Inputs: no named parameters. Returns: object

carrierroute_reloadA

Reload carrier route tables from the database.

Inputs: no named parameters. Returns: object

carrierroute_replace_hostA

Replace a host in carrier route (e.g. IP change).

Does not require a reload; applies at runtime.

Inputs: carrier (required), domain (required), prefix (required), host (required), +1 more. Returns: object

cc_agent_loginB

Log a call center agent in or out.

Parameters

agent_id: The agent identifier (e.g. agent1). state: Login state: 1 to log in, 0 to log out.

Inputs: agent_id (required), state (required). Returns: object

cc_list_agentsA

List all call center agents and their current state.

Inputs: no named parameters. Returns: object

cc_list_queueA

List all calls currently queued in the call center.

Inputs: no named parameters. Returns: object

cc_reload_toolA

Reload call center agents and flows from the database.

Inputs: no named parameters. Returns: object

cc_statusA

Get a combined call center status: queue, agents, and flows.

Returns all three datasets in a single response for a complete overview of the call center state.

Inputs: no named parameters. Returns: object

cdr_auditA

Scan the acc table for gaps, duplicates, and duration anomalies.

Parameters

date_from, date_to: ISO timestamps bounding the audit window. Window is capped at 31 days; longer ranges should go through a warehouse / BI tool. max_gap_sec: Gap between consecutive CDRs that counts as a suspicious silence. Default 300s (5 min). long_call_threshold_sec: Duration above which a call is flagged as a potential stuck dialog. Default 14400s (4h).

Inputs: date_from (required), date_to (required), max_gap_sec, long_call_threshold_sec. Returns: object

cdr_count_by_codeB

Count CDRs by SIP response code within a window.

Quick-glance "what's the 5xx rate right now?" report — SQL-side aggregation so it is cheap even on large acc tables.

Inputs: date_from (required), date_to (required). Returns: object

cdr_summaryB

Volume and success-code breakdown over a window.

Parameters

date_from, date_to: ISO timestamps bounding the report window. group_by: hour or day. Grouping is computed in Python so it works across sqlite / mysql / postgres without backend-specific SQL.

Inputs: date_from (required), date_to (required), group_by. Returns: object

cfg_add_moduleA

Add a module (with optional modparams) to an existing OpenSIPS configuration.

Inserts the loadmodule directive and any modparam lines after the last existing loadmodule or modparam block.

Parameters

config_content: The existing OpenSIPS configuration text. module_name: The module to add (e.g. dispatcher, rtpengine). params: Optional dict of {param_name: value} to set via modparam.

Inputs: config_content (required), module_name (required), params. Returns: object

cfg_backupA

Copy config_path to a timestamped backup in a safe directory.

The backup name is <basename>.bak-YYYYMMDD-HHMMSS next to the original (or in backup_dir when provided). Returns the backup path so the caller can pass it to cfg_rollback later.

Parameters

config_path: Absolute path of the existing config file. Must live in an allowlisted directory (/tmp, /var/tmp, or $HOME; override with OPENSIPS_MCP_OUT_DIR_ROOT). backup_dir: Optional destination directory for the backup copy. Default: alongside the original file.

Inputs: config_path (required), backup_dir. Returns: object

cfg_build_from_flagsA

Build a flat opensips.cfg from a set of WITH_* flags.

Materialises the Kamailio-style flag vocabulary as a flat, no-#!ifdef OpenSIPS config. Only the enabled blocks are inlined, so the output reads cleanly without the nested-ifdef problem Kamailio users hit.

Parameters

flags: Any combination of WITH_* flags (see cfg_list_flags). site_params: Optional site values (LISTEN, DB_URL, TLS_CERT_PATH, TLS_KEY_PATH, RTP_PROXY_ADDR, CHILDREN). validate: Run the result through opensips -C when available.

Inputs: flags (required), site_params, validate. Returns: object

cfg_check_compatA

Check a config for incompatibilities with a target OpenSIPS version.

Reports modules that don't exist in the target version, deprecated parameters, and silent-gotcha defaults. Pairs well with :func:cfg_migrate_plan — run compat first to learn about removals, plan next to see the rewrites.

Parameters

config_content: The OpenSIPS configuration text to check. target_version: The version you intend to run this config on.

Inputs: config_content (required), target_version (required). Returns: object

cfg_compose_flagsA

Resolve a set of WITH_* flags into modules and globals.

Does NOT produce a config — it answers the question "if I enable these flags, what modules get loaded and which globals get set?". Pairs with :func:cfg_build_from_flags for the full render.

Parameters

flags: List of WITH_* flag names (case-insensitive).

Inputs: flags (required). Returns: object

cfg_diffA

Compute a unified diff between two OpenSIPS configurations.

Parameters

config_a: The first (original) configuration text. config_b: The second (modified) configuration text.

Inputs: config_a (required), config_b (required). Returns: object

cfg_diff_referenceA

Compare a config against the reference output for a scenario.

Shows which parts of the config are "custom" (differ from the canned scenario template). Useful for reviewing what your team has diverged on and would need to re-apply after upgrading the reference template.

Parameters

config_content: The OpenSIPS configuration text to compare. scenario: The reference scenario name (see cfg_list_scenarios). params: Parameters used to render the reference.

Inputs: config_content (required), scenario (required), params. Returns: object

cfg_dry_runA

Safely iterate on a config: preprocess + validate, write nothing.

Intended as the LLM's tight feedback loop while building or editing a config — call this between successive renders to verify correctness before asking the user to save.

Parameters

main_m4: Contents of opensips.cfg.m4. local_m4: Contents of local.cfg.m4.

Inputs: main_m4 (required), local_m4 (required). Returns: object

cfg_editA

Validate an edited OpenSIPS config and return a unified diff.

Does not write anything to disk — the caller chooses to persist after reviewing the diff.

Parameters

existing_cfg: The current on-disk configuration text. change_description: Short natural-language description of the intended change (e.g. "Increase children to 16 and enable TLS"). new_cfg: The LLM's rewritten configuration text.

Inputs: existing_cfg (required), change_description (required), new_cfg (required). Returns: object

cfg_explainA

Explain an OpenSIPS directive, module, function, or pseudo-variable.

kubectl explain equivalent. Accepts flexible topic syntax:

  • dialog — module overview

  • dialog.db_mode — specific modparam

  • record_route — script function

  • $ru — pseudo-variable

  • listen — global parameter

  • lb_status — MI command (with version-rename history)

Parameters

topic: The directive / name to explain.

Inputs: topic (required). Returns: object

cfg_explain_routeA

Explain an OpenSIPS route block by identifying its components.

Analyzes the route code and identifies SIP methods handled, module functions called, conditions, and overall flow.

Parameters

route_code: The route block code to explain (e.g. the body of a route{...}).

Inputs: route_code (required). Returns: object

cfg_generateA

Generate an OpenSIPS configuration from a predefined scenario template.

Renders the scenario template, then — by default — runs opensips -C -f when the binary is on PATH and runs the static linter unconditionally. The Summit deck claim "Every output runs through opensips -C -f" lives here: this is the headline tool, and it owns the validate-on-render contract. If the binary is unavailable, the result includes validation: {"skipped": true, "reason": "opensips binary not found"} so the caller can decide whether to proceed.

Parameters

scenario: Name of the scenario (e.g. load_balancer, class4_sbc, registrar_class5, webrtc_gateway, residential_pbx, call_center, b2bua, sbc_with_rtpengine). params: Template parameters such as db_url, listen_ip, domain, etc. validate: When True (default), run opensips -C -f against the rendered cfg. Skipped (with a reason) if the binary is not on PATH. lint: When True (default), run cfg_lint against the rendered cfg and surface findings + suggestions. Pure Python, always available.

Inputs: scenario (required), params, validate, lint. Returns: object

cfg_generate_iterativeA

Generate an OpenSIPS config and iteratively validate it.

Generates a configuration from the given scenario, validates it using opensips -C -f, and reports the results. If validation fails, the raw output is included for diagnosis.

Parameters

scenario: The scenario template name. params: Template parameters. max_attempts: Maximum validation attempts (reserved for future auto-fix logic).

Inputs: scenario (required), params, max_attempts. Returns: object

cfg_generate_m4A

Render the m4 template pair (main + local) for a scenario.

The returned strings are intended to be persisted to opensips.cfg.m4 and local.cfg.m4 respectively, then preprocessed with m4.

Parameters

scenario: Scenario name (load_balancer, class4_sbc, registrar_class5, webrtc_gateway, base). template_params: Structural/Jinja2 template knobs (e.g. include_usrloc for base). site_params: Dict of m4 defines that will appear in local.cfg.m4 (e.g. {"LISTEN": "udp:10.0.0.5:5060", "DB_URL": "mysql://..."}).

Inputs: scenario (required), template_params, site_params. Returns: object

cfg_get_scenario_paramsB

Get required and optional parameters for a configuration scenario.

Parameters

scenario: The scenario name (e.g. load_balancer).

Inputs: scenario (required). Returns: object

cfg_lintA

Run the OpenSIPS semantic linter against a configuration.

Checks module dependencies, orphaned modparams, deprecated parameters, missing mf_process_maxfwd_header, anti-flood absence, NAT/rtpengine dependency gaps, and other common production pitfalls.

Parameters

config_content: The OpenSIPS configuration text to lint. include: Optional allow-list of rule ids (e.g. ["OPS001", "OPS004"]). exclude: Optional deny-list of rule ids.

Inputs: config_content (required), include, exclude. Returns: object

cfg_list_backupsA

List available .bak-* backups for config_path.

Parameters

config_path: Absolute path whose backups we want to enumerate. The basename is used as the prefix filter. backup_dir: Optional directory to search. Defaults to the directory of config_path.

Inputs: config_path (required), backup_dir. Returns: object

cfg_list_flagsA

List all available WITH_* feature flags.

The flag vocabulary is Kamailio-compatible so engineers migrating between the two projects keep the same mental model.

Inputs: no named parameters. Returns: object

cfg_list_lint_rulesA

Return all available lint rule ids.

Inputs: no named parameters. Returns: object

cfg_list_modulesA

List modules from the OpenSIPS module catalog.

Used by the wizard and by LLMs that need to check whether a module is available in a given version.

Parameters

version: Filter to modules available in this OpenSIPS version (e.g. 3.6). category: Filter by category (core, transport, tls, db, routing, auth, media, security, nat, ...).

Inputs: version, category. Returns: object

cfg_list_scenariosA

List all available OpenSIPS configuration scenarios with descriptions.

Inputs: no named parameters. Returns: object

cfg_list_versionsA

List supported OpenSIPS versions and the chain of migration hops.

Returns the known versions (from the migration rule tables) and the summary of each hop (2.4 → 3.0 → ... → 4.0). Use this before calling :func:cfg_migrate to confirm your source and target are supported.

Inputs: no named parameters. Returns: object

cfg_m4_checkA

Diagnostic: check whether the m4 binary is available on the host.

Returns path, version, and availability status.

Inputs: no named parameters. Returns: object

cfg_migrateA

Migrate a configuration between OpenSIPS versions.

Walks the hop chain (2.4 → 3.0 → ... → 4.0) applying every behaviour-preserving rewrite rule. Anything that cannot be safely auto-applied is reported as a warning — the engineer must apply those manually.

When validate is true and an opensips binary is available, the migrated config is also run through opensips -C -f.

Parameters

config_content: The current OpenSIPS configuration text. from_version: Current OpenSIPS version. to_version: Target OpenSIPS version. validate: Run the migrated config through opensips -C when available.

Inputs: config_content (required), from_version (required), to_version (required), validate. Returns: object

cfg_migrate_planA

Report what a version migration would do, without rewriting the config.

Terraform-plan equivalent. Returns the ordered list of hops, every automatic rewrite, and every manual step / silent-gotcha warning.

Parameters

config_content: The current OpenSIPS configuration text. from_version: Current OpenSIPS version (e.g. 3.4). to_version: Target OpenSIPS version (e.g. 3.6).

Inputs: config_content (required), from_version (required), to_version (required). Returns: object

cfg_optimizeB

Analyze an OpenSIPS configuration and suggest optimizations.

Checks for common issues: missing modules, redundant settings, performance tuning opportunities, and security recommendations.

Parameters

config_content: The OpenSIPS configuration text to analyze.

Inputs: config_content (required). Returns: object

cfg_parseA

Parse an OpenSIPS configuration and extract its structure.

Returns modules, modparams, listen addresses, routes, and global params.

Parameters

config_content: The full OpenSIPS configuration text to parse.

Inputs: config_content (required). Returns: object

cfg_preprocessA

Run m4 local.cfg.m4 opensips.cfg.m4 and optionally validate the output.

Parameters

main_m4: Contents of opensips.cfg.m4. local_m4: Contents of local.cfg.m4 (site-specific define(...) lines). validate: If True and the opensips binary is present, run opensips -C -f on the preprocessed output.

Inputs: main_m4 (required), local_m4 (required), validate. Returns: object

cfg_rollbackA

Restore backup_path to target_path and re-validate.

Before overwriting, the current contents of target_path (if any) are themselves backed up so this tool is always reversible one more step. If validate_after=True, the restored config is passed through opensips -C; a validation failure does NOT undo the restore (the caller asked for the restore explicitly), but the result is surfaced so the caller can decide what to do next.

Parameters

backup_path: Absolute path to the backup file to restore. target_path: Absolute path to overwrite. Must live in an allowlisted dir. validate_after: Run opensips -C on the restored file. Default True.

Inputs: backup_path (required), target_path (required), validate_after. Returns: object

cfg_save_sessionA

Persist the m4 pair to disk, optionally also writing the preprocessed cfg.

Writes {out_dir}/opensips.cfg.m4 and {out_dir}/local.cfg.m4. When write_preprocessed is True, also runs m4 and writes {out_dir}/opensips.cfg.

The output directory is validated — writes to system directories such as /, /etc, /usr, /bin are rejected.

Parameters

out_dir: Directory that will receive the files. Created if missing. main_m4: Contents for opensips.cfg.m4. local_m4: Contents for local.cfg.m4. write_preprocessed: If True, also run m4 and write opensips.cfg.

Inputs: out_dir (required), main_m4 (required), local_m4 (required), write_preprocessed. Returns: object

cfg_start_sessionB

Start an interactive m4 config-building session.

Takes a natural-language description (e.g. "I need a SIP load balancer for 4 backends") and returns the suggested scenario, required site parameters with descriptions, optional parameters, and a next-step instruction for the LLM.

Parameters

description: Natural-language description of the deployment the user wants.

Inputs: description (required). Returns: object

cfg_tuneA

Generate a PGTune-style capacity-tuned override snippet.

Ask the user five questions about their workload, return a small paste-ready set of overrides with a # why: comment on every line. Intended to be merged into an existing opensips.cfg — it is NOT a full configuration.

Parameters

role: One of edge, registrar, lb, b2bua, sbc, presence, generic. cpu_cores: Physical or allocated CPU cores. memory_mb: RAM in megabytes available to OpenSIPS. cps: Expected peak calls per second. concurrent_calls: Expected peak concurrent calls. tls: True if TLS / WSS traffic is significant. nat: True if the deployment handles heavy NAT'd clients. ha: True if deployed active-active / clustered. registrations: Expected concurrent registered AoRs (registrar role).

Inputs: role, cpu_cores, memory_mb, cps, +5 more. Returns: object

cfg_validateA

Validate an OpenSIPS configuration by running opensips -C -f.

Parameters

config_content: The full OpenSIPS configuration text to validate.

Inputs: config_content (required). Returns: object

cleanup_test_dataA

Remove every subscriber matching <username_prefix>NNNN under domain. Companion to gen_test_subscribers.

Parameters

domain: Domain whose test users to remove. username_prefix: Same prefix used in generation. confirm: Must be True to actually delete. Default False returns the dry-run count of matched rows.

Inputs: domain (required), username_prefix, confirm. Returns: object

cluster_drain_nodeA

Gracefully drain a cluster node ahead of maintenance.

Marks the node as disabled in the clusterer, then polls the local dialog count until it stops declining or the timeout fires. The caller is expected to stop the OpenSIPS process only after this tool confirms the dialog backlog is low.

This tool operates on the cluster metadata — it does NOT shut OpenSIPS down. Combine with your init-script / systemd unit to actually stop the service.

Parameters

cluster_id: Target cluster ID. node_id: Target node ID within the cluster. timeout_sec: Maximum time to wait for dialogs to drain. Clamped to 5..600. poll_interval_sec: Seconds between dialog-count samples. Clamped to 1..60.

Inputs: cluster_id (required), node_id (required), timeout_sec, poll_interval_sec. Returns: object

cluster_promote_nodeA

Bring a disabled cluster node back into active service.

Counterpart to cluster_drain_node: flips status back to OK so peers resume sending traffic / replication to the node.

Inputs: cluster_id (required), node_id (required). Returns: object

cluster_send_commandA

Send an MI command to a specific node in the cluster.

Parameters

cluster_id: The cluster ID. node_id: The target node ID within the cluster. mi_cmd: The MI command to execute on the remote node. Must be registered in :data:MI_COMMANDS; the per-command permission is enforced so this tool cannot be used to bypass mi.write controls. mi_params: Optional parameters for the MI command (JSON string).

Inputs: cluster_id (required), node_id (required), mi_cmd (required), mi_params. Returns: object

cluster_statusA

List all cluster nodes and their current status.

Inputs: no named parameters. Returns: object

cluster_sync_checkB

Report cluster sync health: capabilities, sharing tags, topology.

Combines clusterer_list, clusterer_list_cap and clusterer_list_shtags into one view so an operator can answer "is replication healthy across all nodes?" from a single call.

Inputs: cluster_id (required). Returns: object

cluster_topologyA

Show the cluster topology — how nodes are interconnected.

Inputs: no named parameters. Returns: object

db_table_backupA

Dump table to a timestamped JSON file under out_dir.

Parameters

table: One of the supported OpenSIPS data tables (subscriber, dispatcher, address, drouting_rule, drouting_gateway, drouting_carrier, dialplan, load_balancer, domain, tls_mgm). out_dir: Directory to write into. Must be in the safe allowlist. label: Optional tag (e.g. before-bulk-import) added to the filename.

Inputs: table (required), out_dir (required), label. Returns: object

db_table_list_backupsA

List backup files for table under out_dir, newest first.

Inputs: table (required), out_dir (required). Returns: object

db_table_restoreA

Restore a table from a JSON backup produced by db_table_backup.

By default this is a dry-run. Pass confirm=True to actually write. Pass truncate_first=True to delete every existing row in the table BEFORE inserting the backup — needed when the backup is intended to fully replace current state, but dangerous if you misjudge the scope.

Parameters

backup_path: Path to the JSON file produced by db_table_backup. confirm: Must be True to write. Default False returns the plan. truncate_first: If True, delete current rows before inserting from the backup. Use when restoring a complete table snapshot.

Inputs: backup_path (required), confirm, truncate_first. Returns: object

diagnose_nat_flowA

Correlate dialog, contact, RTPEngine, and NAT state for one call.

The canonical "why is this call one-way audio?" triage tool. Pulls the four pieces of state that actually matter in NAT failures:

  1. Dialog state from dlg_list — is the call still active? which branches?

  2. User-location contact from ul_show_contact (derived from the SIP From URI of the active dialog) — is the contact behind NAT and is the received field populated?

  3. RTPEngine state via rtpengine_show and get_statistics for rtpengine: — is media being relayed at all?

  4. Nathelper counters — is ping working? did the contact expire mid-call?

Returns a unified view plus a best-effort diagnosis string. A real engineer is still the best judge — this just consolidates the data so they don't have to bounce between four MI calls.

Parameters

callid: The SIP Call-ID of the problematic dialog.

Inputs: callid (required). Returns: object

dialplan_add_ruleB

Add a dialplan translation rule.

Parameters

dpid: Dialplan id (translation table id, referenced from script). match_op: Match operator — 0 = equal, 1 = regex (default), 2 = fnmatch. match_exp: Pattern to match against the input. subst_exp: Substitution regex (for match_op=1). repl_exp: Replacement string. pr: Priority — lower matches first.

Inputs: dpid (required), match_exp (required), subst_exp (required), repl_exp (required), +7 more. Returns: object

dialplan_delete_ruleC

Delete a dialplan rule by id.

Inputs: id (required), reload. Returns: object

dialplan_list_rulesB

List dialplan rules, optionally filtered by dialplan id.

Inputs: dpid, limit, offset. Returns: object

dialplan_reloadA

Reload dialplan rules from the database (triggers MI dp_reload).

Inputs: no named parameters. Returns: object

dialplan_translateA

Test a dialplan translation without dispatching a call.

Parameters

dpid: Dialplan table id. input: Input string to translate (e.g. +14155551212).

Returns

The translated output string and matching rule metadata.

Inputs: dpid (required), input (required). Returns: object

dialplan_update_ruleC

Update a dialplan rule by id.

Inputs: id (required), dpid, match_op, match_exp, +8 more. Returns: object

dispatcher_addB

Add a new dispatcher destination. Optionally triggers MI ds_reload.

Inputs: destination (required), setid, flags, priority, +6 more. Returns: object

dispatcher_list_dbC

List dispatcher destinations from the database, optionally filtered by set ID.

Inputs: setid, limit, offset. Returns: object

dispatcher_removeB

Remove a dispatcher destination by ID. Optionally triggers MI ds_reload.

Inputs: id (required), reload. Returns: object

dispatcher_updateB

Update a dispatcher destination by ID. Optionally triggers MI ds_reload.

Inputs: id (required), destination, setid, flags, +7 more. Returns: object

dlg_endC

End (tear down) an active dialog.

Parameters

callid: The Call-ID of the dialog to terminate. from_tag: The From-tag of the dialog. to_tag: The To-tag of the dialog.

Inputs: callid (required), from_tag (required), to_tag (required). Returns: object

dlg_get_profilesA

Get dialog profile information.

Parameters

profile: Specific profile name to query size for. If omitted, lists all profiles.

Inputs: profile. Returns: object

dlg_listA

List active SIP dialogs.

Parameters

callid: Optional Call-ID to filter by a specific dialog. from_tag: Optional From-tag to further narrow the dialog lookup.

Inputs: callid, from_tag. Returns: object

dlg_push_varC

Push a variable into an active dialog.

Parameters

callid: The Call-ID of the target dialog. from_tag: The From-tag of the target dialog. var_name: Name of the dialog variable to set. var_value: Value to assign to the variable.

Inputs: callid (required), from_tag (required), var_name (required), var_value (required). Returns: object

docker_deploy_scenarioA

Return the docker-compose command to deploy a specific scenario.

Parameters

scenario: Name of the scenario directory (e.g. load-balancer, class4-sbc).

Inputs: scenario (required). Returns: object

docker_list_scenariosA

List all available Docker deployment scenarios.

Returns the scenario names and their docker-compose file paths.

Inputs: no named parameters. Returns: object

docker_logsB

Retrieve recent logs from a Docker Compose service.

Parameters

service: The service name to fetch logs for (default: opensips). lines: Number of recent log lines to return (default: 100).

Inputs: service, lines. Returns: object

docker_restartC

Restart a Docker Compose service.

Parameters

service: The service name to restart (default: opensips).

Inputs: service. Returns: object

docker_statusA

Show the status of running Docker Compose services.

Executes docker compose ps and returns the output.

Inputs: no named parameters. Returns: object

domain_addC

Add a new SIP domain to the database.

Inputs: domain (required), attrs. Returns: object

domain_deleteC

Delete a SIP domain from the database.

Inputs: domain (required). Returns: object

domain_listA

List all locally-served SIP domains.

Inputs: no named parameters. Returns: object

domain_reloadA

Reload the domain table in OpenSIPS via MI command.

Inputs: no named parameters. Returns: object

drouting_add_carrierC

Add a new dynamic routing carrier. Optionally triggers MI dr_reload.

Inputs: carrierid (required), gwlist (required), flags, sort_alg, +4 more. Returns: object

drouting_add_gatewayC

Add a new dynamic routing gateway. Optionally triggers MI dr_reload.

Inputs: address (required), type, strip, pri_prefix, +6 more. Returns: object

drouting_add_ruleC

Add a new dynamic routing rule. Optionally triggers MI dr_reload.

Inputs: groupid (required), prefix (required), gwlist (required), priority, +8 more. Returns: object

drouting_delete_carrierC

Delete a dynamic routing carrier by id.

Inputs: id (required), reload. Returns: object

drouting_delete_gatewayC

Delete a dynamic routing gateway by gwid.

Inputs: gwid (required), reload. Returns: object

drouting_delete_ruleC

Delete a dynamic routing rule by ruleid.

Inputs: ruleid (required), reload. Returns: object

drouting_list_carriersC

List dynamic routing carriers.

Inputs: limit, offset. Returns: object

drouting_list_gatewaysC

List dynamic routing gateways.

Inputs: limit, offset. Returns: object

drouting_list_rulesA

List dynamic routing rules, optionally filtered by group or prefix.

Inputs: groupid, prefix, limit, offset. Returns: object

drouting_update_carrierC

Update a dynamic routing carrier by id.

Inputs: id (required), carrierid, gwlist, flags, +5 more. Returns: object

drouting_update_gatewayC

Update a dynamic routing gateway by gwid.

Inputs: gwid (required), address, type, strip, +7 more. Returns: object

drouting_update_ruleC

Update a dynamic routing rule by ruleid. Optionally triggers MI dr_reload.

Inputs: ruleid (required), groupid, prefix, gwlist, +9 more. Returns: object

ecosystem_healthA

Check health of all ecosystem components (OpenSIPS, Homer, RTPEngine, CP).

Returns a summary of which services are reachable and responsive.

Inputs: no named parameters. Returns: object

ecosystem_overviewA

Show an overview of configured ecosystem component URLs and available tools.

Returns the endpoint configuration for Homer, RTPEngine, and Control Panel along with a summary of ecosystem integration tools.

Inputs: no named parameters. Returns: object

event_listA

List all event types advertised by the running OpenSIPS.

Each entry includes event name (e.g. E_DLG_STATE_CHANGED) and the modules currently registered as publishers.

Inputs: no named parameters. Returns: object

event_list_subscribersA

List active event subscribers, optionally filtered.

Parameters

event: Event name to filter by (e.g. E_DLG_LOAD). socket: Transport socket URI to filter by (e.g. udp:1.2.3.4:8080).

Inputs: event, socket. Returns: object

event_subscribeB

Subscribe to an OpenSIPS event at a given transport socket.

Parameters

event: Event name (e.g. E_DLG_STATE_CHANGED). socket: Destination URI for event delivery — format depends on the backend (udp:host:port, rabbitmq:cluster/exchange, flatstore:/path). expire: Subscription TTL in seconds; 0 = permanent until OpenSIPS restart.

Inputs: event (required), socket (required), expire. Returns: object

fail2ban_ban_ipC

Manually ban an IP address in a fail2ban jail.

Inputs: ip (required), jail. Returns: object

fail2ban_jail_statusA

Get status of a specific fail2ban jail (e.g., opensips, opensips-auth).

Inputs: jail. Returns: object

fail2ban_list_bannedA

List all currently banned IPs for a fail2ban jail.

Inputs: jail. Returns: object

fail2ban_statusA

Get overall fail2ban status including list of active jails.

Inputs: no named parameters. Returns: object

fail2ban_unban_ipC

Unban an IP address from a fail2ban jail.

Inputs: ip (required), jail. Returns: object

fraud_add_ruleC

Add a new fraud detection rule.

Inputs: profileid (required), prefix, start_hour, end_hour, +9 more. Returns: object

fraud_delete_ruleA

Delete a fraud detection rule by rule ID.

Inputs: ruleid (required). Returns: object

fraud_list_rulesB

List fraud detection rules, optionally filtered by profile ID.

Inputs: profileid, limit, offset. Returns: object

fraud_reloadA

Reload fraud detection rules in OpenSIPS via MI command.

Inputs: no named parameters. Returns: object

fraud_update_ruleC

Update an existing fraud detection rule.

Inputs: ruleid (required), profileid, prefix, start_hour, +10 more. Returns: object

gen_test_dispatcherA

Provision a dispatcher set with a handful of test destinations.

Useful when you have a scenario template that uses ds_select_dst(<set_id>, ...) but the dispatcher table is empty.

Parameters

set_id: Dispatcher set id. Templates default to set 1. destinations: List of SIP URIs (e.g. ["sip:10.0.0.10:5060", "sip:10.0.0.11:5060"]). dry_run: Default True. Returns the plan without writing. socket: Optional outbound socket per row.

Inputs: set_id (required), destinations (required), dry_run, socket. Returns: object

gen_test_subscribersA

Generate N test subscribers with predictable usernames + passwords.

Useful for smoke-testing REGISTER paths and synthetic load against a fresh deployment. Test users are named <prefix>NNNN with deterministic passwords so a SIPp scenario can authenticate without external state.

Parameters

domain: Domain to provision under. Validated against validate_domain. count: Number to create. Cap: 500. username_prefix: Username prefix; default test produces test0001..testNNNN. password_prefix: Password prefix; defaults to secret so test passwords look like secret0001. dry_run: Default True. Returns the plan without writing.

Inputs: domain (required), count, username_prefix, password_prefix, +1 more. Returns: object

get_memory_statsA

Show OpenSIPS memory usage details (shared and private memory).

Inputs: no named parameters. Returns: object

get_process_listA

List all running OpenSIPS processes with their PID and description.

Inputs: no named parameters. Returns: object

get_statisticsA

Retrieve OpenSIPS runtime statistics.

Parameters

group: Statistics group (e.g. core, shmem, net, tm, sl, usrloc, or all for everything). name: Optional specific statistic name within the group.

Inputs: group, name. Returns: object

get_tcp_connectionsB

List all active TCP and TLS connections.

Inputs: no named parameters. Returns: object

get_uptimeA

Show how long the OpenSIPS instance has been running.

Inputs: no named parameters. Returns: object

health_checkB

Run a comprehensive health check against the OpenSIPS instance.

Checks MI connectivity and retrieves basic runtime statistics.

Inputs: no named parameters. Returns: object

homer_correlate_callidB

Correlate a Call-ID across OpenSIPS hops (e.g. b2b, topology_hiding).

OpenSIPS rewrites Call-ID when topology_hiding's C flag is set or when B2BUA links two legs. Homer's call-data endpoint returns correlated sibling Call-IDs in the response when the search matches a parent ID. This tool wraps that query.

Inputs: callid (required), from_ts (required), to_ts (required). Returns: object

homer_export_pcapA

Request a pcap export of the captured SIP messages for callid.

Homer 7 exposes /api/v3/export/call/messages/pcap. This tool returns the pcap bytes (base64-encoded if the response is binary) so an operator can save them and open in Wireshark. Useful when the SIP ladder by itself is not enough and you need to see the raw bytes (e.g. malformed headers, weird encoding).

Parameters

callid: Exact SIP Call-ID. from_ts, to_ts: Time window (Unix milliseconds).

Inputs: callid (required), from_ts (required), to_ts (required). Returns: object

homer_get_call_flowB

Retrieve the SIP call-flow (ladder diagram) for a call from Homer.

Parameters

call_id: The SIP Call-ID to fetch the flow for.

Inputs: call_id (required). Returns: object

homer_get_call_transactionA

Fetch the full SIP transaction ladder for a single Call-ID.

Returns every captured SIP message (requests and replies, across proxies if multiple OpenSIPS nodes capture the same dialog) in timestamp order. Hits the same /api/v3/search/call/data endpoint as homer_search_calls_v7 — Homer doesn't have a dedicated "get transaction" path; transaction reconstruction is done by setting param.transaction.call=true and filtering by Call-ID.

Parameters

callid: Exact SIP Call-ID. from_ts, to_ts: Time window (Unix milliseconds). Homer is strict — the window must bracket the call start.

Inputs: callid (required), from_ts (required), to_ts (required). Returns: object

homer_healthA

Check whether the configured Homer instance is reachable.

Light probe — hits Homer's /api/v3/status endpoint. Useful when deciding whether to even attempt a homer_search_calls_v7 call. Returns {ok: false} (not raises) when Homer is not configured — the absence of Homer must not break other tools.

Inputs: no named parameters. Returns: object

homer_search_callsC

Search SIP calls captured by Homer/SIPCAPTURE.

Parameters

caller: Filter by calling party (From user). callee: Filter by called party (To user). call_id: Filter by SIP Call-ID. time_from: Start of time range (ISO-8601 string). time_to: End of time range (ISO-8601 string).

Inputs: caller, callee, call_id, time_from, +1 more. Returns: object

homer_search_calls_v7A

Homer 7 native search with ms-precision timestamps + source-IP filter.

Counterpart to homer_search_calls (which takes ISO strings). Prefer this when you are chasing a tight time window or want to filter by source IP — useful when a carrier denies sending an INVITE.

Parameters

from_ts: Start of the search window as a Unix timestamp in milliseconds. Homer 7 expects millisecond precision on this endpoint. to_ts: End of the search window, Unix ms. from_user: Optional substring match on the SIP From user. to_user: Optional substring match on the SIP To user. callid: Exact SIP Call-ID to locate a specific dialog. source_ip: Optional source IP filter. Validated against ipaddress.ip_address. limit: Maximum rows to return (capped at 500).

Inputs: from_ts (required), to_ts (required), from_user, to_user, +3 more. Returns: object

homer_statsA

Retrieve Homer capture statistics (method distribution, totals).

Inputs: no named parameters. Returns: object

lb_listA

List all load balancer destination groups and their current state.

Inputs: no named parameters. Returns: object

lb_reloadA

Reload load balancer destinations from the database.

Inputs: no named parameters. Returns: object

lb_resizeC

Resize the capacity of a load balancer resource.

Parameters

group: The destination group ID. destination: The destination URI. resource: The resource name to resize. capacity: The new capacity value.

Inputs: group (required), destination (required), resource (required), capacity (required). Returns: object

lb_set_statusC

Enable or disable a load balancer destination.

Parameters

group: The destination group ID. destination: The destination URI. enabled: True to enable, False to disable.

Inputs: group (required), destination (required), enabled (required). Returns: object

lcr_dumpA

Dump LCR rules and gateways currently loaded in memory.

Inputs: no named parameters. Returns: object

lcr_reloadB

Reload LCR rules and gateways from the database.

Inputs: no named parameters. Returns: object

mid_registrar_dumpA

Dump mid-registrar AOR state (UAC→upstream mappings).

Inputs: no named parameters. Returns: object

mid_registrar_updateC

Force a mid-registrar record update for an AOR.

Inputs: aor (required). Returns: object

mi_executeA

Execute a known OpenSIPS MI command.

The command must be registered in :data:MI_COMMANDS. The specific permission recorded on the catalogue entry (mi.read or mi.write) is enforced in addition to the outer mi.execute scope, so a future role with read-only MI access cannot use this tool to run a write command.

Parameters

command: The MI command name (e.g. ul_dump, lb_list). params: Optional parameters for the MI command.

Inputs: command (required), params. Returns: object

mi_list_commandsA

List all MI commands available on the connected OpenSIPS instance.

Inputs: no named parameters. Returns: object

module_add_mi_commandB

Add an MI command to an existing OpenSIPS module C source.

Inserts the MI command handler function and updates the mi_cmds array.

Parameters

module_source: The existing C source code of the module. command_name: Name of the MI command to add (e.g. my_status). command_description: Description of what the MI command does.

Inputs: module_source (required), command_name (required), command_description. Returns: object

module_add_paramB

Add a module parameter to an existing OpenSIPS module C source.

Inserts the parameter variable declaration and updates the params array.

Parameters

module_source: The existing C source code of the module. param_name: Name of the parameter (e.g. db_url). param_type: Parameter type: str or int. default_value: Default value for the parameter.

Inputs: module_source (required), param_name (required), param_type, default_value. Returns: object

module_compileB

Compile an OpenSIPS module from source.

Runs make modules for the specified module within the OpenSIPS source tree.

Parameters

module_name: Name of the module directory under modules/. source_path: Path to the OpenSIPS source tree root.

Inputs: module_name (required), source_path. Returns: object

module_generate_docsB

Generate README documentation for an OpenSIPS module.

Produces a markdown README with parameter, MI command, and usage documentation.

Parameters

name: Module name. description: Module description. mi_commands_json: JSON array of MI commands (same format as module_scaffold). params_json: JSON array of parameters (same format as module_scaffold).

Inputs: name (required), description, mi_commands_json, params_json. Returns: object

module_scaffoldA

Generate a complete OpenSIPS C module skeleton.

Creates all necessary files for a new OpenSIPS module: C source, header, Makefile, README, and optional MI command implementations.

Parameters

name: Module name (e.g. my_module). Must be a valid C identifier. description: Short description of the module's purpose. mi_commands_json: JSON array of MI commands. Each element should have name, optional description, and optional params (list of strings). Example: [{"name": "my_cmd", "description": "Does something", "params": ["arg1"]}] params_json: JSON array of module parameters. Each element should have name, type (str or int), and optional default. Example: [{"name": "db_url", "type": "str", "default": "mysql://localhost/opensips"}]

Inputs: name (required), description, mi_commands_json, params_json. Returns: object

module_validateA

Validate that an OpenSIPS module can be loaded.

Creates a minimal configuration and runs opensips -C to verify the module's shared object can be loaded without errors.

Parameters

module_name: Name of the module (without .so extension). module_path: Path to the directory containing the compiled .so file.

Inputs: module_name (required), module_path (required). Returns: object

nathelper_enable_pingA

Enable or disable NAT pinging for registered contacts.

NAT pings are OPTIONS or keepalive packets sent to registered UACs to keep their NAT bindings open. Disabling may cause contacts behind NAT to become unreachable after NAT timeout (~30s typical).

Parameters

enable: True to enable pinging, False to disable.

Inputs: enable. Returns: object

nathelper_statsA

Return nathelper runtime statistics (ping counts, failure rate).

Useful for diagnosing NAT keepalive issues and sizing ping load.

Inputs: no named parameters. Returns: object

observability_categories_for_modulesA

Report which dashboard categories would fire for a given module set.

Useful for a "what would I get?" preview before calling the bundle generator. Tolerates "dialog" or "dialog.so" indifferently.

Parameters

modules: Module names with or without .so suffix.

Inputs: modules (required). Returns: object

observability_generate_bundleA

Build a full deployment bundle from a scenario.

The bundle pairs the cfg generator output with everything you need to actually observe the deployment::

opensips.cfg                            # rendered + prometheus.so injected
monitoring/
  prometheus.yml                        # scrape config
  docker-compose.monitoring.yml         # Prometheus + Grafana stack
  grafana/
    provisioning/
      datasources/datasource.yml
      dashboards/dashboard.yml
    dashboards/<deployment>-*.json      # one per triggered category
README.md

Categories are picked from the cfg's loadmodule set, so the dashboards never drift from the modules actually loaded.

Parameters

scenario: A scenario name (see cfg_list_scenarios). params: Scenario parameters (same as cfg_generate). deployment_name: Slug used in titles, filenames, and Prometheus labels. Defaults to the scenario name. inject_prometheus: Add prometheus.so + httpd.so to the cfg if absent. Default True. Set False if you want to wire the exporter yourself. prom_port: Port the OpenSIPS httpd module listens on. Default 8888. grafana_port: External port to publish Grafana on. Default 3000. opensips_host: Hostname Prometheus scrapes. Default "opensips" to match the docker network alias used by the project's ecosystem stack.

Inputs: scenario (required), params, deployment_name, inject_prometheus, +3 more. Returns: object

observability_generate_bundle_from_cfgA

Build a full deployment bundle from an arbitrary cfg (not a scenario).

Same output shape as observability_generate_bundle, but takes the cfg directly. Useful when you've hand-edited a generator output or migrated a legacy config and want the matching observability stack.

Inputs: config_content (required), deployment_name, inject_prometheus, prom_port, +2 more. Returns: object

observability_generate_dashboardsA

Render a scenario and synthesize matching Grafana dashboards.

The cfg is rendered (validating required params), the loaded module set is parsed out, and one dashboard JSON is produced per triggered panel category. Returns {dashboards: {filename: dashboard_dict}, ...} plus the matched module list for transparency.

Parameters

scenario: A scenario name (see cfg_list_scenarios). params: Same parameters you would pass to cfg_generate. deployment_name: Slug used in titles and filenames. Defaults to the scenario name. extra_tags: Additional Grafana tags appended to every dashboard.

Inputs: scenario (required), params, deployment_name, extra_tags. Returns: object

observability_generate_dashboards_from_cfgA

Synthesize Grafana dashboards from any OpenSIPS configuration text.

Parses loadmodule directives and emits one dashboard JSON per triggered panel category. Works on hand-edited configs, the output of cfg_generate, the output of cfg_build_from_flags — anything that's syntactically a valid OpenSIPS cfg.

Parameters

config_content: Full OpenSIPS configuration text. deployment_name: Slug used in dashboard titles and filenames. extra_tags: Additional Grafana tags appended to every dashboard.

Inputs: config_content (required), deployment_name, extra_tags. Returns: object

observability_generate_grafana_provisioningA

Generate Grafana provisioning YAMLs (datasource + dashboard provider).

Drop the two files into Grafana's /etc/grafana/provisioning/ layout and Grafana auto-registers the Prometheus datasource and auto-loads every JSON in dashboards_path on startup.

Parameters

prometheus_url: URL Grafana should use to query Prometheus. folder: Grafana folder name dashboards land in. dashboards_path: Filesystem path inside the Grafana container where dashboard JSONs are mounted.

Inputs: prometheus_url, folder, dashboards_path. Returns: object

observability_generate_monitoring_composeA

Generate a docker-compose snippet for a Prometheus + Grafana side-car.

The stack assumes the OpenSIPS service is on the same external Docker network so Prometheus can scrape opensips:8888/prometheus.

Parameters

deployment_name: Used in container names so multiple deployments coexist. grafana_port, prometheus_port: External ports to publish. grafana_admin_password: Set the Grafana admin password (default admin). network: External Docker network name. Create with docker network create <name> before starting the stack.

Inputs: deployment_name, grafana_port, prometheus_port, grafana_admin_password, +1 more. Returns: object

observability_generate_prometheus_scrapeB

Generate a Prometheus scrape configuration.

Parameters

deployment_name: Used as the instance label so dashboards can pivot on it. opensips_host, prom_port: Default target when targets is omitted. metrics_path: Path the prometheus.so module serves on (default /prometheus). scrape_interval: Prometheus scrape interval. Default 15s. targets: Optional list of [label, "host:port"] pairs for multi-instance scraping. When omitted, a single target is generated from opensips_host + prom_port.

Inputs: deployment_name, opensips_host, prom_port, metrics_path, +2 more. Returns: object

observability_inject_prometheusA

Add prometheus.so (and httpd.so if missing) to an OpenSIPS cfg.

Most scenarios do not load prometheus.so by default. This tool adds the minimum lines needed for the Prometheus scrape config and Grafana dashboards to actually work:

  1. loadmodule "httpd.so" (if missing)

  2. loadmodule "prometheus.so"

  3. modparam("prometheus", "statistics", "") — expose all groups

  4. modparam("httpd", "port", <prom_port>) (if missing)

Idempotent: re-running on a cfg that already loads prometheus.so is a no-op. Returns warnings if httpd is configured for a different port (the scrape job needs to target that port instead).

Parameters

config_content: Existing OpenSIPS configuration text. prom_port: TCP port the httpd module should listen on. Default 8888.

Inputs: config_content (required), prom_port. Returns: object

observability_list_panel_categoriesA

List the Grafana panel categories the dashboard generator can emit.

Each category produces one dashboard JSON (when its trigger modules are present in the target cfg). overview is always emitted.

Returns {categories: [{name, title, description, trigger_modules, panel_count}, ...]}.

Inputs: no named parameters. Returns: object

observability_save_bundleA

Persist a bundle's {path: content} map to disk.

The files map is the files field from observability_generate_bundle (relative paths → text contents). The destination out_dir is validated against the same allowlist used by cfg_save_session — writes to system directories such as /, /etc, /usr are rejected.

Parameters

out_dir: Absolute path to the bundle root. Created if missing. files: Mapping of relative path → file contents. overwrite: If False (default), refuse to write any file that already exists.

Inputs: out_dir (required), files (required), overwrite. Returns: object

opensips_cp_statusA

Check OpenSIPS Control Panel availability and status.

Inputs: no named parameters. Returns: object

opensips_versionA

Show the version string of the connected OpenSIPS instance.

Inputs: no named parameters. Returns: object

perf_hotspotsA

Quick "where is the pain?" summary.

Combines mem, get_statistics for core rates and error counters, and a snapshot of process state. Returns a flat dict of the single most useful numbers — shmem usage %, dialog count, tm active transactions, error rate — so an operator (or LLM) can decide whether to dig deeper.

Inputs: no named parameters. Returns: object

perf_memory_reportA

Report OpenSIPS shared-memory and per-process package-memory usage.

shm is the pool OpenSIPS uses for cross-process state (dialogs, usrloc, tm transactions). Running out triggers out of shm memory errors that kill calls silently — this is the number to watch in production. pkg is per-process private memory; a runaway module leak shows up there first.

Inputs: no named parameters. Returns: object

perf_process_breakdownA

Group OpenSIPS child processes by role and count them.

Returns per-type counts (UDP receivers, TCP workers, timer processes, HTTPD, MI workers, module-owned children) so an operator can spot misconfiguration — e.g. children=4 on an 8-core machine, or a missing tcp_workers that leaves TLS single-threaded.

Inputs: no named parameters. Returns: object

perf_sample_windowA

Sample runtime statistics at a fixed cadence over a short window.

Useful for "is the proxy under pressure right now?" snapshots. Pulls the statistic groups at sample_count evenly-spaced points and returns the raw time-series — the caller (or LLM) computes deltas.

For long-running observation use a real TSDB (Prometheus, Graphite) via proto_hep or prometheus module — this tool is capped at 10 minutes / 60 samples to keep MCP responses manageable.

Parameters

duration_sec: Total sampling window in seconds. Clamped to 1..600. sample_count: Number of equally-spaced samples. Clamped to 2..60. groups: Statistics group prefixes to capture. Default: core health indicators (core, shmem, tm, sl, usrloc, dialog, net).

Inputs: duration_sec, sample_count, groups. Returns: object

pike_list_blockedA

List IP addresses currently blocked by the Pike anti-flood module.

Inputs: no named parameters. Returns: object

pike_unblock_ipB

Remove an IP address from the Pike block list.

Parameters

ip: The IP address to unblock.

Inputs: ip (required). Returns: object

presence_cleanupA

Force cleanup of expired presence records (watchers + presentities).

Inputs: no named parameters. Returns: object

presence_list_subscriptionsA

List active presence subscriptions (the presence hash table).

Useful for BLF diagnosis: if a watcher's key phone button doesn't update, this table shows whether OpenSIPS sees the subscription.

Inputs: no named parameters. Returns: object

presence_refresh_watchersB

Force a NOTIFY to all watchers of a presence URI.

Parameters

pres_uri: Presentity URI (e.g. sip:alice@example.com). event: Presence event package: presence, dialog, message-summary, call-info, etc. refresh_type: 0 = publish-refresh, 1 = performance-refresh.

Inputs: pres_uri (required), event, refresh_type. Returns: object

pua_list_publicationsB

List active PUA publications (OpenSIPS-as-publishing-UA).

Inputs: no named parameters. Returns: object

pua_publishB

Publish a presence event via PUA.

Parameters

pres_uri: Presentity URI being published. event: Event package (presence, dialog, message-summary, ...). body: Body payload (PIDF, dialog-info XML, etc.). content_type: MIME type of body. expires: TTL in seconds.

Inputs: pres_uri (required), event (required), body (required), content_type, +5 more. Returns: object

ratelimit_resetA

Reset a rate limiting pipe counter to zero.

Parameters

pipe: The name of the pipe to reset.

Inputs: pipe (required). Returns: object

ratelimit_statusA

List all rate limiting pipes and their current counters.

Inputs: no named parameters. Returns: object

registrar_statsA

Retrieve registrar-related statistics.

Returns registration counts, expiry stats, and related counters from the OpenSIPS registrar and usrloc modules.

Inputs: no named parameters. Returns: object

reload_data_tablesA

Run the full chain of OpenSIPS data-table reloads.

Fires the appropriate *_reload MI commands in dependency order. Missing modules (commands the loaded OpenSIPS does not expose) are reported as skipped rather than failed so the orchestrator succeeds on partial deployments.

Parameters

targets: Optional whitelist of module names (e.g. ["dispatcher", "drouting"]) to limit the reload. Default: every reload in the dependency chain. stop_on_error: If True, abort on the first failing reload. Default False — a drouting failure should not prevent a tls cert refresh. delay_ms_between: Small gap between MI calls so OpenSIPS timer processes are not saturated by a burst. Default 100ms.

Inputs: targets, stop_on_error, delay_ms_between. Returns: object

reload_dry_runA

Preview which modules would be reloaded without actually reloading.

Useful when a user is about to press the "reload everything" button and wants to know the blast radius first.

Inputs: no named parameters. Returns: object

reload_singleA

Reload one data table and optionally snapshot stats before/after.

Parameters

module: One of: permissions, domain, dialplan, dispatcher, load_balancer, drouting, carrierroute, lcr, acc, fraud_detection, uac_registrant, call_center, tls_mgm. verify_stats: If True, fetch the module's stats after reload so the caller can visually confirm the new data is live.

Inputs: module (required), verify_stats. Returns: object

rtpengine_enableA

Enable or disable an RTPEngine instance.

Parameters

url: The RTPEngine instance URL (e.g. udp:127.0.0.1:2223). enabled: True to enable, False to disable.

Inputs: url (required), enabled. Returns: object

rtpengine_instance_healthA

Return reachability and load for every configured RTPEngine instance.

rtpengine_show returns the raw list; this tool folds in the disabled/enabled state and the most recent rtpengine: stats so an operator can tell at a glance which instance to shed load from.

Inputs: no named parameters. Returns: object

rtpengine_reloadA

Reload the RTPEngine configuration from the database.

Inputs: no named parameters. Returns: object

rtpengine_sessionsB

List active RTPEngine media sessions.

Inputs: no named parameters. Returns: object

rtpengine_showA

Show all RTPEngine instances and their current status.

Inputs: no named parameters. Returns: object

rtpengine_statsA

Retrieve RTPEngine media proxy statistics.

Inputs: no named parameters. Returns: object

rtpengine_terminate_callA

Tear down the RTPEngine media session for callid.

Forces RTPEngine to delete the media flow. Use when a signalling bug leaves a media session stranded without a dialog — SIP-level dlg_end_dlg alone won't free the RTP ports.

Parameters

callid: Exact SIP Call-ID of the media session to terminate.

Inputs: callid (required). Returns: object

security_audit_configA

Perform a basic security audit on an OpenSIPS configuration snippet.

Checks for common misconfigurations and security anti-patterns.

Parameters

config_content: The OpenSIPS configuration text to analyse.

Returns

dict Contains findings (list of issues) and summary counts.

Inputs: config_content (required). Returns: object

security_generate_ha1A

Generate HA1 and HA1B digest authentication hashes.

These hashes are used in the subscriber table for SIP digest auth.

Parameters

username: The SIP username. domain: The SIP domain. password: The plaintext password to hash.

Returns

dict Contains ha1 (username:realm:password) and ha1b (username@domain:realm:password) hex digests.

Inputs: username (required), domain (required), password (required). Returns: object

sip_generate_sipp_scenarioA

Produce a SIPp XML scenario and the exact shell command to run it.

Does NOT execute SIPp. Generates a scenario the operator can run on a host they control — the MCP process is the wrong place to originate load traffic from.

Parameters

kind: One of options, register, invite_uas_ringing. target: Destination host[:port] for SIPp's -rsa argument. from_user, to_user: SIP user-part values the scenario will parameterize. calls_per_sec, max_concurrent, total_calls: Standard SIPp knobs (-r, -l, -m).

Inputs: kind (required), target (required), from_user, to_user, +3 more. Returns: object

sip_options_pingA

Send SIP OPTIONS probes to target and report response codes / RTT.

Pure Python UDP implementation — no external sipsak / sipp needed. Useful for "can the MCP host even reach this next-hop?" checks.

Parameters

target: host[:port]. Port defaults to 5060. count: Number of probes. Clamped to 1..20. timeout_sec: Per-probe response timeout. Clamped to 0.2..10. from_uri: SIP From URI. Default is a clearly synthetic probe identity so the receiving endpoint can filter it out of real traffic analysis. allow_public: Must be True to target a public IP. Prevents accidental probing of production carriers from a misconfigured MCP.

Inputs: target (required), count, timeout_sec, from_uri, +1 more. Returns: object

sipp_list_scenariosC

List available SIPp scenario files.

Parameters

scenarios_dir: Directory to search for .xml scenario files.

Inputs: scenarios_dir. Returns: result

sipp_load_testA

Run a SIPp load test against a target SIP server.

Parameters

target: Target host:port. cps: Calls per second to generate. duration: Test duration in seconds. scenario: Built-in scenario name (uac, uas) or path to .xml file.

Inputs: target (required), cps, duration, scenario. Returns: object

sipp_run_scenarioA

Run a SIPp XML scenario file against a target SIP server.

Parameters

scenario_file: Path to the .xml SIPp scenario file. target: Target host:port (e.g. 192.168.1.1:5060). options: JSON string of extra CLI flags, e.g. {"-m": "10", "-r": "5"}.

Inputs: scenario_file (required), target (required), options. Returns: object

sl_statsA

Return stateless reply counters (per-code, totals).

Useful for:

  • Auth load (401/407 counts ≈ registration / INVITE auth volume)

  • Scanner detection (4xx spikes without legitimate traffic)

  • OPTIONS keepalive health (200 counts should match incoming OPTIONS)

Inputs: no named parameters. Returns: object

snapshot_captureA

Capture a structured state snapshot of the running OpenSIPS.

Parameters

out_dir: Directory to save the JSON snapshot into. Must live in an allowlisted dir (/tmp, /var/tmp, $HOME, or OPENSIPS_MCP_OUT_DIR_ROOT). label: Optional human-readable tag (before-deploy, baseline, post-incident). Becomes part of the filename. extra_stat_groups: Additional statistics group prefixes to include beyond the defaults. E.g. ["rtpengine:", "stir_shaken:"].

Inputs: out_dir (required), label, extra_stat_groups. Returns: object

snapshot_diffA

Diff two snapshots and surface the deltas.

Computes per-stat deltas (after - before), flags processes that appeared or disappeared, dispatcher / load_balancer state changes, and cluster-node status flips. Unchanged keys are omitted by default.

Parameters

before_path: Path to the baseline snapshot JSON. after_path: Path to the comparison snapshot JSON. show_unchanged: If True, include keys whose values did not change. Default False — diff output stays compact.

Inputs: before_path (required), after_path (required), show_unchanged. Returns: object

snapshot_listA

List snapshots in a directory, newest first.

Useful when you've been taking periodic snapshots and need to find "the one from before yesterday's deploy."

Inputs: out_dir (required). Returns: object

sngrep_captureA

Capture SIP traffic using tcpdump (sngrep-compatible pcap output).

Parameters

interface: Network interface to capture on (default: any). duration: Capture duration in seconds (max 300). filter_expr: BPF filter expression (default: port 5060). output_file: Path to write the pcap file. Must resolve under /tmp or /var/tmp (overridable via OPENSIPS_MCP_CAPTURE_ROOTS).

Inputs: interface, duration, filter_expr, output_file. Returns: object

subscriber_bulk_exportA

Dump subscribers as CSV text.

Parameters

domain: Optional domain filter. include_ha1: When True, include the ha1 digest column. Defaults to False — credential material should not leave the DB by accident. limit: Row cap (default and max: 5000).

Inputs: domain, include_ha1, limit. Returns: object

subscriber_bulk_importA

Import subscribers from a CSV blob with conflict handling.

Expected CSV header: username,domain,password[,email_address][,rpid]. Extra columns are ignored. Blank/comment (#-prefixed) lines are dropped. Caps at 5000 rows per call — split larger imports.

Parameters

csv_content: Full CSV text including header row. dry_run: When True (default), parse and validate but do not write. Use this first so you can review the plan before committing. on_conflict: skip (default) — leave existing (username, domain) alone and report them in skipped. overwrite — update password / attributes on existing rows. error — abort on first collision; nothing is committed.

Inputs: csv_content (required), dry_run, on_conflict. Returns: object

subscriber_createB

Create a new SIP subscriber with auto-generated HA1 hashes.

Inputs: username (required), domain (required), password (required). Returns: object

subscriber_deleteB

Delete a subscriber by ID.

Inputs: id (required). Returns: object

subscriber_getA

Get a single subscriber by username and domain.

Inputs: username (required), domain (required). Returns: object

subscriber_listC

List subscribers, optionally filtered by domain.

Inputs: domain, limit, offset. Returns: object

subscriber_updateC

Update a subscriber's password or attributes.

Inputs: id (required), password, email_address. Returns: object

tls_addC

Add a new TLS domain configuration.

Inputs: domain (required), type, method, verify_cert, +10 more. Returns: object

tls_check_all_expiryA

Bulk certificate expiry scan across ALL configured TLS domains.

Queries all TLS domains from the database, parses each PEM certificate, and returns a summary sorted by urgency (most urgent first):

  • Domain name

  • Expiry date

  • Days until expiry

  • Status: "ok" (>30 days), "warning" (7-30 days), "critical" (<7 days), "expired"

Inputs: no named parameters. Returns: object

tls_check_expiryC

Check certificate expiry for a TLS domain by parsing its PEM certificate.

Inputs: domain (required). Returns: object

tls_connectionsA

List active TLS connections with details.

Retrieves all TCP/TLS connections via the list_tcp_conns MI command, then filters to show only TLS connections. Each entry includes:

  • Source/destination IP:port

  • Connection state

  • Protocol type (TLS vs TCP)

  • Alias info if available

Inputs: no named parameters. Returns: object

tls_deleteB

Remove a TLS domain configuration.

Inputs: domain (required). Returns: object

tls_handshake_errorsA

Focused view of TLS error statistics with severity assessment.

Pulls get_statistics("tls:") and returns ONLY error-related counters with:

  • Error type and count

  • Percentage of total attempts for that error category

  • Severity assessment (ok, elevated, high, critical)

Inputs: no named parameters. Returns: object

tls_listA

List all TLS domain configurations from the database.

Inputs: no named parameters. Returns: object

tls_reloadA

Reload TLS domains in OpenSIPS via MI command.

Inputs: no named parameters. Returns: object

tls_statisticsA

Pull TLS-specific statistics from the tls_mgm module.

Returns counters organised into categories:

  • Handshake stats: connect_success, connect_error, accept_success, accept_error

  • I/O stats: read_error, write_error

Uses the get_statistics("tls:") MI command internally.

Inputs: no named parameters. Returns: object

tls_updateC

Update an existing TLS domain configuration (certificate, key, etc.).

Inputs: domain (required), certificate, private_key, ca_list, +9 more. Returns: object

topology_hiding_listA

List active dialogs with topology hiding engaged.

Shows the mapped keys used to rewrite Via/Contact/Record-Route between ingress and egress legs.

Inputs: no named parameters. Returns: object

trace_controlA

Control SIP tracing — start, stop, or check status.

Parameters

action: One of start, stop, or status. trace_uri: SIP URI for the trace destination (required for start).

Inputs: action (required), trace_uri. Returns: object

trace_start_liveB

Start a live SIP trace with optional filters.

Parameters

filter_caller: Filter traces to a specific caller URI or prefix. filter_callee: Filter traces to a specific callee URI or prefix. filter_ip: Filter traces to a specific source/destination IP address.

Inputs: filter_caller, filter_callee, filter_ip. Returns: object

uac_reg_disableA

Disable a UAC registration by AOR (stops re-registering).

Inputs: aor (required). Returns: object

uac_reg_enableC

Enable a UAC registration by AOR.

Inputs: aor (required). Returns: object

uac_reg_force_registerA

Force an immediate re-registration for an AOR.

Useful after credentials change or when an upstream carrier has invalidated the existing registration.

Inputs: aor (required). Returns: object

uac_reg_listA

List UAC registrations, optionally filtered by AOR or contact.

Shows carrier/trunk registrations OpenSIPS is currently holding. Each row includes state, last registration time, and expiry.

Inputs: aor, contact. Returns: object

uac_reg_reloadA

Reload UAC registrant configuration from the database.

Inputs: no named parameters. Returns: object

ul_add_contactA

Add a contact binding to the user location table.

Parameters

table: The usrloc table (e.g. location). aor: The Address of Record (e.g. alice@example.com). contact: The contact URI to register (e.g. sip:alice@192.168.1.10:5060). expires: Expiration time in seconds (default: 3600). q: Contact priority / q-value (default: 1.0).

Inputs: table (required), aor (required), contact (required), expires, +1 more. Returns: object

ul_dumpA

Dump the entire user location table.

Parameters

brief: If True, return a compact summary instead of full details.

Inputs: brief. Returns: object

ul_remove_contactB

Remove a specific contact binding from the user location table.

Parameters

table: The usrloc table (e.g. location). aor: The Address of Record (e.g. alice@example.com). contact: The contact URI to remove.

Inputs: table (required), aor (required), contact (required). Returns: object

ul_show_contactsA

Show registered contacts for an Address of Record (AOR).

Parameters

aor: The Address of Record (e.g. alice@example.com). table: The usrloc table to query (default: location).

Inputs: aor (required), table. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.8/5.0

    Scored across 236 tools

    Disambiguation2/5

    Several tool clusters have genuinely fuzzy boundaries: sipp_load_test and sipp_run_scenario both execute SIPp scenarios, get_memory_stats vs perf_memory_report vs perf_hotspots all report the same shm/pkg memory data, cc_status already returns queue+agents+flows making cc_list_agents/cc_list_queue redundant, and rtpengine_show overlaps with rtpengine_instance_health. With 236 tools, an agent will frequently be unsure which of several near-duplicates to call.

    Naming Consistency3/5

    The dominant module_verb convention is well followed across most domains (dialplan_add_rule, cluster_drain_node, tls_check_expiry, subscriber_bulk_import). However, there are systematic deviations: a get_* family (get_process_list, get_memory_stats, get_tcp_connections, get_statistics), a gen_* family (gen_test_subscribers, gen_test_dispatcher), and prefix-less outliers like health_check, cleanup_test_data, and sl_stats break the otherwise predictable pattern.

    Tool Count1/5

    236 tools is extreme bloat — over 15x the upper bound of a well-scoped server and 4x the 'too many' threshold. Even though OpenSIPS administration is genuinely broad, this surface would be far more usable split into focused servers (config, routing, media, monitoring, subscriber management).

    Completeness4/5

    Within each subdomain the coverage is unusually deep: dialplan, dispatcher, drouting, subscriber, TLS, fraud, and config lifecycle all have full CRUD or create/get/update/delete/reload chains, plus extras like config migration planning, snapshots, and load-testing harnesses. Minor gaps exist (address has no update, domain lacks update, no direct service start/stop control) but agents can work around them.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      F
      maintenance
      AI-native control plane for Kubernetes and GitOps. Provides 30+ tools for service deployment, database provisioning, and log management via natural language.
      1
      1
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that provides AI agents with seamless access to the NetSapiens VoIP platform for user management, call analytics, and system administration.
      23
      5
      MIT