Liblinphone
4.5.0
|
An object containing various parameters of a Call. More...
#include <call_params.hh>
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::ProxyConfig > | getProxyConfig () 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::VideoDefinition > | getReceivedVideoDefinition () 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::VideoDefinition > | getSentVideoDefinition () 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::PayloadType > | getUsedAudioPayloadType () const |
Get the audio payload type that has been selected by a call. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::PayloadType > | getUsedTextPayloadType () const |
Get the text payload type that has been selected by a call. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::PayloadType > | getUsedVideoPayloadType () 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::CallParams > | copy () 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... | |
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.
LINPHONECXX_PUBLIC void linphone::CallParams::addCustomContent | ( | const std::shared_ptr< linphone::Content > & | content | ) |
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.
headerValue | The content of the header to add. |
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.
attributeValue | The content value of the attribute to add. |
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.
attributeValue | The content value of the attribute to add. |
LINPHONECXX_PUBLIC bool linphone::CallParams::audioEnabled | ( | ) | const |
Tell whether audio is enabled or not.
LINPHONECXX_PUBLIC bool linphone::CallParams::audioMulticastEnabled | ( | ) | const |
Use to get multicast state of audio stream.
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.
type | The type of the stream to clear the custom SDP attributes from. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::CallParams> linphone::CallParams::copy | ( | ) | const |
Copy an existing CallParams object to a new CallParams object.
LINPHONECXX_PUBLIC bool linphone::CallParams::earlyMediaSendingEnabled | ( | ) | const |
Indicate whether sending of early media was enabled.
LINPHONECXX_PUBLIC void linphone::CallParams::enableAudio | ( | bool | enabled | ) |
Enable audio stream.
enabled | A boolean value telling whether to enable audio or not. |
LINPHONECXX_PUBLIC void linphone::CallParams::enableAvpf | ( | bool | enable | ) |
Set the video stream direction.
enable | wether or not AVPF should be enabled for this call |
LINPHONECXX_PUBLIC void linphone::CallParams::enableEarlyMediaSending | ( | bool | enabled | ) |
Enable sending of real early media (during outgoing calls).
enabled | A boolean value telling whether to enable early media sending or not. |
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.
enabled | A boolean value telling whether to activate the low bandwidth mode or not. |
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 .
yesno | if yes, subsequent outgoing calls will propose rtt |
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.
value | a boolean to indicate whether the feature is to be enabled. |
LINPHONECXX_PUBLIC void linphone::CallParams::enableVideo | ( | bool | enabled | ) |
Enable video stream.
enabled | A boolean value telling whether to enable video or not. |
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.
yesno | if yes, subsequent outgoing calls will propose multicast ip set by Core::setVideoMulticastAddr() |
LINPHONECXX_PUBLIC linphone::MediaDirection linphone::CallParams::getAudioDirection | ( | ) | const |
Get the audio stream direction.
LINPHONECXX_PUBLIC std::list<std::shared_ptr<linphone::Content> > linphone::CallParams::getCustomContents | ( | ) | const |
LINPHONECXX_PUBLIC std::string linphone::CallParams::getCustomHeader | ( | const std::string & | headerName | ) | const |
Get a custom SIP header.
headerName | The name of the header to get. |
LINPHONECXX_PUBLIC std::string linphone::CallParams::getCustomSdpAttribute | ( | const std::string & | attributeName | ) | const |
Get a custom SDP attribute that is related to all the streams.
attributeName | The name of the attribute to get. |
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.
attributeName | The name of the attribute to get. |
LINPHONECXX_PUBLIC bool linphone::CallParams::getLocalConferenceMode | ( | ) | const |
Tell whether the call is part of the locally managed conference.
LINPHONECXX_PUBLIC linphone::MediaEncryption linphone::CallParams::getMediaEncryption | ( | ) | const |
Get the kind of media encryption selected for the call.
LINPHONECXX_PUBLIC unsigned int linphone::CallParams::getPrivacy | ( | ) | const |
Get requested level of privacy for the call.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::ProxyConfig> linphone::CallParams::getProxyConfig | ( | ) | const |
Get the ProxyConfig that is used for the call.
LINPHONECXX_PUBLIC unsigned int linphone::CallParams::getRealtimeTextKeepaliveInterval | ( | ) | const |
Use to get keep alive interval of real time text following rfc4103.
LINPHONECXX_PUBLIC float linphone::CallParams::getReceivedFramerate | ( | ) | const |
Get the framerate of the video that is received.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::VideoDefinition> linphone::CallParams::getReceivedVideoDefinition | ( | ) | const |
Get the definition of the received video.
LINPHONECXX_PUBLIC std::string linphone::CallParams::getRecordFile | ( | ) | const |
Get the path for the audio recording of the call.
LINPHONECXX_PUBLIC std::string linphone::CallParams::getRtpProfile | ( | ) | const |
Get the RTP profile being used.
LINPHONECXX_PUBLIC float linphone::CallParams::getSentFramerate | ( | ) | const |
Get the framerate of the video that is sent.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::VideoDefinition> linphone::CallParams::getSentVideoDefinition | ( | ) | const |
Get the definition of the sent video.
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.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::PayloadType> linphone::CallParams::getUsedAudioPayloadType | ( | ) | const |
Get the audio payload type that has been selected by a call.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::PayloadType> linphone::CallParams::getUsedTextPayloadType | ( | ) | const |
Get the text payload type that has been selected by a call.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::PayloadType> linphone::CallParams::getUsedVideoPayloadType | ( | ) | const |
Get the video payload type that has been selected by a call.
LINPHONECXX_PUBLIC linphone::MediaDirection linphone::CallParams::getVideoDirection | ( | ) | const |
Get the video stream direction.
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.
LINPHONECXX_PUBLIC bool linphone::CallParams::realtimeTextEnabled | ( | ) | const |
Use to get real time text following rfc4103.
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.
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.
bandwidth | The audio bandwidth limit to set in kbit/s. |
LINPHONECXX_PUBLIC void linphone::CallParams::setAudioDirection | ( | linphone::MediaDirection | direction | ) |
Set the audio stream direction.
direction | The audio stream MediaDirection associated with this call params. |
LINPHONECXX_PUBLIC void linphone::CallParams::setMediaEncryption | ( | linphone::MediaEncryption | encryption | ) |
Set requested media encryption for a call.
encryption | The MediaEncryption to use for the call. |
LINPHONECXX_PUBLIC void linphone::CallParams::setPrivacy | ( | unsigned int | privacy | ) |
Set requested level of privacy for the call.
privacy | The LinphonePrivacyMask to used for the call. |
LINPHONECXX_PUBLIC void linphone::CallParams::setProxyConfig | ( | const std::shared_ptr< linphone::ProxyConfig > & | proxyConfig | ) |
Set the ProxyConfig to use for the call.
proxyConfig | The ProxyConfig to use, or nullptr if none has been selected. The CallParams keep a reference on it and remove the older if it exists. |
LINPHONECXX_PUBLIC void linphone::CallParams::setRealtimeTextKeepaliveInterval | ( | unsigned int | interval | ) |
Use to set keep alive interval for real time text following rfc4103.
interval | The keep alive interval for real time text, 25000 by default. |
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().
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. |
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().
name | The session name to be used. |
LINPHONECXX_PUBLIC void linphone::CallParams::setVideoDirection | ( | linphone::MediaDirection | direction | ) |
Set the video stream direction.
direction | The video stream MediaDirection associated with this call params. |
LINPHONECXX_PUBLIC bool linphone::CallParams::videoEnabled | ( | ) | const |
Tell whether video is enabled or not.
LINPHONECXX_PUBLIC bool linphone::CallParams::videoMulticastEnabled | ( | ) | const |
Use to get multicast state of video stream.