Package com.vonage.client.voice
Class AdvancedMachineDetection.Builder
java.lang.Object
com.vonage.client.voice.AdvancedMachineDetection.Builder
- Enclosing class:
AdvancedMachineDetection
Builder for specifying the Advanced Machine Detection properties.
-
Method Summary
Modifier and TypeMethodDescriptionbeepTimeout(int beepTimeout) Maximum time in seconds Vonage should wait for a machine beep to be detected.behavior(MachineDetection behavior) Define how the system responds when a machine is detected.build()Constructs the AdvancedMachineDetection object.Detect if machine answered and sends a human or machine status in the webhook payload.
-
Method Details
-
behavior
Define how the system responds when a machine is detected. WhenMachineDetection.HANGUPis used, the call will be terminated if a machine is detected. WhenMachineDetection.CONTINUEis used, the call will continue even if a machine is detected.- Parameters:
behavior- The machine detection behaviour as an enum.- Returns:
- This builder.
-
mode
Detect if machine answered and sends a human or machine status in the webhook payload. When set toAdvancedMachineDetection.Mode.DETECT_BEEP, the system also attempts to detect voice mail beep and sends an additional parametersub_statein the webhook with the valuebeep_start.- Parameters:
mode- The machine detection mode enum.- Returns:
- This builder.
-
beepTimeout
Maximum time in seconds Vonage should wait for a machine beep to be detected. A machine event withsub_stateset tobeep_timeoutwill be sent if the timeout is exceeded.- Parameters:
beepTimeout- The beep timeout in seconds as an integer.- Returns:
- This builder.
-
build
Constructs the AdvancedMachineDetection object.- Returns:
- A new AdvancedMachineDetection instance with this builder's properties.
-