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

1import { RelayClient } from '@signalwire/sdk';
2
3const client = new RelayClient({
4 project: process.env.SIGNALWIRE_PROJECT_ID!,
5 token: process.env.SIGNALWIRE_TOKEN!,
6 contexts: ['default']
7});
8
9client.onCall(async (call) => {
10 await call.answer();
11 const action = await call.collect({
12 speech: { endSilenceTimeout: 2.0 },
13 initialTimeout: 10.0,
14 startInputTimers: false,
15 });
16
17 // Start timers when ready
18 await action.startInputTimers();
19
20 const event = await action.wait();
21});
22
23await client.run();