Skip to content

MachineDetectionOptions

Lejla Solak edited this page Feb 9, 2026 · 1 revision



init(enabled, detectionTime)

Description

Creates an instance of MachineDetectionOptions.

Arguments

  • enabled: Bool - true if machine detection should be enabled for the call. Disabled by default.
  • detectionTime: Double - Duration in seconds for which machine detection will run. Default value is 3.7 seconds. Shorter detection times (as little as 1 second) help identify voicemail pickup quickly, while longer detection times (up to 5 seconds) improve the accuracy of distinguishing between humans and machines.

Returns

Example

let machineDetectionOptions = MachineDetectionOptions(enabled: true, detectionTime: 5)



enabled: Bool

Description

Getter for the enabled field.

Returns

  • Bool - Value of the enabled field indicating whether machine detection is enabled for the call.

Example

let machineDetectionOptions = MachineDetectionOptions(enabled: true)
let enabled = machineDetectionOptions.enabled



detectionTime: Double

Description

Getter for the detectionTime field.

Returns

  • Double - Value of the detectionTime field indicating the duration in seconds for which machine detection will run.

Example

let machineDetectionOptions = MachineDetectionOptions(enabled: true, detectionTime: 5)
let detectionTime = machineDetectionOptions.detectionTime

Tutorials

Migration guides

Reference documentation

Clone this wiki locally