Skip to main content

CallDetect

Represents a current or past detecting session in a call. You can obtain instances of this class by starting a Detect with Call.detect.

Accessors

id

get id(): string

The unique id for this prompt.

Returns

string

Methods

ended

ended(): Promise<CallDetect>

Returns a promise which will get resolved only after the detecting session is completed.

Returns

Promise<CallDetect>

Example

const detect = await call.detectDigit();
const result = await detect.ended();

console.log("Detect result:", result.type);

stop

stop(): Promise<CallDetect>

Stops the detect.

Returns

Promise<CallDetect>

Example

const detect = await call.detectDigit();
await detect.stop();

waitForResult

▸ waitForResult(): Promise<CallDetect>

Returns a promise which will get resolved only after the detecting session is completed.

caution

This method is deprecated. See ended instead.