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:
Accessors
id
• get
id(): string
The unique id for this detecting session.
Returns
string
type
• get
type(): "machine"
| "digit"
| "fax"
| "beep"
The type of this detecting session.
Returns
"machine"
| "digit"
| "fax"
| "beep"
result
• get
result(): string
The result of the detecting session.
Returns
Detect Type | Type | Event Values |
---|---|---|
amd | detectAnsweringMachine | "string" |
|
detectDigit | "string" | Possible digits detected: 0 1 2 3 4 5 6 7 8 9 # * |
detectFax | "string" |
|
Methods
ended
▸ ended(): Promise<CallDetect>
- See CallDetectResult for more details.
Returns a promise which will get resolved only after the detecting session is completed.
Returns
Promise<CallDetect>
- See CallDetectResult for more details.
Example
const detect = await call.detectDigit();
const result = await detect.ended();
console.log("Detect result:", result.type);
stop
▸ stop(): Promise<CallDetect>
- See CallDetectResult for more details.
Stops the detect.
Returns
Promise<CallDetect>
- See CallDetectResult for more details.
Example
const detect = await call.detectDigit();
await detect.stop();
waitForResult
▸ waitForResult(): Promise<CallDetect>
- See CallDetectResult for more details.
Returns a promise which will get resolved only after the detecting session is completed.
This method is deprecated. See ended instead.