gossipper-build — SIP Scenario Authoring
Author valid Gossipper XML scenarios. Pinned to Gossipper 0.1.60-rtcpmuxpatch2
(sipcapture/gossipper on main, audited 2026-05-18).
When to use this skill
- Write a new XML scenario for a specific SIP call flow.
- Modify an existing scenario.
- Port a SIPp scenario to Gossipper.
- Answer "is feature X supported / how do I express Y in Gossipper XML?"
When NOT to use this skill
| Task |
Owner |
| Invoking gossipper, picking transport/rate, deployment |
gossipper-run |
| Interpreting summary JSON / trace CSVs / call records |
gossipper-analyze |
Authoring the 3PCC peer file (CSV name;host:port) |
gossipper-run (deployment artifact) |
Running gossipper pcap2scenario to convert a PCAP |
gossipper-run |
If the user hands you a PCAP and asks for an XML scenario, the right
move is: have gossipper-run invoke pcap2scenario first, then this
skill cleans up the produced XML.
Authoring workflow
- Clarify intent: UAC vs UAS (vs 3PCC). Sequence, expected response
codes, auth requirements, media expectations, branching, retries.
- Check built-ins first. If a
-sn <name> covers the case, no
XML is needed. See the built-ins table below.
- Pick the closest file in
examples/ as a starting point.
- Declare any needed
<Global> and <User> variables up front.
- Write SIP flows inside
<![CDATA[ ... ]]>. Use keywords liberally.
- Add
rtd="name" / start_rtd="name" on the steps that matter for
latency measurement.
- Add
counter="name" on steps that should aggregate into summary JSON.
- Add the top-of-file comment block (see "Output contract" below).
- Validate XML well-formedness (see "Validation").
- Hand off to gossipper-run with: scenario path, optional injection
CSV path, intended role, required runtime vars.
Built-in scenarios (no XML needed)
-sn <name> |
Role |
Behavior |
uac (default) |
client |
INVITE → 200 → ACK → BYE |
uas |
server |
UAS answering INVITE → 180 → 200, BYE handler |
management |
server |
UAS with HTTP API + hot-reload |
invite_media |
client |
INVITE with RTP media |
invite_media_early |
client |
Early media via 183 + SDP |
invite_media_early_180 |
client |
Early media variant signaled with 180 |
Built-ins are hard-coded — they cannot be PUT via /api/v1/scenario.
To override the shape, write a custom XML.
File skeleton
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Scenario: <name>
Role: <UAC | UAS | 3PCC-master | 3PCC-slave>
Intent: <one-paragraph description of what this scenario tests>
Partial-support features used: <list, or "none">
Required runtime vars: <list, or "none">
-->
<scenario name="descriptive-name">
<Global variables="g1,g2"/>
<User variables="u1,u2"/>
<init>
<!-- pre-call setup if needed -->
</init>
<send retrans="500"><![CDATA[
INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
...
Content-Length: [len]
]]></send>
<recv response="100" optional="true"/>
<recv response="180" optional="true"/>
<recv response="200" rtd="invite"/>
<!-- ... -->
<timewait milliseconds="4000"/>
</scenario>
Top-level commands
| Command |
Purpose |
<send> |
Emit a SIP message. UDP retrans via retrans="<ms>". |
<recv> |
Expect a SIP message. request="METHOD" OR response="N". |
<pause> |
Wait. milliseconds="N", optional distribution. |
<nop> |
No-op container for actions / branching. |
<label> |
Jump target. id="name". |
<timewait> |
Post-call linger. |
<sendCmd> / <recvCmd> |
3PCC peer coordination. |
<init> |
Pre-call setup block. |
Full attribute reference (timers, counters, branching, auth=true,
rrs=true, etc.) and the action catalog →
references/xml-reference.md.
Always-remember gotchas
These bite on first authoring. Burn them in.
- Every SIP body lives in
<![CDATA[ ... ]]>. Bare <, >, &
in SDP otherwise break XML parsing.
- Every message with a body needs
Content-Length: [len]. Missing
it doesn't fail loudly — peers parse oddly.
retrans="<ms>" is UDP-only. Silently ignored on TCP/TLS.
- Line endings: author with
\n. Gossipper inserts \r\n on the
wire.
[tdmmap] is a stub — always renders 0.0.0/0. Don't use it.
setdest works only on u1 / ui / server-UDP. Don't author
dynamic destination switching for TCP/TLS scenarios — split into
multiple scenarios instead.
-t s1 / sn are UDP aliases, not TLS despite the "s" prefix.
TLS server modes are l1 / sl. Affects what the scenario can
rely on at runtime.
Full partial-support inventory (lookup, exec command, rtpcheck,
sample, insert, replace, video/image PCAP forwarding) →
references/xml-reference.md.
Going deeper
Read these on demand:
references/xml-reference.md — full commands and attributes,
full action catalog with support status, full keyword/template
vocabulary, variable scopes, transport mode authoring constraints,
comprehensive gotchas.
references/patterns.md — specialized authoring patterns:
- Auth: UAC handling 401/407, UAS validating digest via
verifyauth, TLS mutual auth (runtime-controlled).
- 3PCC: master entry, slave entry, init-block coordination,
Call-ID adoption rules.
- Media/RTP: codec table, stream sources, DTMF, recording,
SRTP/ICE caveats.
Canonical examples (start by copying one)
| Intent |
Example file |
| Vanilla UAC: INVITE → 200 → ACK → BYE |
examples/uac_basic.xml |
| REGISTER with digest 401/407 challenge |
examples/uac_register_with_auth.xml |
| Simple UAS answering INVITE → BYE |
examples/uas_basic.xml |
| UAC with RTP audio stream attached |
examples/uac_invite_with_media.xml |
| 3PCC master entry pattern |
examples/3pcc_master.xml |
3PCC slave entry (first step recvCmd) |
examples/3pcc_slave.xml |
These are educational reference scenarios. The authoritative example
corpus lives in gossipper's testdata/scenarios/ directory at the
pinned version — point users there when they want every variant.
Validation
Required before handing off: XML must be well-formed.
python3 -c "import xml.etree.ElementTree as ET; ET.parse('scenario.xml'); print('OK')"
This catches CDATA misuse, attribute typos, unclosed tags. It does
NOT validate Gossipper-specific semantics (e.g., that setdest is
only used in compatible transport modes) — those failures surface at
runtime with classification scenario_error.
Optional (gossipper-run's job): loopback smoke run.
gossipper -sf scenario.xml -sn uas on the same host validates that
the scenario parses through gossipper's stricter XML loader.
Output contract
Every scenario produced by this skill includes:
- Top-of-file XML comment with: name, role, one-paragraph intent,
list of partial-support features used (or "none"), required runtime
vars (or "none").
- Explicit
Content-Length: [len] on every message with a body.
- CDATA-wrapped SIP message bodies.
- No
[tdmmap] and no setdest outside u1 / ui / server-UDP.
- Well-formed XML — passes the validation command above.
Handoff to gossipper-run
When done, hand over:
| Item |
Why run needs it |
| Scenario file path(s) |
-sf flag |
| Companion injection CSV path(s), if any |
-inf flag |
| Intended role (UAC / UAS / 3PCC-master / 3PCC-slave) |
Picks transport mode, bind, peer file |
| Required template vars |
Maps to -s / -au / -ap / -sip_from / etc. |
| Partial-support features used |
Run-skill may warn or adjust flags |
1---2name: gossipper-build3description: Write or modify Gossipper XML scenarios for SIP load testing. Use whenever the user wants to create, edit, port, or convert SIP scenarios for the sipcapture/gossipper load generator — UAC/UAS flows, REGISTER with digest auth, 3PCC master/slave coordination, scenarios with RTP media, or porting SIPp XML to Gossipper. Also use for questions about Gossipper XML syntax, supported actions/keywords, or SIPp compatibility status of a feature.4---56# gossipper-build — SIP Scenario Authoring78Author valid Gossipper XML scenarios. Pinned to **Gossipper 0.1.60-rtcpmuxpatch2**9(sipcapture/gossipper on `main`, audited 2026-05-18).1011## When to use this skill1213- Write a new XML scenario for a specific SIP call flow.14- Modify an existing scenario.15- Port a SIPp scenario to Gossipper.16- Answer "is feature X supported / how do I express Y in Gossipper XML?"1718## When NOT to use this skill1920| Task | Owner |21|---|---|22| Invoking gossipper, picking transport/rate, deployment | gossipper-run |23| Interpreting summary JSON / trace CSVs / call records | gossipper-analyze |24| Authoring the 3PCC peer file (CSV `name;host:port`) | gossipper-run (deployment artifact) |25| Running `gossipper pcap2scenario` to convert a PCAP | gossipper-run |2627If the user hands you a PCAP and asks for an XML scenario, the right28move is: have gossipper-run invoke `pcap2scenario` first, then this29skill cleans up the produced XML.3031## Authoring workflow32331. Clarify intent: UAC vs UAS (vs 3PCC). Sequence, expected response34 codes, auth requirements, media expectations, branching, retries.352. **Check built-ins first.** If a `-sn <name>` covers the case, no36 XML is needed. See the built-ins table below.373. Pick the closest file in `examples/` as a starting point.384. Declare any needed `<Global>` and `<User>` variables up front.395. Write SIP flows inside `<![CDATA[ ... ]]>`. Use keywords liberally.406. Add `rtd="name"` / `start_rtd="name"` on the steps that matter for41 latency measurement.427. Add `counter="name"` on steps that should aggregate into summary JSON.438. Add the top-of-file comment block (see "Output contract" below).449. Validate XML well-formedness (see "Validation").4510. Hand off to gossipper-run with: scenario path, optional injection46 CSV path, intended role, required runtime vars.4748## Built-in scenarios (no XML needed)4950| `-sn <name>` | Role | Behavior |51|---|---|---|52| `uac` (default) | client | INVITE → 200 → ACK → BYE |53| `uas` | server | UAS answering INVITE → 180 → 200, BYE handler |54| `management` | server | UAS with HTTP API + hot-reload |55| `invite_media` | client | INVITE with RTP media |56| `invite_media_early` | client | Early media via 183 + SDP |57| `invite_media_early_180` | client | Early media variant signaled with 180 |5859Built-ins are hard-coded — they cannot be PUT via `/api/v1/scenario`.60To override the shape, write a custom XML.6162## File skeleton6364```xml65<?xml version="1.0" encoding="UTF-8" ?>66<!--67 Scenario: <name>68 Role: <UAC | UAS | 3PCC-master | 3PCC-slave>69 Intent: <one-paragraph description of what this scenario tests>70 Partial-support features used: <list, or "none">71 Required runtime vars: <list, or "none">72-->73<scenario name="descriptive-name">74 <Global variables="g1,g2"/>75 <User variables="u1,u2"/>7677 <init>78 <!-- pre-call setup if needed -->79 </init>8081 <send retrans="500"><![CDATA[82 INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.083 Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]84 ...85 Content-Length: [len]8687 ]]></send>8889 <recv response="100" optional="true"/>90 <recv response="180" optional="true"/>91 <recv response="200" rtd="invite"/>9293 <!-- ... -->9495 <timewait milliseconds="4000"/>96</scenario>97```9899## Top-level commands100101| Command | Purpose |102|---|---|103| `<send>` | Emit a SIP message. UDP retrans via `retrans="<ms>"`. |104| `<recv>` | Expect a SIP message. `request="METHOD"` OR `response="N"`. |105| `<pause>` | Wait. `milliseconds="N"`, optional distribution. |106| `<nop>` | No-op container for actions / branching. |107| `<label>` | Jump target. `id="name"`. |108| `<timewait>` | Post-call linger. |109| `<sendCmd>` / `<recvCmd>` | 3PCC peer coordination. |110| `<init>` | Pre-call setup block. |111112Full attribute reference (timers, counters, branching, `auth=true`,113`rrs=true`, etc.) and the action catalog →114`references/xml-reference.md`.115116## Always-remember gotchas117118These bite on first authoring. Burn them in.1191201. **Every SIP body lives in `<![CDATA[ ... ]]>`.** Bare `<`, `>`, `&`121 in SDP otherwise break XML parsing.1222. **Every message with a body needs `Content-Length: [len]`.** Missing123 it doesn't fail loudly — peers parse oddly.1243. **`retrans="<ms>"` is UDP-only.** Silently ignored on TCP/TLS.1254. **Line endings: author with `\n`.** Gossipper inserts `\r\n` on the126 wire.1275. **`[tdmmap]` is a stub** — always renders `0.0.0/0`. Don't use it.1286. **`setdest` works only on `u1` / `ui` / server-UDP.** Don't author129 dynamic destination switching for TCP/TLS scenarios — split into130 multiple scenarios instead.1317. **`-t s1` / `sn` are UDP aliases, not TLS** despite the "s" prefix.132 TLS server modes are `l1` / `sl`. Affects what the scenario can133 rely on at runtime.134135Full partial-support inventory (`lookup`, `exec command`, `rtpcheck`,136`sample`, `insert`, `replace`, video/image PCAP forwarding) →137`references/xml-reference.md`.138139## Going deeper140141Read these on demand:142143- **`references/xml-reference.md`** — full commands and attributes,144 full action catalog with support status, full keyword/template145 vocabulary, variable scopes, transport mode authoring constraints,146 comprehensive gotchas.147- **`references/patterns.md`** — specialized authoring patterns:148 - Auth: UAC handling 401/407, UAS validating digest via149 `verifyauth`, TLS mutual auth (runtime-controlled).150 - 3PCC: master entry, slave entry, init-block coordination,151 Call-ID adoption rules.152 - Media/RTP: codec table, stream sources, DTMF, recording,153 SRTP/ICE caveats.154155## Canonical examples (start by copying one)156157| Intent | Example file |158|---|---|159| Vanilla UAC: INVITE → 200 → ACK → BYE | `examples/uac_basic.xml` |160| REGISTER with digest 401/407 challenge | `examples/uac_register_with_auth.xml` |161| Simple UAS answering INVITE → BYE | `examples/uas_basic.xml` |162| UAC with RTP audio stream attached | `examples/uac_invite_with_media.xml` |163| 3PCC master entry pattern | `examples/3pcc_master.xml` |164| 3PCC slave entry (first step `recvCmd`) | `examples/3pcc_slave.xml` |165166These are educational reference scenarios. The authoritative example167corpus lives in gossipper's `testdata/scenarios/` directory at the168pinned version — point users there when they want every variant.169170## Validation171172Required before handing off: XML must be well-formed.173174```bash175python3 -c "import xml.etree.ElementTree as ET; ET.parse('scenario.xml'); print('OK')"176```177178This catches CDATA misuse, attribute typos, unclosed tags. It does179NOT validate Gossipper-specific semantics (e.g., that `setdest` is180only used in compatible transport modes) — those failures surface at181runtime with classification `scenario_error`.182183Optional (gossipper-run's job): loopback smoke run.184`gossipper -sf scenario.xml -sn uas` on the same host validates that185the scenario parses through gossipper's stricter XML loader.186187## Output contract188189Every scenario produced by this skill includes:1901911. **Top-of-file XML comment** with: name, role, one-paragraph intent,192 list of partial-support features used (or "none"), required runtime193 vars (or "none").1942. **Explicit `Content-Length: [len]`** on every message with a body.1953. **CDATA-wrapped** SIP message bodies.1964. **No `[tdmmap]` and no `setdest` outside `u1` / `ui` / server-UDP.**1975. **Well-formed XML** — passes the validation command above.198199## Handoff to gossipper-run200201When done, hand over:202203| Item | Why run needs it |204|---|---|205| Scenario file path(s) | `-sf` flag |206| Companion injection CSV path(s), if any | `-inf` flag |207| Intended role (UAC / UAS / 3PCC-master / 3PCC-slave) | Picks transport mode, bind, peer file |208| Required template vars | Maps to `-s` / `-au` / `-ap` / `-sip_from` / etc. |209| Partial-support features used | Run-skill may warn or adjust flags |