> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # CollectAction > Action handle for a play-and-collect operation. [call-play-and-collect]: /docs/server-sdks/reference/typescript/relay/call/play-and-collect [base-action-interface]: /docs/server-sdks/reference/typescript/relay/actions [stop]: /docs/server-sdks/reference/typescript/relay/actions/collect-action/stop [volume]: /docs/server-sdks/reference/typescript/relay/actions/collect-action/volume [startinputtimers]: /docs/server-sdks/reference/typescript/relay/actions/collect-action/start-input-timers Returned from [`call.playAndCollect()`][call-play-and-collect]. Tracks a combined play-and-collect operation where a prompt is played and user input (digits or speech) is collected. Terminal states: `finished`, `error`, `no_input`, `no_match`. > **Note** > > `CollectAction` only resolves on collect events. Play events sharing the same > `controlId` are ignored, so `await action.wait()` returns only when input > collection completes. Inherits all properties and methods from the [base Action interface][base-action-interface] (`controlId`, `isDone`, `completed`, `result`, `wait()`). ## **Properties** No additional properties beyond the [base Action interface][base-action-interface]. ## **Methods** #### [stop](/docs/server-sdks/reference/typescript/relay/actions/collect-action/stop) Stop the play-and-collect operation. #### [volume](/docs/server-sdks/reference/typescript/relay/actions/collect-action/volume) Adjust the prompt playback volume during a play-and-collect operation. #### [startInputTimers](/docs/server-sdks/reference/typescript/relay/actions/collect-action/start-input-timers) Manually start the initial\_timeout timer on an active collect. ## **Example** ```typescript {11} 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.playAndCollect( [{ type: 'tts', text: 'Press 1 for sales, 2 for support.' }], { digits: { max: 1, digit_timeout: 5.0 } }, ); const event = await action.wait(); const result = event.params.result ?? {}; const digit = (result as Record).digits ?? ''; console.log(`User pressed: ${digit}`); }); await client.run(); ``` > Action handle for a play-and-collect operation. ## Docs - [startInputTimers](https://signalwire.com/docs/server-sdks/reference/typescript/relay/actions/collect-action/start-input-timers.md): Manually start the initial_timeout timer on an active collect. - [stop](https://signalwire.com/docs/server-sdks/reference/typescript/relay/actions/collect-action/stop.md): Stop the play-and-collect operation. - [volume](https://signalwire.com/docs/server-sdks/reference/typescript/relay/actions/collect-action/volume.md): Adjust the prompt playback volume during a play-and-collect operation.