stop
Stop the collect operation.
Returns
Promise<Record<string, unknown>> — Server acknowledgment.
Stop the collect operation.
Promise<Record<string, unknown>> — Server acknowledgment.
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,});// Stop the collect operationawait action.stop();});await client.run();