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().
  • Undocumented

    Declaration

    Swift

    public static func getSwiftObject(cObject: OpaquePointer) -> CallParams
  • Undocumented

    Declaration

    Swift

    public var getCobject: OpaquePointer? { get }
  • Set the Account to use for the call.

    Get the Account that is used for the call.

    Declaration

    Swift

    public var account: Account? { get set }

    Parameters

    account

    The Account to use, or nil if none has been selected. The CallParams keeps a reference to it and removes the previous one, if any.

    Return Value

    The selected Account for the call, or nil if none has been selected.

  • 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 }

    Parameters

    direction

    The audio stream MediaDirection associated with this call params. Get the audio stream direction.

    Return Value

    The audio stream MediaDirection associated with the call params.

  • Enable audio stream.

    Declaration

    Swift

    public var audioEnabled: Bool { get set }

    Parameters

    enabled

    A boolean value telling whether to enable audio or not. Tell whether audio is enabled or not.

    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()

  • Set the video stream direction.

    Declaration

    Swift

    public var avpfEnabled: Bool? { get set }

    Parameters

    enable

    wether or not AVPF should be enabled for this call

  • Define whether capability negotiation (RFC5939) reINVITE is enabled.

    • deprecated: 16/12/2021 Use capabilityNegotiationReinviteEnabled() instead.

    Declaration

    Swift

    public var capabilityNegotiationReinviteEnabled: Bool { get set }

    Parameters

    enable

    true to enable capability negotiation reINVITE; false otherwise. Check if the capability negotiation (RFC5939) reINVITE is enabled or not.

    Return Value

    true if capability negotiation reINVITE is enabled; false otherwise.

  • Enable capability negotiations (RFC5939).

    Declaration

    Swift

    public var capabilityNegotiationsEnabled: Bool { get set }

    Parameters

    enabled

    A boolean value telling whether to enable capability negotiations or not. Indicates whether capability negotiations (RFC5939) is enabled.

    Return Value

    a boolean indicating the enablement of capability negotiations.

  • Set video layout for conference.

    Declaration

    Swift

    public var conferenceVideoLayout: ConferenceLayout { get set }

    Parameters

    layout

    ConferenceLayout to use as default when creating a conference Set video layout for conference.

  • Gets a list of Content set if exists.

    Declaration

    Swift

    public var customContents: [Content] { get }

    Return Value

    A list of Content set if exists, nil otherwise.

  • Enable sending of real early media (during outgoing calls).

    Declaration

    Swift

    public var earlyMediaSendingEnabled: Bool { get set }

    Parameters

    enabled

    A boolean value telling whether to enable early media sending or not. Indicate whether sending of early media was enabled.

    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 }

    Parameters

    fromValue

    The value of the forced from, null to delete it.
    Get the from header in the CallParams.

    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 }

    Parameters

    audioDevice

    The AudioDevice. nil does nothing.
    Gets the default input audio device for a call that will be created using this call params.

    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 }

    Parameters

    enabled

    A boolean value telling whether to activate the low bandwidth mode or not. Tell whether the call has been configured in low bandwidth mode or not. This mode can be automatically discovered thanks to a stun server when activate_edge_workarounds=1 in section [net] of configuration file. An application that would have reliable way to know network capacity may not use activate_edge_workarounds=1 but instead manually configure low bandwidth mode with enableLowBandwidth(). When enabled, this param may transform a call request with video in audio only mode.

    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 }

    Parameters

    encryption

    The MediaEncryption to use for the call. Get the kind of media encryption selected for the call.

    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 }

    Parameters

    enable

    true to enable the microphone, false to disable it. Tells whether the microphone will be enabled when the call will be created.

    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 }

    Parameters

    audioDevice

    The AudioDevice. nil does nothing.
    Gets the default output audio device for a call that will be created using this call params.

    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 }

    Parameters

    privacy

    The LinphonePrivacyMask to used for the call. Get requested level of privacy for the call.

    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 }

    Parameters

    proxyConfig

    The ProxyConfig to use, or nil if none has been selected. The CallParams keep a reference on it and remove the older if it exists.

    Return Value

    The selected ProxyConfig for the call, or nil if none has been selected.

  • 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 }

    Parameters

    yesno

    if yes, subsequent outgoing calls will propose rtt

    Return Value

    returns true if call rtt is activated.

  • Undocumented

    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 }

    Parameters

    interval

    The keep alive interval for real time text, 25000 by default. Use to get keep alive interval of real time text following rfc4103.

    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().

    Declaration

    Swift

    public var recordFile: String { get set }

    Parameters

    path

    A string containing the path and filename of the file where audio/video streams are to be written. The filename must have either .mkv or .wav extention. The video stream will be written only if a MKV file is given.
    Get the path for the audio recording of the call.

    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 }

    Parameters

    value

    a boolean to indicate whether the feature is to be enabled.

    Return Value

    a boolean indicating the enablement of rtp bundle mode.

  • 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 }

    Parameters

    name

    The session name to be used.
    Get the session name of the media session (ie in SDP). Subject from the SIP message can be retrieved using getCustomHeader() and is different.

    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

  • 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 }

    Parameters

    userData

    The user data to associate with the call params.
    Get the user data associated with the call params.

    Return Value

    The user data associated with the call params.

  • Set the video stream direction.

    Declaration

    Swift

    public var videoDirection: MediaDirection { get set }

    Parameters

    direction

    The video stream MediaDirection associated with this call params. Get the video stream direction.

    Return Value

    The video stream MediaDirection associated with the call params.

  • Enable video stream.

    Declaration

    Swift

    public var videoEnabled: Bool { get set }

    Parameters

    enabled

    A boolean value telling whether to enable video or not. Tell whether video is enabled or not.

    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 }

    Parameters

    yesno

    if yes, subsequent outgoing calls will propose multicast ip set by Core.setVideoMulticastAddr() Use to get multicast state of video stream.

    Return Value

    true if subsequent calls will propose multicast ip set by Core.setVideoMulticastAddr()

  • Adds a Content to be added to the INVITE SDP.

    Declaration

    Swift

    public func addCustomContent(content: Content)

    Parameters

    content

    The Content to be added.

  • 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 new CallParams 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 supported

    Return 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