CallDetect
Represents a current or past detecting session in a call.
Obtain instances of this class by starting a Detect session with one of the following methods:
Example
Detecting answering machines and handling the result:
Detecting DTMF digits:
Detecting fax tones:
Properties
id
The unique ID for this detecting session.
type
The type of this detecting session.
result
The result of the detecting session. The possible values depend on the detection type:
hasEnded
Whether the detection has ended. Returns true if the detection is finished.
Methods
ended
- ended():
Promise<CallDetect>
Returns a promise which will get resolved only after the detecting session is completed.
Returns
Promise<CallDetect> - See CallDetect for more details.
Example
stop
- stop():
Promise<CallDetect>
Stops the detect session.
Returns
Promise<CallDetect> - See CallDetect for more details.
Example
Events
onStarted
- CallDetect.listen(
{ onStarted: Callback }})
Emitted when the detecting session has started. Your event handler will be called with an instance of CallDetect.
Parameters
detect
The detecting session that has started. See CallDetect.
onUpdated
- CallDetect.listen(
{ onUpdated: Callback }})
Emitted when the detecting session has been updated. Your event handler will be called with an instance of CallDetect.
Parameters
detect
The detecting session that has updated. See CallDetect.
onEnded
- CallDetect.listen(
{ onEnded: Callback }})
Emitted when the detecting session has ended. Your event handler will be called with an instance of CallDetect.
Parameters
detect
The detecting session that has ended. See CallDetect.