Node: dial an outbound call

import { TeleQuickClient } from "@telequick/sdk";

const client = new TeleQuickClient(
  "quic://engine.telequick.dev:9090",
  process.env.TELEQUICK_CREDENTIALS!,
);

await client.connect();

await client.dial({{
  to: "sip:+15551234567@example.sip.livekit.cloud",
  trunkId: "default",
  callFrom: "+18005550100",
}});

// Keep the process alive while the call runs.
await new Promise((r) => setTimeout(r, 30_000));
connect() opens the WebTransport session, loads the WASM core, signs the JWT, and sends the initial EventStreamRequest. After this, all RPCs are ready to use.

Browser: arm AI barge-in on an active call

import { TeleQuickClient } from "@telequick/sdk";

// shortLivedJwt comes from your auth backend.
const client = new TeleQuickClient(
  "https://engine.telequick.dev:9090",
  shortLivedJwt,
  /* isBrowserToken */ true,
);

client.onAudioFrame = (pcm) => {{
  // Pass through your AudioWorklet / `decodeAudioData` pipeline.
  audioWorkletPort.postMessage({{ type: "g711", data: pcm }});
}};

client.onCallEvent = (raw) => {{
  // raw is the serde envelope payload of CallEvent. Decode with the WASM
  // helpers if you need structured fields.
  console.log("event", raw.byteLength, "bytes");
}};

await client.connect();
// Arm AI barge-in: when the human starts talking, the gateway gates
// the AI's outbound audio so the human is heard immediately.
await client.barge("call-from-an-existing-session");

Streaming audio out (Node)

import { TeleQuickClient } from "@telequick/sdk";
import {{ readFile }} from "node:fs/promises";

const client = new TeleQuickClient("quic://engine.telequick.dev:9090", credsPath);
await client.connect();

await client.dial({{ to: "sip:+15551234567@…", trunkId: "default" }});

// Read a pre-recorded prompt and send it in 20 ms PCMU chunks.
const buf = await readFile("./prompt.alaw");
const FRAME = 160;  // 20 ms * 8 kHz
let seq = 0;
for (let i = 0; i < buf.length; i += FRAME) {{
  const slice = buf.subarray(i, i + FRAME);
  await client.pushAudio("the-call-sid", slice, "PCMU", seq++, false);
  await new Promise((r) => setTimeout(r, 20));
}}

Hanging up

await client.terminate("the-call-sid");

Hooking disconnect events

DialOptions.onDisconnect gets the CallEvent for CHANNEL_HANGUP_COMPLETE:
await client.dial({{
  to: "sip:…",
  trunkId: "default",
  callSid: "my-stable-sid",
  onDisconnect: (ev) => {{
    console.log("ended:", ev.status, "duration", ev.duration_seconds, "s");
  }},
}});
onDisconnect only fires if callSid was provided — the SDK uses it as the routing key.

Next