SIP trace anonymizer
sip_trace_anonymizeRewrites a SIP trace (messages, log lines, sngrep or ngrep output) so it can be shared: IPv4 and IPv6 addresses become documentation addresses (RFC 5737, RFC 3849; private ones keep a separate range), telephone numbers, SIP user parts, display names and host names become placeholders, and Call-ID, tags, Via branches (keeping the z9hG4bK magic cookie), urn:uuid values and digest auth parameters (username, realm, nonce, cnonce, response, opaque) are replaced. The same original value always gets the same replacement, so the call flow still reads correctly. Loopback, unspecified and broadcast addresses are kept. Unlike the browser tool on telcobench.com, this anonymization runs on the server: the trace is sent to the API, processed in memory and not stored. To keep a trace on your machine, use the browser tool.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"trace": "INVITE sip:bob@biloxi.example.com SIP/2.0\nVia: SIP/2.0/UDP pc33.atlanta.example.com;branch=z9hG4bK776asdhds\nMax-Forwards: 70\nFrom: Alice <sip:alice@atlanta.example.com>;tag=1928301774\nTo: Bob <sip:bob@biloxi.example.com>\nCall-ID: a84b4c76e66710@pc33.atlanta.example.com\nCSeq: 314159 INVITE\nContact: <sip:alice@pc33.atlanta.example.com>\nContent-Type: application/sdp\nContent-Length: 213\n\nv=0\no=alice 2890844526 2890844526 IN IP4 192.168.1.10\ns=-\nc=IN IP4 192.168.1.10\nt=0 0\nm=audio 49170 RTP/AVP 0 8 101\na=rtpmap:0 PCMU/8000\na=rtpmap:8 PCMA/8000\na=rtpmap:101 telephone-event/8000\na=sendrecv\n\nSIP/2.0 100 Trying\nVia: SIP/2.0/UDP pc33.atlanta.example.com;branch=z9hG4bK776asdhds;received=203.0.113.9\nFrom: Alice <sip:alice@atlanta.example.com>;tag=1928301774\nTo: Bob <sip:bob@biloxi.example.com>\nCall-ID: a84b4c76e66710@pc33.atlanta.example.com\nCSeq: 314159 INVITE\nContent-Length: 0\n\nSIP/2.0 180 Ringing\nVia: SIP/2.0/UDP pc33.atlanta.example.com;branch=z9hG4bK776asdhds;received=203.0.113.9\nFrom: Alice <sip:alice@atlanta.example.com>;tag=1928301774\nTo: Bob <sip:bob@biloxi.example.com>;tag=a6c85cf\nCall-ID: a84b4c76e66710@pc33.atlanta.example.com\nCSeq: 314159 INVITE\nContact: <sip:bob@198.51.100.20>\nContent-Length: 0\n\nSIP/2.0 200 OK\nVia: SIP/2.0/UDP pc33.atlanta.example.com;branch=z9hG4bK776asdhds;received=203.0.113.9\nFrom: Alice <sip:alice@atlanta.example.com>;tag=1928301774\nTo: Bob <sip:bob@biloxi.example.com>;tag=a6c85cf\nCall-ID: a84b4c76e66710@pc33.atlanta.example.com\nCSeq: 314159 INVITE\nContact: <sip:bob@198.51.100.20>\nContent-Type: application/sdp\nContent-Length: 188\n\nv=0\no=bob 2808844564 2808844564 IN IP4 198.51.100.20\ns=-\nc=IN IP4 198.51.100.20\nt=0 0\nm=audio 3456 RTP/AVP 8 101\na=rtpmap:8 PCMA/8000\na=rtpmap:101 telephone-event/8000\na=sendrecv\n"
},
"name": "sip_trace_anonymize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace | Yes | The SIP trace to anonymize. |