Skip to content

PhoneCallOptions

Lejla Solak edited this page Feb 9, 2026 · 6 revisions

extends CallOptions



init(audio, audioOptions, recordingOptions, customData, from, autoReconnect, machineDetectionOptions)

Description

Creates an instance of PhoneCallOptions.

Arguments

  • audio: Bool - Flag indicating whether the local audio should be enabled for the call. Enabled by default.
  • audioOptions: AudioOptions - Optional audio configuration to be used when making a call.
  • recordingOptions: RecordingOptions - Optional recording configuration to be used when making a call.
  • customData: CustomData - Optional object containing custom additional information related to the outgoing call. Empty by default.
  • from: String? - Optional value representing a phone number which will be displayed on the called device as the Caller ID when making phone calls via callPhone method.
  • autoReconnect: Bool - Optional flag indicating whether reconnect should be enabled for the call. Disabled by default.
  • machineDetectionOptions: MachineDetectionOptions? - Optional configuration for machine detection during the call.

Returns

Example

let customData = ["userId": "bgxy-as45-ddf3"]
let machineDetectionOptions = MachineDetectionOptions(enabled: true)
let phoneCallOptions = PhoneCallOptions(customData: customData, from: "33712345678", machineDetectionOptions: machineDetectionOptions)



from: String

Description

Getter for the from field.

Returns

  • String - Value of the from field representing a phone number which will be displayed on the called device as the Caller ID.

Example

let from = PhoneCallOptions().from



machineDetectionOptions: MachineDetectionOptions?

Description

Getter for the machineDetectionOptions field.

Returns

  • MachineDetectionOptions? - Value of the machineDetectionOptions field containing configuration for machine detection during the call.

Example

let machineDetectionOptions = MachineDetectionOptions(enabled: true)
let phoneCallOptions = PhoneCallOptions(machineDetectionOptions: machineDetectionOptions)
let options = phoneCallOptions.machineDetectionOptions

Tutorials

Migration guides

Reference documentation

Clone this wiki locally