Voice: answering-machine detection
Six detection modes, from off to premium, including waiting for the beep, with the events each sends and the settings you can tune.
Detection starts when a call is answered and tells you, by webhook, whether a person or a machine picked up. Choose a mode per call with answering_machine_detection.
Modes
- disabled: No detection. The default.
- detect: Human or machine, as soon as the call is answered. Sends call.machine.detection.ended; results: human, machine, not_sure.
- detect_beep: Human or machine, then the beep on a machine, so a message lands at the right moment. Sends
call.machine.detection.endedand call.machine.greeting.ended; results: human, machine, not_sure, beep_detected. - detect_words: Classifies by how the greeting is spoken, then reports when a machine greeting ends. Sends
call.machine.detection.endedand call.machine.greeting.ended; results: human, machine, not_sure, ended. - greeting_end: Human or machine, then the end of a machine greeting by beep or silence. Sends
call.machine.detection.endedand call.machine.greeting.ended; results: human, machine, not_sure, beep_detected, ended. - premium: The most accurate, telling a home from a business and catching silence and fax; also reports the beep. Sends
call.machine.premium.detection.endedand call.machine.premium.greeting.ended; results: human_residence, human_business, machine, silence, fax_detected, beep_detected, no_beep_detected.
Tuning standard detection
Send answering_machine_detection_config with any of these (premium uses only total_analysis_time_millis and greeting_duration_millis):
- total_analysis_time_millis: The longest detection may take. Default 3500.
- after_greeting_silence_millis: Silence after speech that ends a greeting. Default 800.
- between_words_silence_millis: Silence that separates two words. Default 50.
- greeting_duration_millis: A greeting longer than this is a machine. Default 3500.
- initial_silence_millis: Silence at the start that means a machine. Default 3500.
- maximum_number_of_words: More words than this is a machine. Default 5.
- maximum_word_length_millis: A longer word is a machine. Default 3500.
- silence_threshold: Audio level counted as silence (0 to 32767). Default 256.
- greeting_total_analysis_time_millis: How long to listen for the end of a greeting. Default 5000.
- greeting_silence_duration_millis: Silence that ends a greeting with no beep. Default 1500.
Using the result
With bridge_on_answer, decide on call.machine.detection.ended: a human stays connected to the agent; a machine is hung up, or left a message once call.machine.greeting.ended says the beep has gone. Detection is charged per answered call when it ran.
Related:DialerSeat Voice: numbers, SIP and a voice API, Voice: numbers, porting and 911, Voice: SIP trunking and Voice: the Voice API.