Liblinphone  4.5.0
Public Member Functions | List of all members
linphone::CallParams Class Reference

An object containing various parameters of a Call. More...

#include <call_params.hh>

Inheritance diagram for linphone::CallParams:

Public Member Functions

 CallParams (void *ptr, bool takeRef=true)
 
LINPHONECXX_PUBLIC _LinphoneCallParams * cPtr ()
 
LINPHONECXX_PUBLIC void setAudioBandwidthLimit (int bandwidth)
 Refine bandwidth settings for this call by setting a bandwidth limit for audio streams. More...
 
LINPHONECXX_PUBLIC linphone::MediaDirection getAudioDirection () const
 Get the audio stream direction. More...
 
LINPHONECXX_PUBLIC void setAudioDirection (linphone::MediaDirection direction)
 Set the audio stream direction. More...
 
LINPHONECXX_PUBLIC bool audioEnabled () const
 Tell whether audio is enabled or not. More...
 
LINPHONECXX_PUBLIC void enableAudio (bool enabled)
 Enable audio stream. More...
 
LINPHONECXX_PUBLIC bool audioMulticastEnabled () const
 Use to get multicast state of audio stream. More...
 
LINPHONECXX_PUBLIC void enableAudioMulticast (bool yesno)
 Use to enable multicast rtp for audio stream.
 
LINPHONECXX_PUBLIC void enableAvpf (bool enable)
 Set the video stream direction. More...
 
LINPHONECXX_PUBLIC std::list< std::shared_ptr< linphone::Content > > getCustomContents () const
 Gets a list of Content set if exists. More...
 
LINPHONECXX_PUBLIC bool earlyMediaSendingEnabled () const
 Indicate whether sending of early media was enabled. More...
 
LINPHONECXX_PUBLIC void enableEarlyMediaSending (bool enabled)
 Enable sending of real early media (during outgoing calls). More...
 
LINPHONECXX_PUBLIC bool getLocalConferenceMode () const
 Tell whether the call is part of the locally managed conference. More...
 
LINPHONECXX_PUBLIC bool lowBandwidthEnabled () const
 Tell whether the call has been configured in low bandwidth mode or not. More...
 
LINPHONECXX_PUBLIC void enableLowBandwidth (bool enabled)
 Indicate low bandwith mode. More...
 
LINPHONECXX_PUBLIC linphone::MediaEncryption getMediaEncryption () const
 Get the kind of media encryption selected for the call. More...
 
LINPHONECXX_PUBLIC void setMediaEncryption (linphone::MediaEncryption encryption)
 Set requested media encryption for a call. More...
 
LINPHONECXX_PUBLIC unsigned int getPrivacy () const
 Get requested level of privacy for the call. More...
 
LINPHONECXX_PUBLIC void setPrivacy (unsigned int privacy)
 Set requested level of privacy for the call. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ProxyConfiggetProxyConfig () const
 Get the ProxyConfig that is used for the call. More...
 
LINPHONECXX_PUBLIC void setProxyConfig (const std::shared_ptr< linphone::ProxyConfig > &proxyConfig)
 Set the ProxyConfig to use for the call. More...
 
LINPHONECXX_PUBLIC bool realtimeTextEnabled () const
 Use to get real time text following rfc4103. More...
 
LINPHONECXX_PUBLIC linphone::Status enableRealtimeText (bool yesno)
 Use to enable real time text following rfc4103. More...
 
LINPHONECXX_PUBLIC unsigned int getRealtimeTextKeepaliveInterval () const
 Use to get keep alive interval of real time text following rfc4103. More...
 
LINPHONECXX_PUBLIC void setRealtimeTextKeepaliveInterval (unsigned int interval)
 Use to set keep alive interval for real time text following rfc4103. More...
 
LINPHONECXX_PUBLIC float getReceivedFramerate () const
 Get the framerate of the video that is received. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::VideoDefinitiongetReceivedVideoDefinition () const
 Get the definition of the received video. More...
 
LINPHONECXX_PUBLIC std::string getRecordFile () const
 Get the path for the audio recording of the call. More...
 
LINPHONECXX_PUBLIC void setRecordFile (const std::string &path)
 Enable recording of the call. More...
 
LINPHONECXX_PUBLIC bool rtpBundleEnabled () const
 Indicates whether RTP bundle mode (also known as Media Multiplexing) is enabled. More...
 
LINPHONECXX_PUBLIC void enableRtpBundle (bool value)
 Enables or disables RTP bundle mode (Media Multiplexing). More...
 
LINPHONECXX_PUBLIC std::string getRtpProfile () const
 Get the RTP profile being used. More...
 
LINPHONECXX_PUBLIC float getSentFramerate () const
 Get the framerate of the video that is sent. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::VideoDefinitiongetSentVideoDefinition () const
 Get the definition of the sent video. More...
 
LINPHONECXX_PUBLIC std::string getSessionName () const
 Get the session name of the media session (ie in SDP). More...
 
LINPHONECXX_PUBLIC void setSessionName (const std::string &name)
 Set the session name of the media session (ie in SDP). More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::PayloadTypegetUsedAudioPayloadType () const
 Get the audio payload type that has been selected by a call. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::PayloadTypegetUsedTextPayloadType () const
 Get the text payload type that has been selected by a call. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::PayloadTypegetUsedVideoPayloadType () const
 Get the video payload type that has been selected by a call. More...
 
LINPHONECXX_PUBLIC linphone::MediaDirection getVideoDirection () const
 Get the video stream direction. More...
 
LINPHONECXX_PUBLIC void setVideoDirection (linphone::MediaDirection direction)
 Set the video stream direction. More...
 
LINPHONECXX_PUBLIC bool videoEnabled () const
 Tell whether video is enabled or not. More...
 
LINPHONECXX_PUBLIC void enableVideo (bool enabled)
 Enable video stream. More...
 
LINPHONECXX_PUBLIC bool videoMulticastEnabled () const
 Use to get multicast state of video stream. More...
 
LINPHONECXX_PUBLIC void enableVideoMulticast (bool yesno)
 Use to enable multicast rtp for video stream. More...
 
LINPHONECXX_PUBLIC void addCustomContent (const std::shared_ptr< linphone::Content > &content)
 Adds a Content to be added to the INVITE SDP. More...
 
LINPHONECXX_PUBLIC void addCustomHeader (const std::string &headerName, const std::string &headerValue)
 Add a custom SIP header in the INVITE for a call. More...
 
LINPHONECXX_PUBLIC void addCustomSdpAttribute (const std::string &attributeName, const std::string &attributeValue)
 Add a custom attribute related to all the streams in the SDP exchanged within SIP messages during a call. More...
 
LINPHONECXX_PUBLIC void addCustomSdpMediaAttribute (linphone::StreamType type, const std::string &attributeName, const std::string &attributeValue)
 Add a custom attribute related to a specific stream in the SDP exchanged within SIP messages during a call. More...
 
LINPHONECXX_PUBLIC void clearCustomSdpAttributes ()
 Clear the custom SDP attributes related to all the streams in the SDP exchanged within SIP messages during a call.
 
LINPHONECXX_PUBLIC void clearCustomSdpMediaAttributes (linphone::StreamType type)
 Clear the custom SDP attributes related to a specific stream in the SDP exchanged within SIP messages during a call. More...
 
LINPHONECXX_PUBLIC std::shared_ptr< linphone::CallParamscopy () const
 Copy an existing CallParams object to a new CallParams object. More...
 
LINPHONECXX_PUBLIC std::string getCustomHeader (const std::string &headerName) const
 Get a custom SIP header. More...
 
LINPHONECXX_PUBLIC std::string getCustomSdpAttribute (const std::string &attributeName) const
 Get a custom SDP attribute that is related to all the streams. More...
 
LINPHONECXX_PUBLIC std::string getCustomSdpMediaAttribute (linphone::StreamType type, const std::string &attributeName) const
 Get a custom SDP attribute that is related to a specific stream. More...
 

Detailed Description

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 nullptr 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 also
Call::getCurrentParams(), Call::getRemoteParams() and Call::getParams().

Member Function Documentation

◆ addCustomContent()

LINPHONECXX_PUBLIC void linphone::CallParams::addCustomContent ( const std::shared_ptr< linphone::Content > &  content)

Adds a Content to be added to the INVITE SDP.

Parameters
contentThe Content to be added.

◆ addCustomHeader()

LINPHONECXX_PUBLIC void linphone::CallParams::addCustomHeader ( const std::string &  headerName,
const std::string &  headerValue 
)

Add a custom SIP header in the INVITE for a call.

Parameters
headerValueThe content of the header to add.

◆ addCustomSdpAttribute()

LINPHONECXX_PUBLIC void linphone::CallParams::addCustomSdpAttribute ( const std::string &  attributeName,
const std::string &  attributeValue 
)

Add a custom attribute related to all the streams in the SDP exchanged within SIP messages during a call.

Parameters
attributeValueThe content value of the attribute to add.

◆ addCustomSdpMediaAttribute()

LINPHONECXX_PUBLIC void linphone::CallParams::addCustomSdpMediaAttribute ( linphone::StreamType  type,
const std::string &  attributeName,
const std::string &  attributeValue 
)

Add a custom attribute related to a specific stream in the SDP exchanged within SIP messages during a call.

Parameters
attributeValueThe content value of the attribute to add.

◆ audioEnabled()

LINPHONECXX_PUBLIC bool linphone::CallParams::audioEnabled ( ) const

Tell whether audio is enabled or not.

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

◆ audioMulticastEnabled()

LINPHONECXX_PUBLIC bool linphone::CallParams::audioMulticastEnabled ( ) const

Use to get multicast state of audio stream.

Returns
true if subsequent calls will propose multicast ip set by Core::setAudioMulticastAddr()

◆ clearCustomSdpMediaAttributes()

LINPHONECXX_PUBLIC void linphone::CallParams::clearCustomSdpMediaAttributes ( linphone::StreamType  type)

Clear the custom SDP attributes related to a specific stream in the SDP exchanged within SIP messages during a call.

Parameters
typeThe type of the stream to clear the custom SDP attributes from.

◆ copy()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::CallParams> linphone::CallParams::copy ( ) const

Copy an existing CallParams object to a new CallParams object.

Returns
A copy of the CallParams object.

◆ earlyMediaSendingEnabled()

LINPHONECXX_PUBLIC bool linphone::CallParams::earlyMediaSendingEnabled ( ) const

Indicate whether sending of early media was enabled.

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

◆ enableAudio()

LINPHONECXX_PUBLIC void linphone::CallParams::enableAudio ( bool  enabled)

Enable audio stream.

Parameters
enabledA boolean value telling whether to enable audio or not.

◆ enableAvpf()

LINPHONECXX_PUBLIC void linphone::CallParams::enableAvpf ( bool  enable)

Set the video stream direction.

Parameters
enablewether or not AVPF should be enabled for this call

◆ enableEarlyMediaSending()

LINPHONECXX_PUBLIC void linphone::CallParams::enableEarlyMediaSending ( bool  enabled)

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

Parameters
enabledA boolean value telling whether to enable early media sending or not.

◆ enableLowBandwidth()

LINPHONECXX_PUBLIC void linphone::CallParams::enableLowBandwidth ( bool  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
enabledA boolean value telling whether to activate the low bandwidth mode or not.

◆ enableRealtimeText()

LINPHONECXX_PUBLIC linphone::Status linphone::CallParams::enableRealtimeText ( bool  yesno)

Use to enable real time text following rfc4103.

If enabled, outgoing calls put a m=text line in SDP offer .

Parameters
yesnoif yes, subsequent outgoing calls will propose rtt
Returns
0

◆ enableRtpBundle()

LINPHONECXX_PUBLIC void linphone::CallParams::enableRtpBundle ( bool  value)

Enables or disables RTP bundle mode (Media Multiplexing).

See https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-54 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
valuea boolean to indicate whether the feature is to be enabled.

◆ enableVideo()

LINPHONECXX_PUBLIC void linphone::CallParams::enableVideo ( bool  enabled)

Enable video stream.

Parameters
enabledA boolean value telling whether to enable video or not.

◆ enableVideoMulticast()

LINPHONECXX_PUBLIC void linphone::CallParams::enableVideoMulticast ( bool  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
yesnoif yes, subsequent outgoing calls will propose multicast ip set by Core::setVideoMulticastAddr()

◆ getAudioDirection()

LINPHONECXX_PUBLIC linphone::MediaDirection linphone::CallParams::getAudioDirection ( ) const

Get the audio stream direction.

Returns
The audio stream MediaDirection associated with the call params.

◆ getCustomContents()

LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::Content> > linphone::CallParams::getCustomContents ( ) const

Gets a list of Content set if exists.

Returns
A list of Content set if exists, nullptr otherwise.

◆ getCustomHeader()

LINPHONECXX_PUBLIC std::string linphone::CallParams::getCustomHeader ( const std::string &  headerName) const

Get a custom SIP header.

Parameters
headerNameThe name of the header to get.
Returns
The content of the header or nullptr if not found.

◆ getCustomSdpAttribute()

LINPHONECXX_PUBLIC std::string linphone::CallParams::getCustomSdpAttribute ( const std::string &  attributeName) const

Get a custom SDP attribute that is related to all the streams.

Parameters
attributeNameThe name of the attribute to get.
Returns
The content value of the attribute or nullptr if not found.

◆ getCustomSdpMediaAttribute()

LINPHONECXX_PUBLIC std::string linphone::CallParams::getCustomSdpMediaAttribute ( linphone::StreamType  type,
const std::string &  attributeName 
) const

Get a custom SDP attribute that is related to a specific stream.

Parameters
attributeNameThe name of the attribute to get.
Returns
The content value of the attribute or nullptr if not found.

◆ getLocalConferenceMode()

LINPHONECXX_PUBLIC bool linphone::CallParams::getLocalConferenceMode ( ) const

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.

◆ getMediaEncryption()

LINPHONECXX_PUBLIC linphone::MediaEncryption linphone::CallParams::getMediaEncryption ( ) const

Get the kind of media encryption selected for the call.

Returns
The kind of MediaEncryption selected for the call.

◆ getPrivacy()

LINPHONECXX_PUBLIC unsigned int linphone::CallParams::getPrivacy ( ) const

Get requested level of privacy for the call.

Returns
The LinphonePrivacyMask used for the call.

◆ getProxyConfig()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::ProxyConfig> linphone::CallParams::getProxyConfig ( ) const

Get the ProxyConfig that is used for the call.

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

◆ getRealtimeTextKeepaliveInterval()

LINPHONECXX_PUBLIC unsigned int linphone::CallParams::getRealtimeTextKeepaliveInterval ( ) const

Use to get keep alive interval of real time text following rfc4103.

Returns
returns keep alive interval of real time text.

◆ getReceivedFramerate()

LINPHONECXX_PUBLIC float linphone::CallParams::getReceivedFramerate ( ) const

Get the framerate of the video that is received.

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

◆ getReceivedVideoDefinition()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::VideoDefinition> linphone::CallParams::getReceivedVideoDefinition ( ) const

Get the definition of the received video.

Returns
The received VideoDefinition or nullptr.

◆ getRecordFile()

LINPHONECXX_PUBLIC std::string linphone::CallParams::getRecordFile ( ) const

Get the path for the audio recording of the call.

Returns
The path to the audio recording of the call or nullptr.

◆ getRtpProfile()

LINPHONECXX_PUBLIC std::string linphone::CallParams::getRtpProfile ( ) const

Get the RTP profile being used.

Returns
The RTP profile.

◆ getSentFramerate()

LINPHONECXX_PUBLIC float linphone::CallParams::getSentFramerate ( ) const

Get the framerate of the video that is sent.

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

◆ getSentVideoDefinition()

LINPHONECXX_PUBLIC std::shared_ptr<const linphone::VideoDefinition> linphone::CallParams::getSentVideoDefinition ( ) const

Get the definition of the sent video.

Returns
The sent VideoDefinition or nullptr.

◆ getSessionName()

LINPHONECXX_PUBLIC std::string linphone::CallParams::getSessionName ( ) const

Get the session name of the media session (ie in SDP).

Subject from the SIP message can be retrieved using getCustomHeader() and is different.

Returns
The session name of the media session or nullptr.

◆ getUsedAudioPayloadType()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::PayloadType> linphone::CallParams::getUsedAudioPayloadType ( ) const

Get the audio payload type that has been selected by a call.

Returns
The selected PayloadType. nullptr is returned if no audio payload type has been selected by the call.

◆ getUsedTextPayloadType()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::PayloadType> linphone::CallParams::getUsedTextPayloadType ( ) const

Get the text payload type that has been selected by a call.

Returns
The selected PayloadType. nullptr is returned if no text payload type has been selected by the call.

◆ getUsedVideoPayloadType()

LINPHONECXX_PUBLIC std::shared_ptr<linphone::PayloadType> linphone::CallParams::getUsedVideoPayloadType ( ) const

Get the video payload type that has been selected by a call.

Returns
The selected PayloadType. nullptr is returned if no video payload type has been selected by the call.

◆ getVideoDirection()

LINPHONECXX_PUBLIC linphone::MediaDirection linphone::CallParams::getVideoDirection ( ) const

Get the video stream direction.

Returns
The video stream MediaDirection associated with the call params.

◆ lowBandwidthEnabled()

LINPHONECXX_PUBLIC bool linphone::CallParams::lowBandwidthEnabled ( ) const

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.

◆ realtimeTextEnabled()

LINPHONECXX_PUBLIC bool linphone::CallParams::realtimeTextEnabled ( ) const

Use to get real time text following rfc4103.

Returns
returns true if call rtt is activated.

◆ rtpBundleEnabled()

LINPHONECXX_PUBLIC bool linphone::CallParams::rtpBundleEnabled ( ) const

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

See https://tools.ietf.org/html/draft-ietf-mmusic-sdp-bundle-negotiation-54 for more information.

Returns
a boolean indicating the enablement of rtp bundle mode.

◆ setAudioBandwidthLimit()

LINPHONECXX_PUBLIC void linphone::CallParams::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
bandwidthThe audio bandwidth limit to set in kbit/s.

◆ setAudioDirection()

LINPHONECXX_PUBLIC void linphone::CallParams::setAudioDirection ( linphone::MediaDirection  direction)

Set the audio stream direction.

Parameters
directionThe audio stream MediaDirection associated with this call params.

◆ setMediaEncryption()

LINPHONECXX_PUBLIC void linphone::CallParams::setMediaEncryption ( linphone::MediaEncryption  encryption)

Set requested media encryption for a call.

Parameters
encryptionThe MediaEncryption to use for the call.

◆ setPrivacy()

LINPHONECXX_PUBLIC void linphone::CallParams::setPrivacy ( unsigned int  privacy)

Set requested level of privacy for the call.

Parameters
privacyThe LinphonePrivacyMask to used for the call.

◆ setProxyConfig()

LINPHONECXX_PUBLIC void linphone::CallParams::setProxyConfig ( const std::shared_ptr< linphone::ProxyConfig > &  proxyConfig)

Set the ProxyConfig to use for the call.

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

◆ setRealtimeTextKeepaliveInterval()

LINPHONECXX_PUBLIC void linphone::CallParams::setRealtimeTextKeepaliveInterval ( unsigned int  interval)

Use to set keep alive interval for real time text following rfc4103.

Parameters
intervalThe keep alive interval for real time text, 25000 by default.

◆ setRecordFile()

LINPHONECXX_PUBLIC void linphone::CallParams::setRecordFile ( const std::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
pathA 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.

◆ setSessionName()

LINPHONECXX_PUBLIC void linphone::CallParams::setSessionName ( const std::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
nameThe session name to be used.

◆ setVideoDirection()

LINPHONECXX_PUBLIC void linphone::CallParams::setVideoDirection ( linphone::MediaDirection  direction)

Set the video stream direction.

Parameters
directionThe video stream MediaDirection associated with this call params.

◆ videoEnabled()

LINPHONECXX_PUBLIC bool linphone::CallParams::videoEnabled ( ) const

Tell whether video is enabled or not.

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

◆ videoMulticastEnabled()

LINPHONECXX_PUBLIC bool linphone::CallParams::videoMulticastEnabled ( ) const

Use to get multicast state of video stream.

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

The documentation for this class was generated from the following file: