Voice — outbound originate
var v = new Voice("https://app.clutchcall.dev", apiKey, "org_abc");
var call = v.calls().originate(new Voice.OriginateArgs()
.to("+15551234567")
.from("+15558675309")
.trunkId("trunk_main")
.agent("healthcare-assistant"));
System.out.println("call sid: " + call.sid());
Streams — record-to-disk viewer
try (var out = Files.newOutputStream(Path.of("recording.mp4"));
var viewer = Streams.BroadcastViewer.open(signedUrl,
(init, chunk) -> out.write(chunk),
reason -> {})) { }
Robotics — telemetry publisher
var r = new Robotics("relay.clutchcall.dev", token, "tb-7");
var qos = new Robotics.QoSProfile()
.reliability(Robotics.Reliability.RELIABLE)
.depth(10);
try (var pub = r.publishTelemetry("odom", "nav_msgs/msg/Odometry", qos)) {
while (running) {
pub.write(serializeOdom());
Thread.sleep(100);
}
}
Games — authoritative server
var g = new Games("relay.clutchcall.dev", token, "duel-42", null);
var state = g.publishState(new Games.StateOpts().tickHz(30));
g.subscribeInputs((pid, p) -> world.apply(pid, p));
var exec = Executors.newSingleThreadScheduledExecutor();
exec.scheduleAtFixedRate(() -> state.write(world.snapshot()),
0, 33, TimeUnit.MILLISECONDS);
Data — MQTT-style subscribe
var d = new Data("relay.clutchcall.dev", token, "ingest");
try (var sub = d.subscribe("sensors/+/temperature",
msg -> System.out.println(
msg.topic() + " ← " + msg.fromClientId() + " = "
+ new String(msg.payload())))) {
// sub is AutoCloseable
}

