calls
Inspect calls, reports, events, recordings, and transfers.
speko.calls exposes operational data and live transfer controls for voice calls.
const detail = await speko.calls.get('call_123');
const { events } = await speko.calls.events('call_123');
const recording = await speko.calls.recording('call_123');The call id is the Speko voice session id returned by speko.voice.dial() and surfaced in inbound call metadata and webhooks.
Methods
| Method | Description |
|---|---|
get(callId) | Fetch call detail, transcript, report, and transfer attempts. |
events(callId) | List lifecycle, SIP, and transfer events. |
report(callId) | Fetch the post-call report. |
finalizeReport(callId, params?) | Run or rerun analysis and optionally retry post-call webhook delivery. |
recording(callId) | Return a signed recording URL. |
blindTransfer(callId, params) | Transfer the active SIP participant directly. |
warmTransfer(callId, params) | Start a consultative transfer with optional sequential destinations. |
completeWarmTransfer(callId, transferId, params?) | Bridge the screened recipient into the original room. |
cancelWarmTransfer(callId, transferId, params?) | Cancel a warm transfer, optionally trying the next destination. |
Agent call history
Call listing is scoped through agents:
const page = await speko.agents.listCalls('agent_123', { limit: 25 });
if (page.next_cursor) {
await speko.agents.listCalls('agent_123', { cursor: page.next_cursor });
}Warm transfer
const transfer = await speko.calls.warmTransfer('call_123', {
from: '+12015550199',
destinations: [
{ to: '+12015551234', label: 'Front desk' },
{ to: '+12015554321', label: 'Overflow' },
],
screeningPrompt: 'Confirm the recipient can help before bridging.',
fallback: { strategy: 'take_message' },
voicemailDetection: { mode: 'agent', timeoutSeconds: 10 },
});Warm transfers return the active transfer plus routing_attempts. Cancelling with tryNext: true asks the server to continue with the next destination when one exists.
Reports and webhooks
report(callId) returns the finalized post-call report when available: summary, outcome, structured data, transcript entries, cost breakdown, artifacts, metadata, and scheduled callback context. finalizeReport(callId, { forceAnalysis: true, retryWebhook: true }) reruns analysis and retries delivery of the agent postCall webhook.
Use events(callId) for the durable event stream. It includes Speko, LiveKit, Telnyx, SIP status, failure, and transfer events, which is the closest equivalent to a carrier status timeline.