> 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. # detectDigit > Detect DTMF digits on a call. [detectaction]: /docs/server-sdks/reference/typescript/relay/actions [detect]: /docs/server-sdks/reference/typescript/relay/call/detect Detect DTMF digits on the call. A typed convenience over [`detect()`][detect] with the `digit` detector. ## **Parameters** **`options`** `object` Detector options. --- **`options.digits`** `string` The digits to listen for, such as `"0123456789#*"`. --- **`options.timeout`** `number` Maximum seconds to run the detector before stopping. --- **`options.onCompleted`** `(event: RelayEvent) => void | Promise` Callback invoked when the operation reaches a terminal state. --- ## **Returns** `Promise<`[`DetectAction`][detectaction]`>` -- An action handle with `stop()` and `wait()` methods. It resolves on the first detection result. ## **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.detectDigit({ digits: '0#', timeout: 15 }); const event = await action.wait(); console.log(event.params); }); await client.run(); ``` > Detect DTMF digits on a call.