Minimize a SIP trace
minimize_sip_trace[cost: free (pure CPU, no network) | read-only, no persistence]
Reduce a raw SIP trace to a compact form suitable for sending to an LLM. Preserves SDP bodies and routing/auth/dialog headers; prunes well-known noise (User-Agent, Server, Allow, Accept-, Date, P- informational, etc.).
Expected input format: raw SIP messages separated by blank lines, each starting with a request line (INVITE sip:...@... SIP/2.0) or status line (SIP/2.0 200 OK). PCAP-decoded text from sngrep / ngrep / tcpdump / tshark, syslog with SIP body, sipflow's own export format, or a hand-pasted INVITE/200 dialog all work. Annotation lines like # [timestamp] sender -> receiver or ngrep-style U <ip>:<port> -> <ip>:<port> between blocks are tolerated.
Safe to run on production traces - the input is processed in-memory and is not persisted or sent off-server.
Pair with: detect_sip_stack to identify the vendor, then search_sip_docs(vendor=...) for vendor-grounded analysis; render_sip_ladder to visualize the trace as a Mermaid call-flow ladder; lint_sip_request / parse_sip_message to mechanically validate any single message in the trace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Raw SIP trace text. Multiple messages may be concatenated. | |
| maxBytes | No | Truncate the minimized output if it exceeds this many bytes (default 200000, matches Sipflow's analyze pipeline). |