Interface CallParams


public interface CallParams
An object containing various parameters of a Call.

You can specify your params while answering an incoming call using Call.acceptWithParams(org.linphone.core.CallParams)
or while initiating an outgoing call with Core.inviteAddressWithParams(org.linphone.core.Address, org.linphone.core.CallParams).
This object can be created using Core.createCallParams(org.linphone.core.Call), using null 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: Call.getCurrentParams(), Call.getRemoteParams() and Call.getParams()
.
  • Method Details

    • getAccount

      @Nullable Account getAccount()
      Get the Account that is used for the call.

      Returns:
      The selected Account for the call, or null if none has been
      selected.
    • setAccount

      void setAccount(@Nullable Account account)
      Set the Account to use for the call.

      Parameters:
      account - The Account to use, or null if none has been selected.
      The CallParams keeps a reference to it and removes the previous one, if
      any.
    • setAudioBandwidthLimit

      void setAudioBandwidthLimit(int bandwidth)
      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.
      Parameters:
      bandwidth - The audio bandwidth limit to set in kbit/s.
    • getAudioDirection

      MediaDirection getAudioDirection()
      Get the audio stream direction.

      Returns:
      The audio stream MediaDirection associated with the call
      params.
    • setAudioDirection

      void setAudioDirection(MediaDirection direction)
      Set the audio stream direction.

      Parameters:
      direction - The audio stream MediaDirection associated with this
      call params.
    • isAudioEnabled

      boolean isAudioEnabled()
      Tell whether audio is enabled or not.

      Returns:
      A boolean value telling whether audio is enabled or not.
    • setAudioEnabled

      void setAudioEnabled(boolean enabled)
      Enable audio stream.

      Parameters:
      enabled - A boolean value telling whether to enable audio or not.
    • isAudioMulticastEnabled

      boolean isAudioMulticastEnabled()
      Use to get multicast state of audio stream.

      Returns:
      true if subsequent calls will propose multicast ip set by Core.setAudioMulticastAddr(java.lang.String)
    • setAudioMulticastEnabled

      void setAudioMulticastEnabled(boolean yesno)
      Use to enable multicast rtp for audio stream.

    • isAvpfEnabled

      boolean isAvpfEnabled()
      Whether or not the feedback extension will be used for AVP.

      Returns:
      true if AVPF is enabled, false otherwise
    • setAvpfEnabled

      void setAvpfEnabled(boolean enable)
      Toggle feedback extension for AVP.

      Parameters:
      enable - wether or not AVPF should be enabled
    • isCapabilityNegotiationReinviteEnabled

      @Deprecated boolean isCapabilityNegotiationReinviteEnabled()
      Deprecated.
      16/12/2021 Use #capabilityNegotiationReinviteEnabled
      instead.
      Check if the capability negotiation (RFC5939) reINVITE is enabled or not.

      Returns:
      true if capability negotiation reINVITE is enabled; false otherwise.
    • setCapabilityNegotiationReinviteEnabled

      void setCapabilityNegotiationReinviteEnabled(boolean enable)
      Define whether capability negotiation (RFC5939) reINVITE is enabled.

      Parameters:
      enable - true to enable capability negotiation reINVITE; false otherwise.
    • isCapabilityNegotiationsEnabled

      boolean isCapabilityNegotiationsEnabled()
      Indicates whether capability negotiations (RFC5939) is enabled.

      Returns:
      a boolean indicating the enablement of capability negotiations.
    • setCapabilityNegotiationsEnabled

      void setCapabilityNegotiationsEnabled(boolean enabled)
      Enable capability negotiations (RFC5939).

      Parameters:
      enabled - A boolean value telling whether to enable capability
      negotiations or not.
    • setCfgLinesMergingEnabled

      void setCfgLinesMergingEnabled(boolean enabled)
      Enable merging of cfg lines with consecutive indexes if capability negotiations
      (RFC5939) is enabled.

      Parameters:
      enabled - A boolean value telling whether to merge pcfg and acfg lines
    • getConferenceVideoLayout

      Conference.Layout getConferenceVideoLayout()
      Set video layout for conference.

    • setConferenceVideoLayout

      void setConferenceVideoLayout(Conference.Layout layout)
      Set video layout for conference.

      Parameters:
      layout - Conference#Layout to use as default when creating a
      conference
    • getCustomContents

      @NonNull Content[] getCustomContents()
      Gets a list of Content set if exists.

      Returns:
      A list of Content set if exists, null otherwise.
    • isEarlyMediaSendingEnabled

      boolean isEarlyMediaSendingEnabled()
      Indicate whether sending of early media was enabled.

      Returns:
      A boolean value telling whether sending of early media was enabled.
    • setEarlyMediaSendingEnabled

      void setEarlyMediaSendingEnabled(boolean enabled)
      Enable sending of real early media (during outgoing calls).

      Parameters:
      enabled - A boolean value telling whether to enable early media sending or
      not.
    • getFromHeader

      @Nullable String getFromHeader()
      Get the from header in the CallParams.

      Returns:
      The content of the from header, may be null.
    • setFromHeader

      void setFromHeader(@Nullable String fromValue)
      Force the from header of a call when instanciating it (if set, it precludes the
      search in proxy and primary contact)

      Parameters:
      fromValue - The value of the forced from, null to delete it.
    • getInputAudioDevice

      @Nullable AudioDevice getInputAudioDevice()
      Gets the default input audio device for a call that will be created using this
      call params.

      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.
      Returns:
      the AudioDevice that will be used by default as input when the
      call will be created
    • setInputAudioDevice

      void setInputAudioDevice(@Nullable AudioDevice audioDevice)
      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(org.linphone.core.AudioDevice) when call has been created.
      Parameters:
      audioDevice - The AudioDevice. null does nothing.
    • isRecording

      boolean isRecording()
      Indicates whether the call is being recorded.

      Returns:
      true if the call is being recorded, false otherwise.
    • getLocalConferenceMode

      boolean getLocalConferenceMode()
      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.
      Returns:
      A boolean value telling whether the call is part of the locally managed
      conference.
    • isLowBandwidthEnabled

      boolean isLowBandwidthEnabled()
      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.
      Returns:
      A boolean value telling whether the low bandwidth mode has been
      configured/detected.
    • setLowBandwidthEnabled

      void setLowBandwidthEnabled(boolean enabled)
      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.
      Parameters:
      enabled - A boolean value telling whether to activate the low bandwidth
      mode or not.
    • getMediaEncryption

      MediaEncryption getMediaEncryption()
      Get the kind of media encryption selected for the call.

      Returns:
      The kind of MediaEncryption selected for the call.
    • setMediaEncryption

      void setMediaEncryption(MediaEncryption encryption)
      Set requested media encryption for a call.

      Parameters:
      encryption - The MediaEncryption to use for the call.
    • isMicEnabled

      boolean isMicEnabled()
      Tells whether the microphone will be enabled when the call will be 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.
      Returns:
      true if the microphone will be enabled, false if disabled.
    • setMicEnabled

      void setMicEnabled(boolean enable)
      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(boolean) when call has been created.
      Parameters:
      enable - true to enable the microphone, false to disable it.
    • getOutputAudioDevice

      @Nullable AudioDevice getOutputAudioDevice()
      Gets the default output audio device for a call that will be created using this
      call params.

      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.
      Returns:
      the AudioDevice that will be used by default as output when the
      call will be created
    • setOutputAudioDevice

      void setOutputAudioDevice(@Nullable AudioDevice audioDevice)
      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(org.linphone.core.AudioDevice) when call has been created.
      Parameters:
      audioDevice - The AudioDevice. null does nothing.
    • getPrivacy

      int getPrivacy()
      Get requested level of privacy for the call.

      Returns:
      The LinphonePrivacyMask used for the call.
    • setPrivacy

      void setPrivacy(int privacy)
      Set requested level of privacy for the call.

      Parameters:
      privacy - The LinphonePrivacyMask to used for the call.
    • getProxyConfig

      @Deprecated @Nullable ProxyConfig getProxyConfig()
      Deprecated.
      28/02/2021 Use getAccount() instead.
      Get the ProxyConfig that is used for the call.

      Returns:
      The selected ProxyConfig for the call, or null if none has been
      selected.
    • setProxyConfig

      @Deprecated void setProxyConfig(@Nullable ProxyConfig proxyConfig)
      Deprecated.
      28/02/2021 Use setAccount(org.linphone.core.Account) instead.
      Set the ProxyConfig to use for the call.

      Parameters:
      proxyConfig - The ProxyConfig to use, or null if none has been
      selected. The CallParams keep a reference on it and remove the older if
      it exists.
    • isRealtimeTextEnabled

      boolean isRealtimeTextEnabled()
      Use to get real time text following rfc4103.

      Returns:
      returns true if call rtt is activated.
    • setRealtimeTextEnabled

      int setRealtimeTextEnabled(boolean yesno)
      Use to enable real time text following rfc4103.

      If enabled, outgoing calls put a m=text line in SDP offer .
      Parameters:
      yesno - if yes, subsequent outgoing calls will propose rtt
      Returns:
      0
    • getRealtimeTextKeepaliveInterval

      int getRealtimeTextKeepaliveInterval()
      Use to get keep alive interval of real time text following rfc4103.

      Returns:
      returns keep alive interval of real time text.
    • setRealtimeTextKeepaliveInterval

      void setRealtimeTextKeepaliveInterval(int interval)
      Use to set keep alive interval for real time text following rfc4103.

      Parameters:
      interval - The keep alive interval for real time text, 25000 by default.
    • getReceivedFramerate

      float getReceivedFramerate()
      Get the framerate of the video that is received.

      Returns:
      The actual received framerate in frames per seconds, 0 if not
      available.
    • getReceivedVideoDefinition

      @Nullable VideoDefinition getReceivedVideoDefinition()
      Get the definition of the received video.

      Returns:
      The received VideoDefinition or null.
    • getRecordFile

      @Nullable String getRecordFile()
      Get the path for the audio recording of the call.

      Returns:
      The path to the audio recording of the call or null.
    • setRecordFile

      void setRecordFile(@Nullable String path)
      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().
      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.

    • isRtpBundleEnabled

      boolean isRtpBundleEnabled()
      Indicates whether RTP bundle mode (also known as Media Multiplexing) is
      enabled.

      See https://datatracker.ietf.org/doc/html/rfc8843 for more information.
      Returns:
      a boolean indicating the enablement of rtp bundle mode.
    • setRtpBundleEnabled

      @Deprecated void setRtpBundleEnabled(boolean value)
      Deprecated.
      This property can no longer be controlled via CallParams.
      Use AccountParams#enableRtpBundle.
      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.
      Parameters:
      value - a boolean to indicate whether the feature is to be enabled.
    • getRtpProfile

      @NonNull String getRtpProfile()
      Get the RTP profile being used.

      Returns:
      The RTP profile.
    • getSentFramerate

      float getSentFramerate()
      Get the framerate of the video that is sent.

      Returns:
      The actual sent framerate in frames per seconds, 0 if not available.
    • getSentVideoDefinition

      @Nullable VideoDefinition getSentVideoDefinition()
      Get the definition of the sent video.

      Returns:
      The sent VideoDefinition or null.
    • getSessionName

      @Nullable String getSessionName()
      Get the session name of the media session (ie in SDP).

      Subject from the SIP message can be retrieved using getCustomHeader(java.lang.String)
      and is different.
      Returns:
      The session name of the media session or null.
    • setSessionName

      void setSessionName(@Nullable String name)
      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().
      Parameters:
      name - The session name to be used.
    • getSrtpSuites

      @NonNull SrtpSuite[] getSrtpSuites()
      Returns the list of enable srtp suite in the call (enforced only if SDES is the
      selected encryption mode)

      Returns:
      a list of srtp suite enabled in a given call
    • setSrtpSuites

      void setSrtpSuites(@NonNull SrtpSuite[] srtpSuites)
      Sets the list of srtp suite enabled(enforced only when SDES is the encryption
      mode)

      Parameters:
      srtpSuites - list with the list of SRTP encryption suites enabled in a
      given call
    • setTcapLineMergingEnabled

      void setTcapLineMergingEnabled(boolean enabled)
      Enable merging of tcap lines with consecutive indexes if capability
      negotiations (RFC5939) is enabled.

      Parameters:
      enabled - A boolean value telling whether to merge tcap lines
    • isToneIndicationsEnabled

      boolean isToneIndicationsEnabled()
      Check if tone indications are enabled.

      Returns:
      true if tone indications are enabled; false otherwise.
    • setToneIndicationsEnabled

      void setToneIndicationsEnabled(boolean enable)
      Define whether tone indications are enabled.

      Parameters:
      enable - true to enable tone indications; false otherwise.
    • getUsedAudioPayloadType

      @Nullable PayloadType getUsedAudioPayloadType()
      Get the audio payload type that has been selected by a call.

      Returns:
      The selected PayloadType. null is returned if no audio payload
      type has been selected by the call.
    • getUsedTextPayloadType

      @Nullable PayloadType getUsedTextPayloadType()
      Get the text payload type that has been selected by a call.

      Returns:
      The selected PayloadType. null is returned if no text payload
      type has been selected by the call.
    • getUsedVideoPayloadType

      @Nullable PayloadType getUsedVideoPayloadType()
      Get the video payload type that has been selected by a call.

      Returns:
      The selected PayloadType. null is returned if no video payload
      type has been selected by the call.
    • getVideoDirection

      MediaDirection getVideoDirection()
      Get the video stream direction.

      Returns:
      The video stream MediaDirection associated with the call
      params.
    • setVideoDirection

      void setVideoDirection(MediaDirection direction)
      Set the video stream direction.

      Parameters:
      direction - The video stream MediaDirection associated with this
      call params.
    • isVideoEnabled

      boolean isVideoEnabled()
      Tell whether video is enabled or not.

      Returns:
      A boolean value telling whether video is enabled or not.
    • setVideoEnabled

      void setVideoEnabled(boolean enabled)
      Enable video stream.

      Parameters:
      enabled - A boolean value telling whether to enable video or not.
    • isVideoMulticastEnabled

      boolean isVideoMulticastEnabled()
      Use to get multicast state of video stream.

      Returns:
      true if subsequent calls will propose multicast ip set by Core.setVideoMulticastAddr(java.lang.String)
    • setVideoMulticastEnabled

      void setVideoMulticastEnabled(boolean yesno)
      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.
      Parameters:
      yesno - if yes, subsequent outgoing calls will propose multicast ip set by
      Core.setVideoMulticastAddr(java.lang.String)
    • addCustomContent

      void addCustomContent(@NonNull Content content)
      Adds a Content to be added to the INVITE SDP.

      Parameters:
      content - The Content to be added.
    • addCustomHeader

      void addCustomHeader(@NonNull String headerName, @Nullable String headerValue)
      Add a custom SIP header in the INVITE for a call.

      Parameters:
      headerName - The name of the header to add.
      headerValue - The content of the header to add.
    • addCustomSdpAttribute

      void addCustomSdpAttribute(@NonNull String attributeName, @Nullable String attributeValue)
      Add a custom attribute related to all the streams in the SDP exchanged within
      SIP messages during a call.

      Parameters:
      attributeName - The name of the attribute to add.
      attributeValue - The content value of the attribute to add.
    • addCustomSdpMediaAttribute

      void addCustomSdpMediaAttribute(StreamType type, @NonNull String attributeName, @Nullable String attributeValue)
      Add a custom attribute related to a specific stream in the SDP exchanged within
      SIP messages during a call.

      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.
    • cfgLinesMerged

      boolean cfgLinesMerged()
      Indicates whether cfg lines with consecutive indexes are going to be merged or
      not if capability negotiations (RFC5939) is enabled.

      Returns:
      a boolean indicating the enablement of pcfg and acfg line merging
    • clearCustomSdpAttributes

      void clearCustomSdpAttributes()
      Clear the custom SDP attributes related to all the streams in the SDP exchanged
      within SIP messages during a call.

    • clearCustomSdpMediaAttributes

      void clearCustomSdpMediaAttributes(StreamType type)
      Clear the custom SDP attributes related to a specific stream in the SDP
      exchanged within SIP messages during a call.

      Parameters:
      type - The type of the stream to clear the custom SDP attributes from.
    • copy

      @Deprecated @NonNull CallParams copy()
      Deprecated.
      Copy an existing CallParams object to a new CallParams object.

      copy() is error-prone, leading to inconsistent parameters being passed
      to Core.inviteAddressWithParams(org.linphone.core.Address, org.linphone.core.CallParams) or Call.acceptWithParams(org.linphone.core.CallParams).
      Returns:
      A copy of the CallParams object.
    • getCustomHeader

      @Nullable String getCustomHeader(@NonNull String headerName)
      Get a custom SIP header.

      Parameters:
      headerName - The name of the header to get.
      Returns:
      The content of the header or null if not found.
    • getCustomSdpAttribute

      @Nullable String getCustomSdpAttribute(@NonNull String attributeName)
      Get a custom SDP attribute that is related to all the streams.

      Parameters:
      attributeName - The name of the attribute to get.
      Returns:
      The content value of the attribute or null if not found.
    • getCustomSdpMediaAttribute

      @Nullable String getCustomSdpMediaAttribute(StreamType type, @NonNull String attributeName)
      Get a custom SDP attribute that is related to a specific stream.

      Parameters:
      type - The type of the stream to add a custom SDP attribute to.
      attributeName - The name of the attribute to get.
      Returns:
      The content value of the attribute or null if not found.
    • hasCustomSdpAttribute

      boolean hasCustomSdpAttribute(@NonNull String attributeName)
      Returns true if a custom SDP attribute that is related to all the streams is
      present.

      Parameters:
      attributeName - The name of the attribute to get.
      Returns:
      Whether the attribute is present.
    • hasCustomSdpMediaAttribute

      boolean hasCustomSdpMediaAttribute(StreamType type, @NonNull String attributeName)
      Indicates whether a custom SDP attribute that is related to a specific stream
      is present or not.

      Parameters:
      type - The type of the stream to add a custom SDP attribute to.
      attributeName - The name of the attribute to get.
      Returns:
      Whether the attribute is present.
    • isMediaEncryptionSupported

      boolean isMediaEncryptionSupported(MediaEncryption encryption)
      Returns the encryption is supported.

      Parameters:
      encryption - The MediaEncryption to check whether is supported
      Returns:
      a boolean indicating whether the encryption is supported
    • tcapLinesMerged

      boolean tcapLinesMerged()
      Indicates whether tcap lines with consecutive indexes are going to be merged or
      not if capability negotiations (RFC5939) is enabled.

      Returns:
      a boolean indicating the enablement of tcap line merging
    • setUserData

      void setUserData(Object data)
      Sets the object to store in this object user's data
      Parameters:
      data - the object to store
    • getUserData

      Object getUserData()
      Gets the object stored in this object user's data
      Returns:
      the object store if any, null otherwise
    • getNativePointer

      long getNativePointer()
      Gets the native pointer used by this class to make native method calls.
      Returns:
      the nativer pointer, as long
    • toString

      String toString()
      Overrides:
      toString in class Object