Skip to main content
Glama
OpenSIPS

OpenSIPS MCP Server

Official
by OpenSIPS

diagnose_nat_flow

Correlate dialog, contact, RTPEngine, and NAT state to diagnose one-way audio in SIP calls. Consolidates data from four sources into a unified view with a best-effort diagnosis.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callidYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses the tool's behavior: it pulls state from specific sources (dlg_list, ul_show_contact, rtpengine_show, nathelper) and returns a unified view with a diagnosis string. It acknowledges limitations ('a real engineer is still the best judge'), adding transparency. No destructive actions are implied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear purpose statement, numbered list of data sources, and a dedicated parameter section. Every sentence adds value without repetition or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity and the presence of an output schema, the description adequately covers input, data sources, and output type. It explains what the tool returns (unified view + diagnosis) and when to use it, meeting all contextual needs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, but the description adds a detailed meaning for the single parameter 'callid': 'The SIP Call-ID of the problematic dialog.' This provides essential context beyond the schema's title and type.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it correlates dialog, contact, RTPEngine, and NAT state for one call, specifically for one-way audio triage. It distinguishes itself from sibling tools like dlg_list, ul_show_contacts, rtpengine_show, and nathelper_stats by being a composite that consolidates multiple MI calls into one.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly positions the tool as the canonical 'why is this call one-way audio?' triage tool and mentions it consolidates data from four MI calls, indicating when to use it over individual tools. However, it does not explicitly state when not to use it, such as cases not related to NAT or one-way audio.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/OpenSIPS/opensips-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server