Skip to content

PhoneCallOptions

Lejla Solak edited this page May 27, 2024 · 6 revisions

extends CallOptions



builder()

Description

Creates a builder instance used to build a new instance of PhoneCallOptions.

Arguments

  • none

Returns

Example

PhoneCallOptions.Builder phoneCallOptionsBuilder = PhoneCallOptions.builder();



getFrom()

Description

Getter for the from field.

Arguments

  • none

Returns

  • String - Value of the from field indicating what phone number should be used when making the call.

Example

PhoneCallOptions phoneCallOptions = PhoneCallOptions.builder().setFrom("33712345678").build();
String from = phoneCallOptions.getFrom();



Builder




from(from)

Description

Setter for the from field.

Arguments

  • from: String - Phone number used when making the call.

Returns

Example

PhoneCallOptions.Builder phoneCallOptionsBuilder = PhoneCallOptions.builder().from("33712345678");



audio(audio)

Description

Setter for the audio field.

Arguments

  • audio: boolean - true if the local audio should be enabled. Enabled by default.

Returns

Example

PhoneCallOptions.Builder phoneCallOptionsBuilder = PhoneCallOptions.builder().audio(false);



audioOptions(audioOptions)

Description

Setter for the audioOptions field.

Arguments

  • audioOptions: AudioOptions - Configuration used for the audio in the call.

Returns

Example

AudioOptions audioOptions = AudioOptions.builder().lowDataMode(true).build();
PhoneCallOptions.Builder phoneCallOptionsBuilder = PhoneCallOptions.builder().audioOptions(audioOptions);



recordingOptions(recordingOptions)

Description

Setter for the recordingOptions field.

Arguments

  • recordingOptions: RecordingOptions - Recording configuration to be used for the call.

Returns

Example

RecordingOptions recordingOptions = RecordingOptions.Builder.recordingType(RecordingType.AUDIO).build();
PhoneCallOptions.Builder phoneCallOptionsBuilder = PhoneCallOptions.builder().recordingOptions(recordingOptions);



customData(customData)

Description

Setter for the customData field.

Arguments

  • customData: Map<String, String> - Object containing custom additional information related to the outgoing call. Empty by default.

Returns

Example

Map<String, String> customData = Map.of("username", "Alice");
PhoneCallOptions.Builder phoneCallOptionsBuilder = PhoneCallOptions.builder().customData(customData);



build()

Description

Builds a new instance of the PhoneCallOptions.

Arguments

  • none

Returns

Example

PhoneCallOptions.Builder phoneCallOptionsBuilder = PhoneCallOptions.builder();
PhoneCallOptions phoneCallOptions = phoneCallOptionsBuilder.build();

Tutorials

Migration guides

Reference documentation

Clone this wiki locally