Sign inSign up

iperfex/ivoicetracex

By iperfex

•Updated about 2 months ago

Passive SIP/RTP forensic capture + WebRTC softphone in one static binary, drivable by AI (MCP)

Image
0

65

iperfex/ivoicetracex repository overview

⁠iVoiceTraceX

A SIP forensic analyzer with a softphone inside it, in a single binary — built for people and for AI agents alike.

The capture is the point: it reads the network passively and shows the SIP dialogs, the RTP and the audio in the browser. It never touches the call, and nothing has to be installed on the PBX.

The phone is there so the call under audit can be your own: the same server is a media gateway between WebRTC (browser) and SIP/RTP (PBX), so you talk and you audit on the same screen and neither one interrupts the other.

Everything the panel does is also exposed to AI agents — Claude, OpenAI, anything that speaks MCP — over the -mcp socket, and to an agent running inside the page over WebMCP. One catalogue, one contract.

Browser (microphone/headset)
    ↕  WebRTC (Opus/RTP over ICE)
iVoiceTraceX  [this image]
    ↕  SIP/RTP
PBX / SIP server

⁠Quick start

A softphone gateway uses SIP/RTP over UDP with high ports announced in the SDP, so host networking is the right answer in almost every case.

docker run -d --name ivoicetracex \
  --network host \
  --user 0 --cap-drop ALL --cap-add NET_RAW \
  -v ivoicetracex-spool:/var/tmp/ivoicetracex \
  iperfex/ivoicetracex:latest \
  -sip-host 192.168.1.100 -sip-user 1001 -sip-pass secret -web :8443 -tls

Then open https://<host-ip>:8443 and accept the self-signed certificate. Wait for the Registered indicator, dial, and use the SIP Trace button to audit the signaling and media of the call in course.

HTTPS is not optional if you connect from another machine: browsers only grant microphone access on a secure origin. On localhost plain HTTP works.

⁠With environment variables instead of flags
docker run -d --network host --user 0 --cap-drop ALL --cap-add NET_RAW \
  --env-file .env iperfex/ivoicetracex:latest

Generate that .env once with the binary itself (ivoicetracex -sip-host … -env) or write it by hand — see the key list below.

⁠docker compose
name: ivoicetracex

services:
  ivoicetracex:
    image: iperfex/ivoicetracex:latest
    container_name: ivoicetracex
    restart: unless-stopped
    network_mode: host
    cap_add:
      - NET_RAW
    user: "0"            # required — see the warning below
    env_file:
      - .env
    volumes:
      - ivoicetracex-spool:/var/tmp/ivoicetracex

volumes:
  ivoicetracex-spool:

⁠⚠ The capture needs uid 0, not just --cap-add NET_RAW

If the trace is empty inside Docker while the softphone works fine, this is why. Running as a non-root user with --cap-add NET_RAW is not enough. Docker puts the capability in the container's bounding set, but a non-root process only gets it in its effective set through file capabilities on the binary or ambient capabilities from the runtime — and Docker sets neither. The daemon registers, places calls and serves the panel perfectly; the capture is off, with a single SIP capture disabled warning at startup that nobody reads twice.

The base image is distroless/static-debian12:nonroot (uid 65532), so run it with --user 0 and NET_RAW as the only capability — a smaller privilege in practice than the whole default capability set:

--user 0 --cap-drop ALL --cap-add NET_RAW

Verified both ways: as uid 65532 with NET_RAW the daemon logs SIP capture disabled; as uid 0 with NET_RAW and everything else dropped, it logs SIP trace capture running.


⁠Image contents

Basegcr.io/distroless/static-debian12:nonroot — no shell, no package manager, no libc
Executable/ivoicetracex — a single static file, hardened, with the web panel built into it
Entrypoint/ivoicetracex — flags go straight after the image name
Exposed8080/tcp, 8443/tcp (the panel). SIP/RTP use UDP and host networking
Volume/var/tmp/ivoicetracex — the RTP spool
Platformlinux/amd64

System dependencies: none. Audio is forwarded in pass-through — the raw RTP payload travels end to end without transcoding — so no codec library is linked. The web panel ships inside the executable, the TLS certificate is generated in memory, and the capture reads straight from a raw packet socket. There is nothing to install, nothing to mount and nothing to configure on the PBX.

There is also a scratch variant of this image with no distribution underneath at all — just the binary, the CA bundle and the timezone database.

⁠Volume: why you want it

/var/tmp/ivoicetracex is the RTP spool. RTP goes to disk by default so each call is kept whole no matter how long it lasts (the bound becomes free disk space instead of RAM). Without a volume the spool dies with the container and the captured audio of past calls goes with it.

⁠Timezone

The image ships tzdata; set TZ or every timestamp is reported in UTC — which is not a crash, it is worse: a trace whose times do not line up with the PBX log you are reading it against.

-e TZ=America/Argentina/Buenos_Aires

⁠Configuration

Only -sip-host, -sip-user and -sip-pass are required; everything else is optional. Precedence: CLI flags > .env next to the binary > environment variables > defaults.

Every flag has an environment-variable equivalent, so the table below reads both ways. The live, authoritative list is docker run --rm iperfex/ivoicetracex:latest -h.

FlagEnv varDefaultSummary
-sip-hostSIP_HOST(required)SIP server, host or host:port
-sip-userSIP_USER(required)SIP extension / username
-sip-passSIP_PASS(required)SIP password
-sip-transportSIP_TRANSPORTudpudp · tcp · tls · ws
-sip-domainSIP_DOMAIN= -sip-hostSIP domain for the sip:user@domain URI
-codecCODEC(auto-detect)Pass-through codec: opus · pcmu · pcma
-media-encryptionMEDIA_ENCRYPTIONautoauto · none · sdes · dtls
-vm-codeVM_CODE*97Voicemail dial code behind the MWI banner
-webWEB_ADDR:8080Web panel listen address
-tlsTLSfalseHTTPS with an in-memory self-signed certificate
-tls-cert / -tls-keyTLS_CERT / TLS_KEY(empty)Existing PEM certificate/key
-web-tokenWEB_TOKEN(empty)Protect the panel with a UUID token (auto generates one)
-web-rate / -web-burstWEB_RATE / WEB_BURST5 / 30Per-source abuse brake on /ws
-stunSTUN(embedded)Remote STUN; empty = embedded local STUN
-turn / -turn-user / -turn-passTURN / TURN_USER / TURN_PASS(empty)Additive TURN relay
-trace-ifaceTRACE_IFACE(all)Interface to capture
-trace-mineTRACE_MINEtrueCapture only this softphone's own dialogs
-trace-limitTRACE_LIMIT30000Max dialogs kept; oldest rotated out
-trace-spoolTRACE_SPOOL/var/tmp/ivoicetracexRTP on disk; memory keeps it in RAM
-trace-purge-everyTRACE_PURGE_EVERY0 (off)Wipe the whole capture on a timer (e.g. 24h)
-mcpMCPfalseExpose the local MCP control socket + headless audio
-debugDEBUGfalseForeground with live logs

Full reference with a worked example per flag — all 42 of them: Startup options⁠.

The daemon normally detaches into the background, but it detects PID 1 and stays in the foreground inside a container on its own — no -debug needed for the container not to exit at startup.


⁠Features

Telephony

  • SIP registration (REGISTER) with retry and periodic re-registration
  • Outgoing (INVITE) and incoming calls (manual answer or auto-answer)
  • Outgoing DTMF (RFC 4733) to navigate IVRs
  • Audio pass-through without transcoding: Opus, PCMU (ulaw), PCMA (alaw)
  • Automatic codec detection (self-call probe) + WebRTC renegotiation
  • MWI / voicemail banner (NOTIFY message-summary)
  • Mute, real hold (re-INVITE, so the PBX plays MoH), DTMF keypad, auto-answer
  • Keyboard shortcuts, synthesized ringtone, desktop notification
  • A call survives a browser F5 (it lives in the backend)
  • Interface in English, Spanish and Portuguese, switchable in place

SIP analysis — capture options⁠

  • Part of the core: one passive capture (SIP + RTP) always running, no flag to turn it on
  • In the browser, without interrupting the call in course: SVG ladder, filters, forensic report
  • Self-contained capture: no capture agent, no kernel module, nothing on the PBX
  • Captured RTP audio playable from the browser; export to pcap / txt / WAV
  • Content analysis (level, real silence, longest gap, clipping, in-band DTMF) decoding G.711 and Opus server-side — it catches one-way audio in streams whose loss/jitter/MOS look perfect
  • One dialog, one life: signaling, streams, metrics and audio are discarded together

AI control (MCP / WebMCP) — MCP server⁠

  • MCP server (-mcp): an AI host drives the softphone and the trace over a local Unix socket
  • WebMCP: the same catalog for an agent inside the already-authenticated tab
  • Headless audio: the AI talks (injects .wav/.opus) and listens (records both directions to WAV) on a real call, with no browser attached
  • 30 tools: call control, state and events, the full SIP trace, captured audio

Media / WebRTC / NAT

  • WebRTC ↔ SIP/RTP media gateway
  • Built-in local STUN server (default), optional remote STUN and additive TURN

Both legs must speak the same codec — there is no transcoding. The softphone auto-detects the extension's codec at startup and aligns the browser to it.


⁠Documentation

Full documentation — https://www.iperfex.com/productos/ivoicetracex/docs/⁠ (available in Spanish, English and Portuguese: add ?lang=en or ?lang=pt).

SectionLink
Product pagehttps://www.iperfex.com/productos/ivoicetracex/⁠
Quickstart — three steps#quickstart⁠
Your first capture#first-capture⁠
Startup options (42 flags)#flags⁠
Docker#docker⁠
Environment variables#docker-env⁠
docker-compose#docker-compose⁠
Access & security#security⁠
Retention#retention⁠
MCP server#mcp⁠
Claude Code / Claude Desktop / OpenAI#mcp-claude-code⁠ · #mcp-claude-desktop⁠ · #mcp-openai⁠
WebMCP#webmcp⁠
Tool catalog#tools⁠
Troubleshooting#troubleshooting⁠
Downloads (binaries)https://www.iperfex.com/productos/ivoicetracex/descargar⁠
Contacthttps://www.iperfex.com/contacto⁠ · [email protected]⁠

⁠Usage responsibility

This tool performs passive network capture and records call audio. You must have the right to capture the traffic you point it at and comply with the recording, interception and data-protection laws that apply to you; many jurisdictions require the parties' consent.

Tag summary

Content type

Image

Digest

sha256:bd4aaf054…

Size

15.7 MB

Last updated

about 2 months ago

docker pull iperfex/ivoicetracex