Passive SIP/RTP forensic capture + WebRTC softphone in one static binary, drivable by AI (MCP)
65
A SIP forensic analyzer with a softphone inside it, in a single binary — built for people and for AI agents alike.
iperfex/ivoicetracex:latest — linux/amd64, distroless, ~16.5 MB compressedThe 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
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
localhostplain HTTP works.
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.
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:
--cap-add NET_RAWIf 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.
| Base | gcr.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 |
| Exposed | 8080/tcp, 8443/tcp (the panel). SIP/RTP use UDP and host networking |
| Volume | /var/tmp/ivoicetracex — the RTP spool |
| Platform | linux/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.
/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.
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
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.
| Flag | Env var | Default | Summary |
|---|---|---|---|
-sip-host | SIP_HOST | (required) | SIP server, host or host:port |
-sip-user | SIP_USER | (required) | SIP extension / username |
-sip-pass | SIP_PASS | (required) | SIP password |
-sip-transport | SIP_TRANSPORT | udp | udp · tcp · tls · ws |
-sip-domain | SIP_DOMAIN | = -sip-host | SIP domain for the sip:user@domain URI |
-codec | CODEC | (auto-detect) | Pass-through codec: opus · pcmu · pcma |
-media-encryption | MEDIA_ENCRYPTION | auto | auto · none · sdes · dtls |
-vm-code | VM_CODE | *97 | Voicemail dial code behind the MWI banner |
-web | WEB_ADDR | :8080 | Web panel listen address |
-tls | TLS | false | HTTPS with an in-memory self-signed certificate |
-tls-cert / -tls-key | TLS_CERT / TLS_KEY | (empty) | Existing PEM certificate/key |
-web-token | WEB_TOKEN | (empty) | Protect the panel with a UUID token (auto generates one) |
-web-rate / -web-burst | WEB_RATE / WEB_BURST | 5 / 30 | Per-source abuse brake on /ws |
-stun | STUN | (embedded) | Remote STUN; empty = embedded local STUN |
-turn / -turn-user / -turn-pass | TURN / TURN_USER / TURN_PASS | (empty) | Additive TURN relay |
-trace-iface | TRACE_IFACE | (all) | Interface to capture |
-trace-mine | TRACE_MINE | true | Capture only this softphone's own dialogs |
-trace-limit | TRACE_LIMIT | 30000 | Max dialogs kept; oldest rotated out |
-trace-spool | TRACE_SPOOL | /var/tmp/ivoicetracex | RTP on disk; memory keeps it in RAM |
-trace-purge-every | TRACE_PURGE_EVERY | 0 (off) | Wipe the whole capture on a timer (e.g. 24h) |
-mcp | MCP | false | Expose the local MCP control socket + headless audio |
-debug | DEBUG | false | Foreground 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
-debugneeded for the container not to exit at startup.
Telephony
SIP analysis — capture options
AI control (MCP / WebMCP) — MCP server
-mcp): an AI host drives the softphone and the trace over a local Unix socket.wav/.opus) and listens (records both
directions to WAV) on a real call, with no browser attachedMedia / WebRTC / NAT
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.
Full documentation — https://www.iperfex.com/productos/ivoicetracex/docs/
(available in Spanish, English and Portuguese: add ?lang=en or ?lang=pt).
| Section | Link |
|---|---|
| Product page | https://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 |
| Contact | https://www.iperfex.com/contacto · [email protected] |
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.
Content type
Image
Digest
sha256:bd4aaf054…
Size
15.7 MB
Last updated
about 2 months ago
docker pull iperfex/ivoicetracex