startInputTimers

View as MarkdownOpen in Claude

Manually start the initial_timeout timer on the active collect operation. Useful when startInputTimers was set to false during the initial call.

Returns

Promise<Record<string, unknown>> — Server acknowledgment.

Example

import { RelayClient } from '@signalwire/sdk';
const client = new RelayClient({
project: process.env.SIGNALWIRE_PROJECT_ID!,
token: process.env.SIGNALWIRE_API_TOKEN!,
contexts: ['default']
});
client.onCall(async (call) => {
await call.answer();
const action = await call.collect({
speech: { end_silence_timeout: 2.0 },
initialTimeout: 10.0,
startInputTimers: false,
});
// Start timers when ready
await action.startInputTimers();
const event = await action.wait();
});
await client.run();