---title: CallDetect---Represents a current or past detecting session in a call. You can obtain instances of this class by starting a Detect session with one of the following methods:- [Call.detect](./voice-call.mdx#detect)- [Call.detectAnsweringMachine](./voice-call.mdx#detectansweringmachine)- [Call.detectDigit](./voice-call.mdx#detectdigit)- [Call.detectFax](./voice-call.mdx#detectfax)## Accessors### id• get **id**(): stringThe unique id for this detecting session.#### Returnsstring### type• get **type**(): machine | digit | faxThe type of this detecting session.#### Returnsmachine | digit | fax## Methods### ended▸ **ended**(): Promise<[CallDetect](./calldetect.mdx)\>Returns a promise which will get resolved only after the detecting session is completed.#### ReturnsPromise<[CallDetect](./calldetect.mdx)\>#### Examplejsconst detect = await call.detectDigit();const result = await detect.ended();console.log(Detect result:, result.type);### stop▸ **stop**(): Promise<[CallDetect](./calldetect.mdx)\>Stops the detect.#### ReturnsPromise<[CallDetect](./calldetect.mdx)\>#### Examplejsconst detect = await call.detectDigit();await detect.stop();### ~~waitForResult~~▸ waitForResult(): Promise<[CallDetect](./calldetect.mdx)\>Returns a promise which will get resolved only after the detecting session is completed.:::cautionThis method is deprecated. See [ended](#ended) instead.:::