-
Notifications
You must be signed in to change notification settings - Fork 2
PhoneCallOptions
Lejla Solak edited this page Feb 9, 2026
·
6 revisions
extends CallOptions
init(audio: Bool = true, audioOptions: AudioOptions = AudioOptions(), recordingOptions: RecordingOptions = RecordingOptions(), customData: CustomData = [:], from: String? = nil, autoReconnect: Bool = false, machineDetectionOptions: MachineDetectionOptions? = nil)from: StringmachineDetectionOptions: MachineDetectionOptions?
init(audio, audioOptions, recordingOptions, customData, from, autoReconnect, machineDetectionOptions)
Creates an instance of PhoneCallOptions.
-
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 viacallPhonemethod. -
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.
-
PhoneCallOptions- Instance of thePhoneCallOptions.
let customData = ["userId": "bgxy-as45-ddf3"]
let machineDetectionOptions = MachineDetectionOptions(enabled: true)
let phoneCallOptions = PhoneCallOptions(customData: customData, from: "33712345678", machineDetectionOptions: machineDetectionOptions)Getter for the from field.
-
String- Value of thefromfield representing a phone number which will be displayed on the called device as the Caller ID.
let from = PhoneCallOptions().fromGetter for the machineDetectionOptions field.
-
MachineDetectionOptions?- Value of themachineDetectionOptionsfield containing configuration for machine detection during the call.
let machineDetectionOptions = MachineDetectionOptions(enabled: true)
let phoneCallOptions = PhoneCallOptions(machineDetectionOptions: machineDetectionOptions)
let options = phoneCallOptions.machineDetectionOptions