startInputTimers
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.
Manually start the initial_timeout timer on the active collect operation. Useful
when startInputTimers was set to false during the initial call.
Promise<Record<string, unknown>> — Server acknowledgment.
1 import { RelayClient } from '@signalwire/sdk'; 2 3 const client = new RelayClient({ 4 project: process.env.SIGNALWIRE_PROJECT_ID!, 5 token: process.env.SIGNALWIRE_API_TOKEN!, 6 contexts: ['default'] 7 }); 8 9 client.onCall(async (call) => { 10 await call.answer(); 11 const action = await call.playAndCollect( 12 [{ type: 'tts', text: 'Press 1 for sales, 2 for support.' }], 13 { digits: { max: 1, digit_timeout: 5.0 }, start_input_timers: false }, 14 ); 15 16 // Start timers when ready 17 await action.startInputTimers(); 18 19 const event = await action.wait(); 20 }); 21 22 await client.run();