CallParams
public class CallParams : LinphoneObject
An object containing various parameters of a Call
.
You can specify your params while answering an incoming call using
Call.acceptWithParams() or while initiating an outgoing call with
Core.inviteAddressWithParams().
This object can be created using Core.createCallParams(), using nil for the
call pointer if you plan to use it for an outgoing call.
For each call, three CallParams
are available: yours, your correspondent’s
and the one that describe the current state of the call that is the result of
the negociation between the previous two. For example, you might enable a
certain feature in your call param but this feature can be denied in the
remote’s configuration, hence the difference.
See
See also: Call.getCurrentParams(), Call.getRemoteParams() and Call.getParams().-
Declaration
Swift
public static func getSwiftObject(cObject: OpaquePointer) -> CallParams
-
Declaration
Swift
public var getCobject: OpaquePointer? { get }
-
Refine bandwidth settings for this call by setting a bandwidth limit for audio streams. As a consequence, codecs whose bitrates are not compatible with this limit won’t be used.
Declaration
Swift
public var audioBandwidthLimit: Int { get set }
Parameters
bandwidth
The audio bandwidth limit to set in kbit/s.
-
Set the audio stream direction.
Declaration
Swift
public var audioDirection: MediaDirection { get set }
Return Value
The audio stream
MediaDirection
associated with the call params. -
Enable audio stream.
Declaration
Swift
public var audioEnabled: Bool { get set }
Return Value
A boolean value telling whether audio is enabled or not.
-
Use to enable multicast rtp for audio stream. Use to get multicast state of audio stream.
Declaration
Swift
public var audioMulticastEnabled: Bool { get set }
Return Value
true if subsequent calls will propose multicast ip set by Core.setAudioMulticastAddr()
-
Toggle feedback extension for AVP.
Declaration
Swift
public var avpfEnabled: Bool { get set }
Return Value
true if AVPF is enabled, false otherwise
-
Define whether capability negotiation (RFC5939) reINVITE is enabled.
- deprecated: 16/12/2021 Use capabilityNegotiationReinviteEnabled() instead.
Declaration
Swift
public var capabilityNegotiationReinviteEnabled: Bool { get set }
Return Value
true if capability negotiation reINVITE is enabled; false otherwise.
-
Enable capability negotiations (RFC5939).
Declaration
Swift
public var capabilityNegotiationsEnabled: Bool { get set }
Return Value
a boolean indicating the enablement of capability negotiations.
-
Set video layout for conference.
Declaration
Swift
public var conferenceVideoLayout: ConferenceLayout { get set }
-
Enable sending of real early media (during outgoing calls).
Declaration
Swift
public var earlyMediaSendingEnabled: Bool { get set }
Return Value
A boolean value telling whether sending of early media was enabled.
-
Force the from header of a call when instanciating it (if set, it precludes the search in proxy and primary contact)
Declaration
Swift
public var fromHeader: String { get set }
Return Value
The content of the from header, may be null.
-
Sets the given
AudioDevice
as default input for a call to be created later.Warning
This method won’t have any effect once the call has been created! Instead use Call.setInputAudioDevice() when call has been created.Warning
This method only concerns the call creation, it doesn’t reflect the currently used input audio device of the call. Instead use Call.getInputAudioDevice() when call has been created.Declaration
Swift
public var inputAudioDevice: AudioDevice? { get set }
Return Value
the
AudioDevice
that will be used by default as input when the call will be created -
Check if the capability negotiation (RFC5939) reINVITE is enabled or not.
- deprecated: 16/12/2021 Use capabilityNegotiationReinviteEnabled() instead.
Declaration
Swift
@available(*, deprecated) public var isCapabilityNegotiationReinviteEnabled: Bool { get }
Return Value
true if capability negotiation reINVITE is enabled; false otherwise.
-
Indicates whether the call is being recorded.
Declaration
Swift
public var isRecording: Bool { get }
Return Value
true if the call is being recorded, false otherwise.
-
Tell whether the call is part of the locally managed conference.
Warning
If a conference server is used to manage conferences, that function does not return true even if the conference is running. If you want to test whether the conference is running, you should test whether Core.getConference() return a non-null pointer.Declaration
Swift
public var localConferenceMode: Bool { get }
Return Value
A boolean value telling whether the call is part of the locally managed conference.
-
Indicate low bandwith mode. Configuring a call to low bandwidth mode will result in the core to activate several settings for the call in order to ensure that bitrate usage is lowered to the minimum possible. Typically, ptime (packetization time) will be increased, audio codec’s output bitrate will be targetted to 20kbit/s provided that it is achievable by the codec selected after SDP handshake. Video is automatically disabled.
Declaration
Swift
public var lowBandwidthEnabled: Bool { get set }
Return Value
A boolean value telling whether the low bandwidth mode has been configured/detected.
-
Set requested media encryption for a call.
Declaration
Swift
public var mediaEncryption: MediaEncryption { get set }
Return Value
The kind of
MediaEncryption
selected for the call. -
Enable or disable the microphone at the call creation.
Warning
This method won’t have any effect once the call has been created! Instead use Call.setMicrophoneMuted() when call has been created.Warning
This method only concerns the call creation, it doesn’t reflect the actual microphone status during a call. Instead use Call.getMicrophoneMuted() when call has been created.Declaration
Swift
public var micEnabled: Bool { get set }
Return Value
true if the microphone will be enabled, false if disabled.
-
Sets the given
AudioDevice
as default output for a call to be created later.Warning
This method won’t have any effect once the call has been created! Instead use Call.setOutputAudioDevice() when call has been created.Warning
This method only concerns the call creation, it doesn’t reflect the currently used output audio device of the call. Instead use Call.getOutputAudioDevice() when call has been created.Declaration
Swift
public var outputAudioDevice: AudioDevice? { get set }
Return Value
the
AudioDevice
that will be used by default as output when the call will be created -
Set requested level of privacy for the call.
Declaration
Swift
public var privacy: UInt { get set }
Return Value
The LinphonePrivacyMask used for the call.
-
Set the
ProxyConfig
to use for the call.- deprecated: 28/02/2021 Use setAccount() instead.
Get the
ProxyConfig
that is used for the call. - deprecated: 28/02/2021 Use getAccount() instead.
Declaration
Swift
public var proxyConfig: ProxyConfig? { get set }
Return Value
The selected
ProxyConfig
for the call, or nil if none has been selected. - deprecated: 28/02/2021 Use setAccount() instead.
Get the
-
Use to enable real time text following rfc4103. If enabled, outgoing calls put a m=text line in SDP offer .
Declaration
Swift
public var realtimeTextEnabled: Bool { get }
Return Value
returns true if call rtt is activated.
-
Declaration
Swift
public func setRealtimetextenabled(newValue: Bool) throws
-
Use to set keep alive interval for real time text following rfc4103.
Declaration
Swift
public var realtimeTextKeepaliveInterval: UInt { get set }
Return Value
returns keep alive interval of real time text.
-
Get the framerate of the video that is received.
Declaration
Swift
public var receivedFramerate: Float { get }
Return Value
The actual received framerate in frames per seconds, 0 if not available.
-
Get the definition of the received video.
Declaration
Swift
public var receivedVideoDefinition: VideoDefinition? { get }
Return Value
The received
VideoDefinition
or nil. -
Enable recording of the call. This function must be used before the call parameters are assigned to the call. The call recording can be started and paused after the call is established with Call.startRecording() and linphone_call_pause_recording().
Get the path for the audio recording of the call.
Declaration
Swift
public var recordFile: String { get set }
Return Value
The path to the audio recording of the call or nil.
-
Enables or disables RTP bundle mode (Media Multiplexing). See https://datatracker.ietf.org/doc/html/rfc8843 for more information about the feature. When enabled, liblinphone will try to negociate the use of a single port for all streams. It automatically enables rtcp-mux.
- deprecated: This property can no longer be controlled via
CallParams
. Use AccountParams.enableRtpBundle(). Indicates whether RTP bundle mode (also known as Media Multiplexing) is enabled. See https://datatracker.ietf.org/doc/html/rfc8843 for more information.
Declaration
Swift
public var rtpBundleEnabled: Bool { get set }
Return Value
a boolean indicating the enablement of rtp bundle mode.
- deprecated: This property can no longer be controlled via
-
Get the RTP profile being used.
Declaration
Swift
public var rtpProfile: String { get }
Return Value
The RTP profile.
-
Get the framerate of the video that is sent.
Declaration
Swift
public var sentFramerate: Float { get }
Return Value
The actual sent framerate in frames per seconds, 0 if not available.
-
Get the definition of the sent video.
Declaration
Swift
public var sentVideoDefinition: VideoDefinition? { get }
Return Value
The sent
VideoDefinition
or nil. -
Set the session name of the media session (ie in SDP). Subject from the SIP message (which is different) can be set using linphone_call_params_set_custom_header().
Declaration
Swift
public var sessionName: String { get set }
Return Value
The session name of the media session or nil.
-
Enable merging of tcap lines with consecutive indexes if capability negotiations (RFC5939) is enabled.
Declaration
Swift
public var tcapLineMergingEnabled: Bool? { get set }
Parameters
enabled
A boolean value telling whether to merge tcap lines
-
Define whether tone indications are enabled.
Declaration
Swift
public var toneIndicationsEnabled: Bool { get set }
Return Value
true if tone indications are enabled; false otherwise.
-
Get the audio payload type that has been selected by a call.
Declaration
Swift
public var usedAudioPayloadType: PayloadType? { get }
Return Value
The selected
PayloadType
. nil is returned if no audio payload type has been selected by the call. -
Get the text payload type that has been selected by a call.
Declaration
Swift
public var usedTextPayloadType: PayloadType? { get }
Return Value
The selected
PayloadType
. nil is returned if no text payload type has been selected by the call. -
Get the video payload type that has been selected by a call.
Declaration
Swift
public var usedVideoPayloadType: PayloadType? { get }
Return Value
The selected
PayloadType
. nil is returned if no video payload type has been selected by the call. -
Assign a user data to the call params.
Declaration
Swift
public var userData: UnsafeMutableRawPointer? { get set }
Return Value
The user data associated with the call params.
-
Set the video stream direction.
Declaration
Swift
public var videoDirection: MediaDirection { get set }
Return Value
The video stream
MediaDirection
associated with the call params. -
Enable video stream.
Declaration
Swift
public var videoEnabled: Bool { get set }
Return Value
A boolean value telling whether video is enabled or not.
-
Use to enable multicast rtp for video stream. If enabled, outgoing calls put a multicast address from Core.getVideoMulticastAddr() into video cline. In case of outgoing call video stream is sent to this multicast address. For incoming calls behavior is unchanged.
Declaration
Swift
public var videoMulticastEnabled: Bool { get set }
Return Value
true if subsequent calls will propose multicast ip set by Core.setVideoMulticastAddr()
-
Add a custom SIP header in the INVITE for a call.
Declaration
Swift
public func addCustomHeader(headerName: String, headerValue: String?)
Parameters
headerName
The name of the header to add.
headerValue
The content of the header to add.
-
Add a custom attribute related to all the streams in the SDP exchanged within SIP messages during a call.
Declaration
Swift
public func addCustomSdpAttribute(attributeName: String, attributeValue: String?)
Parameters
attributeName
The name of the attribute to add.
attributeValue
The content value of the attribute to add.
-
Add a custom attribute related to a specific stream in the SDP exchanged within SIP messages during a call.
Declaration
Swift
public func addCustomSdpMediaAttribute(type: StreamType, attributeName: String, attributeValue: String?)
Parameters
type
The type of the stream to add a custom SDP attribute to.
attributeName
The name of the attribute to add.
attributeValue
The content value of the attribute to add.
-
Clear the custom SDP attributes related to all the streams in the SDP exchanged within SIP messages during a call.
Declaration
Swift
public func clearCustomSdpAttributes()
-
Clear the custom SDP attributes related to a specific stream in the SDP exchanged within SIP messages during a call.
Declaration
Swift
public func clearCustomSdpMediaAttributes(type: StreamType)
Parameters
type
The type of the stream to clear the custom SDP attributes from.
-
Copy an existing
CallParams
object to a newCallParams
object.Declaration
Swift
public func copy() -> CallParams?
Return Value
A copy of the
CallParams
object. -
Get a custom SIP header.
Declaration
Swift
public func getCustomHeader(headerName: String) -> String
Parameters
headerName
The name of the header to get.
Return Value
The content of the header or nil if not found.
-
Get a custom SDP attribute that is related to all the streams.
Declaration
Swift
public func getCustomSdpAttribute(attributeName: String) -> String
Parameters
attributeName
The name of the attribute to get.
Return Value
The content value of the attribute or nil if not found.
-
Get a custom SDP attribute that is related to a specific stream.
Declaration
Swift
public func getCustomSdpMediaAttribute(type: StreamType, attributeName: String) -> String
Parameters
type
The type of the stream to add a custom SDP attribute to.
attributeName
The name of the attribute to get.
Return Value
The content value of the attribute or nil if not found.
-
Returns true if a custom SDP attribute that is related to all the streams is present.
Declaration
Swift
public func hasCustomSdpAttribute(attributeName: String) -> Bool
Parameters
attributeName
The name of the attribute to get.
Return Value
Whether the attribute is present.
-
Indicates whether a custom SDP attribute that is related to a specific stream is present or not.
Declaration
Swift
public func hasCustomSdpMediaAttribute(type: StreamType, attributeName: String) -> Bool
Parameters
type
The type of the stream to add a custom SDP attribute to.
attributeName
The name of the attribute to get.
Return Value
Whether the attribute is present.
-
Returns the encryption is supported.
Declaration
Swift
public func isMediaEncryptionSupported(encryption: MediaEncryption) -> Bool
Parameters
encryption
The
MediaEncryption
to check whether is supportedReturn Value
a boolean indicating whether the encryption is supported
-
Indicates whether tcap lines with consecutive indexes are going to be merged or not if capability negotiations (RFC5939) is enabled.
Declaration
Swift
public func tcapLinesMerged() -> Bool
Return Value
a boolean indicating the enablement of tcap line merging