detectAnsweringMachine
detectAnsweringMachine
- detectAnsweringMachine(
params?):Promise<CallDetect>
Detects the presence of an answering machine.
Parameters
Object containing the parameters for answering machine detection.
Number of seconds to run the detector for.
Whether to wait until the device is ready for voicemail delivery.
Number of seconds to wait for initial voice before giving up.
Number of seconds to wait for voice to finish.
Number of seconds to wait for voice to finish before firing the READY event. Default is the value of endSilenceTimeout.
How many seconds of voice to decide it is a machine.
How many words to count to decide it is a machine.
If set to true, a NOT_READY event is fired if speech is detected after the READY event. This allows the application to restart message delivery to the answering machine.
Returns
Promise<CallDetect>
A promise that resolves to a CallDetect object that you can use to
view the current state and results of the detect session.
Example
In this example, we dial a phone number and wait for the answering machine detection to finish. Once the detection is finished, we log the result and then play a TTS message. At the end of the TTS message, we hangup the call.