Liblinphone
5.3.0
|
This object represents a call issued or received by the Core. More...
#include <call.hh>
Public Types | |
enum | Status { Status::Success = 0, Status::Aborted = 1, Status::Missed = 2, Status::Declined = 3, Status::EarlyAborted = 4, Status::AcceptedElsewhere = 5, Status::DeclinedElsewhere = 6 } |
Enum representing the status of a call. More... | |
enum | Dir { Dir::Outgoing = 0, Dir::Incoming = 1 } |
Enum representing the direction of a call. More... | |
enum | State { State::Idle = 0, State::IncomingReceived = 1, State::PushIncomingReceived = 2, State::OutgoingInit = 3, State::OutgoingProgress = 4, State::OutgoingRinging = 5, State::OutgoingEarlyMedia = 6, State::Connected = 7, State::StreamsRunning = 8, State::Pausing = 9, State::Paused = 10, State::Resuming = 11, State::Referred = 12, State::Error = 13, State::End = 14, State::PausedByRemote = 15, State::UpdatedByRemote = 16, State::IncomingEarlyMedia = 17, State::Updating = 18, State::Released = 19, State::EarlyUpdatedByRemote = 20, State::EarlyUpdating = 21 } |
State enum represents the different states a call can reach into. More... | |
Public Member Functions | |
LINPHONECXX_PUBLIC | Call (void *ptr, bool takeRef=true) |
LINPHONECXX_PUBLIC _LinphoneCall * | cPtr () |
LINPHONECXX_PUBLIC void | addListener (const std::shared_ptr< CallListener > &listener) |
Add an application listener to the Call instance. More... | |
LINPHONECXX_PUBLIC void | removeListener (const std::shared_ptr< CallListener > &listener) |
Remove a previously added listener from the Call instance. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::CallStats > | getAudioStats () |
Returns a copy of the call statistics for the audio stream. More... | |
LINPHONECXX_PUBLIC std::string | getAuthenticationToken () |
Returns the ZRTP authentication token to verify. More... | |
LINPHONECXX_PUBLIC bool | getAuthenticationTokenVerified () const |
Returns whether ZRTP authentication token is verified. More... | |
LINPHONECXX_PUBLIC void | setAuthenticationTokenVerified (bool verified) |
Set the result of ZRTP short code verification by user. More... | |
LINPHONECXX_PUBLIC float | getAverageQuality () const |
Returns call quality averaged over all the duration of the call. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::CallLog > | getCallLog () const |
Gets the call log associated to this call. More... | |
LINPHONECXX_PUBLIC bool | cameraEnabled () const |
Returns if camera pictures are allowed to be sent to the remote party. More... | |
LINPHONECXX_PUBLIC void | enableCamera (bool enabled) |
Indicate whether camera input should be sent to remote end. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ChatRoom > | getChatRoom () |
Create a new chat room for real time messaging from a call if not already existing, else return existing one. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Conference > | getConference () const |
Return the associated conference object. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Core > | getCore () const |
Get the core that has created the specified call. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::CallParams > | getCurrentParams () const |
Returns current parameters associated to the call. More... | |
LINPHONECXX_PUBLIC float | getCurrentQuality () const |
Obtain real-time quality rating of the call. More... | |
LINPHONECXX_PUBLIC Dir | getDir () const |
Returns direction of the call (incoming or outgoing). More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getDiversionAddress () const |
Returns the diversion address associated to this call. More... | |
LINPHONECXX_PUBLIC int | getDuration () const |
Returns call's duration in seconds. More... | |
LINPHONECXX_PUBLIC bool | echoCancellationEnabled () const |
Returns if echo cancellation is enabled. More... | |
LINPHONECXX_PUBLIC void | enableEchoCancellation (bool enable) |
Enables or disable echo cancellation for this call. More... | |
LINPHONECXX_PUBLIC bool | echoLimiterEnabled () const |
Returns if echo limiter is enabled. More... | |
LINPHONECXX_PUBLIC void | enableEchoLimiter (bool enable) |
Enables or disable echo limiter for this call. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::ErrorInfo > | getErrorInfo () const |
Returns full details about call errors or termination reasons. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AudioDevice > | getInputAudioDevice () const |
Gets the current input device for this call. More... | |
LINPHONECXX_PUBLIC void | setInputAudioDevice (const std::shared_ptr< linphone::AudioDevice > &audioDevice) |
Sets the given AudioDevice as input for this call only. More... | |
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED bool | isRecording () |
Returns whether or not the call is currently being recorded. More... | |
LINPHONECXX_PUBLIC bool | getMicrophoneMuted () const |
Get microphone muted state. More... | |
LINPHONECXX_PUBLIC void | setMicrophoneMuted (bool muted) |
Set microphone muted state. More... | |
LINPHONECXX_PUBLIC float | getMicrophoneVolumeGain () const |
Get microphone volume gain. More... | |
LINPHONECXX_PUBLIC void | setMicrophoneVolumeGain (float volume) |
Set microphone volume gain. More... | |
LINPHONECXX_PUBLIC void * | getNativeVideoWindowId () const |
Get the native window handle of the video window, casted as an unsigned long. More... | |
LINPHONECXX_PUBLIC void | setNativeVideoWindowId (void *windowId) |
Set the native video window id where the video is to be displayed. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::AudioDevice > | getOutputAudioDevice () const |
Gets the current output device for this call. More... | |
LINPHONECXX_PUBLIC void | setOutputAudioDevice (const std::shared_ptr< linphone::AudioDevice > &audioDevice) |
Sets the given AudioDevice as output for this call only. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::CallParams > | getParams () const |
Returns local parameters associated with the call. More... | |
LINPHONECXX_PUBLIC void | setParams (const std::shared_ptr< const linphone::CallParams > ¶ms) |
Set call parameters - advanced and not recommended feature - use with caution. More... | |
LINPHONECXX_PUBLIC float | getPlayVolume () const |
Get the mesured playback volume level (received from remote) in dbm0. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Player > | getPlayer () |
Gets a player associated with the call to play a local file and stream it to the remote peer. More... | |
LINPHONECXX_PUBLIC linphone::Reason | getReason () const |
Returns the reason for a call termination (either error or normal termination) More... | |
LINPHONECXX_PUBLIC float | getRecordVolume () const |
Get the mesured record volume level (sent to remote) in dbm0. More... | |
LINPHONECXX_PUBLIC std::string | getReferTo () const |
Gets the refer-to uri (if the call was transfered). More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getRemoteAddress () const |
Returns the remote address associated to this call. More... | |
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::string | getRemoteAddressAsString () const |
Returns the remote address associated to this call as a string. More... | |
LINPHONECXX_PUBLIC std::string | getRemoteContact () |
Returns the far end's sip contact as a string, if available. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getRemoteContactAddress () |
Returns the far end's sip contact as an address, if available. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::CallParams > | getRemoteParams () const |
Returns call parameters proposed by remote. More... | |
LINPHONECXX_PUBLIC std::string | getRemoteUserAgent () |
Returns the far end's user agent description string, if available. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Call > | getReplacedCall () |
Returns the call object this call is replacing, if any. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getRequestAddress () const |
The address to which the call has been sent, taken directly from the SIP URI of the INVITE. More... | |
LINPHONECXX_PUBLIC bool | getSpeakerMuted () const |
Get speaker muted state. More... | |
LINPHONECXX_PUBLIC void | setSpeakerMuted (bool muted) |
Set speaker muted state. More... | |
LINPHONECXX_PUBLIC float | getSpeakerVolumeGain () const |
Get speaker volume gain. More... | |
LINPHONECXX_PUBLIC void | setSpeakerVolumeGain (float volume) |
Set speaker volume gain. More... | |
LINPHONECXX_PUBLIC State | getState () const |
Retrieves the call's current state. More... | |
LINPHONECXX_PUBLIC int | getStreamCount () const |
Returns the number of stream for the given call. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::CallStats > | getTextStats () |
Returns a copy of the call statistics for the text stream. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::Address > | getToAddress () const |
Returns the to address with its headers associated to this call. More... | |
LINPHONECXX_PUBLIC State | getTransferState () |
Returns the current transfer state, if a transfer has been initiated from this call. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Call > | getTransferTargetCall () const |
When this call has received a transfer request, returns the new call that was automatically created as a result of the transfer. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Call > | getTransfererCall () const |
Gets the transferer if this call was started automatically as a result of an incoming transfer request. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::VideoSourceDescriptor > | getVideoSource () const |
Gets the video source of a call. More... | |
LINPHONECXX_PUBLIC void | setVideoSource (const std::shared_ptr< const linphone::VideoSourceDescriptor > &descriptor) |
Sets the video source of a call. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::CallStats > | getVideoStats () |
Returns a copy of the call statistics for the video stream. More... | |
LINPHONECXX_PUBLIC linphone::Status | accept () |
Accept an incoming call. More... | |
LINPHONECXX_PUBLIC linphone::Status | acceptEarlyMedia () |
Accept an early media session for an incoming call. More... | |
LINPHONECXX_PUBLIC linphone::Status | acceptEarlyMediaWithParams (const std::shared_ptr< const linphone::CallParams > ¶ms) |
When receiving an incoming, accept to start a media session as early-media. More... | |
LINPHONECXX_PUBLIC linphone::Status | acceptUpdate (const std::shared_ptr< const linphone::CallParams > ¶ms) |
Accept call modifications initiated by other end. More... | |
LINPHONECXX_PUBLIC linphone::Status | acceptWithParams (const std::shared_ptr< const linphone::CallParams > ¶ms) |
Accept an incoming call, with parameters. More... | |
LINPHONECXX_PUBLIC bool | askedToAutoanswer () |
Tell whether a call has been asked to autoanswer. More... | |
LINPHONECXX_PUBLIC void | cancelDtmfs () |
Stop current DTMF sequence sending. More... | |
LINPHONECXX_PUBLIC void | confirmGoClear () const |
Method to be called after the user confirm that he/she is notifed of the on going Go Clear procedure. More... | |
LINPHONECXX_PUBLIC void * | createNativeVideoWindowId () const |
Create a native video window id where the video is to be displayed. More... | |
LINPHONECXX_PUBLIC linphone::Status | decline (linphone::Reason reason) |
Decline a pending incoming call, with a reason. More... | |
LINPHONECXX_PUBLIC int | declineWithErrorInfo (const std::shared_ptr< const linphone::ErrorInfo > &ei) |
Decline a pending incoming call, with a ErrorInfo object. More... | |
LINPHONECXX_PUBLIC linphone::Status | deferUpdate () |
When receiving a #LinphoneCallUpdatedByRemote state notification, prevent Core from performing an automatic answer. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::CallStats > | getStats (linphone::StreamType type) |
Returns a copy of the call statistics for a particular stream type. More... | |
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::string | getToHeader (const std::string &headerName) const |
Returns the value of the header name. More... | |
LINPHONECXX_PUBLIC bool | hasTransferPending () const |
Returns if this calls has received a transfer that has not been executed yet. More... | |
LINPHONECXX_PUBLIC bool | mediaInProgress () const |
Indicates whether an operation is in progress at the media side. More... | |
LINPHONECXX_PUBLIC void | notifyRinging () |
Starts the process of replying 180 Ringing. More... | |
LINPHONECXX_PUBLIC void | oglRender () const |
Calls generic OpenGL render for a given call. | |
LINPHONECXX_PUBLIC linphone::Status | pause () |
Pauses the call. More... | |
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED linphone::Status | redirect (const std::string &redirectUri) |
Redirect the specified call to the given redirect URI. More... | |
LINPHONECXX_PUBLIC linphone::Status | redirectTo (const std::shared_ptr< linphone::Address > &redirectAddress) |
Redirect the specified call to the given redirect Address. More... | |
LINPHONECXX_PUBLIC void | requestNotifyNextVideoFrameDecoded () |
Request the callback passed to linphone_call_cbs_set_next_video_frame_decoded to be called the next time the video decoder properly decodes a video frame. | |
LINPHONECXX_PUBLIC linphone::Status | resume () |
Resumes a call. More... | |
LINPHONECXX_PUBLIC linphone::Status | sendDtmf (char dtmf) |
Send the specified dtmf. More... | |
LINPHONECXX_PUBLIC linphone::Status | sendDtmfs (const std::string &dtmfs) |
Send a list of dtmf. More... | |
LINPHONECXX_PUBLIC linphone::Status | sendInfoMessage (const std::shared_ptr< const linphone::InfoMessage > &info) |
Sends an info message through an established call. More... | |
LINPHONECXX_PUBLIC void | sendVfuRequest () |
Request remote side to send us a Video Fast Update. | |
LINPHONECXX_PUBLIC void | startRecording () |
Starts call recording. More... | |
LINPHONECXX_PUBLIC void | stopRecording () |
Stops call recording. | |
LINPHONECXX_PUBLIC linphone::Status | takePreviewSnapshot (const std::string &filePath) |
Take a photo of currently captured video and write it into a jpeg file. More... | |
LINPHONECXX_PUBLIC linphone::Status | takeVideoSnapshot (const std::string &filePath) |
Take a photo of currently received video and write it into a jpeg file. More... | |
LINPHONECXX_PUBLIC linphone::Status | terminate () |
Terminates a call. More... | |
LINPHONECXX_PUBLIC linphone::Status | terminateWithErrorInfo (const std::shared_ptr< const linphone::ErrorInfo > &ei) |
Terminates a call. More... | |
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED linphone::Status | transfer (const std::string &referTo) |
Performs a simple call transfer to the specified destination. More... | |
LINPHONECXX_PUBLIC linphone::Status | transferTo (const std::shared_ptr< linphone::Address > &referTo) |
Performs a simple call transfer to the specified destination. More... | |
LINPHONECXX_PUBLIC linphone::Status | transferToAnother (const std::shared_ptr< linphone::Call > &dest) |
Transfers a call to destination of another running call. More... | |
LINPHONECXX_PUBLIC linphone::Status | update (const std::shared_ptr< const linphone::CallParams > ¶ms) |
Updates a running call according to supplied call parameters or parameters changed in the LinphoneCore. More... | |
LINPHONECXX_PUBLIC void | zoom (float zoomFactor, float cx, float cy) |
Perform a zoom of the video displayed during a call. More... | |
This object represents a call issued or received by the Core.
Linphone only allows at most one active call at any given time and it will be in State::StreamsRunning. However, if the core is locally hosting a Conference, you may have some or all the calls in the conference in State::StreamsRunning as well as an additional active call outside of the conference in State::StreamsRunning if the local participant of the Conference is not part of it. You can get the State of the call using getState(), it's current CallParams with getCurrentParams() and the latest statistics by calling getAudioStats() or getVideoStats().
|
strong |
|
strong |
State enum represents the different states a call can reach into.
Enumerator | |
---|---|
Idle | Initial state. |
IncomingReceived | Incoming call received. |
PushIncomingReceived | PushIncoming call received. |
OutgoingInit | Outgoing call initialized. |
OutgoingProgress | Outgoing call in progress. |
OutgoingRinging | Outgoing call ringing. |
OutgoingEarlyMedia | Outgoing call early media. |
Connected | Connected. |
StreamsRunning | Streams running. |
Pausing | Pausing. |
Paused | Paused. |
Resuming | Resuming. |
Referred | Referred. |
Error | Error. |
End | Call end. |
PausedByRemote | Paused by remote. |
UpdatedByRemote | The call's parameters are updated for example when video is asked by remote. |
IncomingEarlyMedia | We are proposing early media to an incoming call. |
Updating | We have initiated a call update. |
Released | The call object is now released. |
EarlyUpdatedByRemote | The call is updated by remote while not yet answered (SIP UPDATE in early dialog received) |
EarlyUpdating | We are updating the call while not yet answered (SIP UPDATE in early dialog sent) |
|
strong |
Enum representing the status of a call.
LINPHONECXX_PUBLIC linphone::Status linphone::Call::accept | ( | ) |
Accept an incoming call.
Basically the application is notified of incoming calls within the call_state_changed callback of the LinphoneCoreVTable structure, where it will receive a Dir::Incoming event with the associated Call object. The application can later accept the call using this method.
LINPHONECXX_PUBLIC linphone::Status linphone::Call::acceptEarlyMedia | ( | ) |
Accept an early media session for an incoming call.
This is identical as calling acceptEarlyMediaWithParams() with nullptr parameters.
LINPHONECXX_PUBLIC linphone::Status linphone::Call::acceptEarlyMediaWithParams | ( | const std::shared_ptr< const linphone::CallParams > & | params | ) |
When receiving an incoming, accept to start a media session as early-media.
This means the call is not accepted but audio & video streams can be established if the remote party supports early media. However, unlike after call acceptance, mic and camera input are not sent during early-media, though received audio & video are played normally. The call can then later be fully accepted using accept() or acceptWithParams().
params | The call parameters to use (can be nullptr). |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::acceptUpdate | ( | const std::shared_ptr< const linphone::CallParams > & | params | ) |
Accept call modifications initiated by other end.
This call may be performed in response to a #LinphoneCallUpdatedByRemote state notification. When such notification arrives, the application can decide to call deferUpdate() so that it can have the time to prompt the user. getRemoteParams() can be used to get information about the call parameters requested by the other party, such as whether a video stream is requested. When the user accepts or refuse the change, acceptUpdate() can be done to answer to the other party. If params is nullptr, then the same call parameters established before the update request will continue to be used (no change). If params is not nullptr, then the update will be accepted according to the parameters passed. Typical example is when a user accepts to start video, then params should indicate that video stream should be used (see CallParams::enableVideo()).
params | A CallParams object describing the call parameters to accept. |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::acceptWithParams | ( | const std::shared_ptr< const linphone::CallParams > & | params | ) |
Accept an incoming call, with parameters.
Basically the application is notified of incoming calls within the call_state_changed callback of the LinphoneCoreVTable structure, where it will receive a Dir::Incoming event with the associated Call object. The application can later accept the call using this method.
params | The specific parameters for this call, for example whether video is accepted or not. Use nullptr to use default parameters. |
LINPHONECXX_PUBLIC void linphone::Call::addListener | ( | const std::shared_ptr< CallListener > & | listener | ) |
Add an application listener to the Call instance.
listener | the application listener |
LINPHONECXX_PUBLIC bool linphone::Call::askedToAutoanswer | ( | ) |
Tell whether a call has been asked to autoanswer.
LINPHONECXX_PUBLIC bool linphone::Call::cameraEnabled | ( | ) | const |
Returns if camera pictures are allowed to be sent to the remote party.
LINPHONECXX_PUBLIC void linphone::Call::cancelDtmfs | ( | ) |
Stop current DTMF sequence sending.
Please note that some DTMF could be already sent, depending on when this function call is delayed from sendDtmfs(). This function will be automatically called if call state change to anything but LinphoneCallStreamsRunning.
LINPHONECXX_PUBLIC void linphone::Call::confirmGoClear | ( | ) | const |
Method to be called after the user confirm that he/she is notifed of the on going Go Clear procedure.
LINPHONECXX_PUBLIC void* linphone::Call::createNativeVideoWindowId | ( | ) | const |
Create a native video window id where the video is to be displayed.
LINPHONECXX_PUBLIC linphone::Status linphone::Call::decline | ( | linphone::Reason | reason | ) |
Decline a pending incoming call, with a reason.
reason | The reason for rejecting the call: Reason::Declined or Reason::Busy |
LINPHONECXX_PUBLIC int linphone::Call::declineWithErrorInfo | ( | const std::shared_ptr< const linphone::ErrorInfo > & | ei | ) |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::deferUpdate | ( | ) |
When receiving a #LinphoneCallUpdatedByRemote state notification, prevent Core from performing an automatic answer.
When receiving a #LinphoneCallUpdatedByRemote state notification (ie an incoming reINVITE), the default behaviour of Core is defined by the "defer_update_default" option of the "sip" section of the config. If this option is 0 (the default) then the Core automatically answers the reINIVTE with call parameters unchanged. However when for example when the remote party updated the call to propose a video stream, it can be useful to prompt the user before answering. This can be achieved by calling linphone_core_defer_call_update during the call state notification, to deactivate the automatic answer that would just confirm the audio but reject the video. Then, when the user responds to dialog prompt, it becomes possible to call acceptUpdate() to answer the reINVITE, with eventually video enabled in the CallParams argument. The #LinphoneCallUpdatedByRemote notification can also arrive when receiving an INVITE without SDP. In such case, an unchanged offer is made in the 200Ok, and when the ACK containing the SDP answer is received, #LinphoneCallUpdatedByRemote is triggered to notify the application of possible changes in the media session. However in such case defering the update has no meaning since we just generating an offer.
LINPHONECXX_PUBLIC bool linphone::Call::echoCancellationEnabled | ( | ) | const |
Returns if echo cancellation is enabled.
LINPHONECXX_PUBLIC bool linphone::Call::echoLimiterEnabled | ( | ) | const |
Returns if echo limiter is enabled.
LINPHONECXX_PUBLIC void linphone::Call::enableCamera | ( | bool | enabled | ) |
Indicate whether camera input should be sent to remote end.
enabled | wether or not to send local video stream. |
LINPHONECXX_PUBLIC void linphone::Call::enableEchoCancellation | ( | bool | enable | ) |
Enables or disable echo cancellation for this call.
enable | wether to enable echo cancellation or not. |
LINPHONECXX_PUBLIC void linphone::Call::enableEchoLimiter | ( | bool | enable | ) |
Enables or disable echo limiter for this call.
enable | wether to enable echo limiter or not. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::CallStats> linphone::Call::getAudioStats | ( | ) |
Returns a copy of the call statistics for the audio stream.
LINPHONECXX_PUBLIC std::string linphone::Call::getAuthenticationToken | ( | ) |
Returns the ZRTP authentication token to verify.
LINPHONECXX_PUBLIC bool linphone::Call::getAuthenticationTokenVerified | ( | ) | const |
Returns whether ZRTP authentication token is verified.
If not, it must be verified by users as described in ZRTP procedure. Once done, the application must inform of the results with setAuthenticationTokenVerified().
LINPHONECXX_PUBLIC float linphone::Call::getAverageQuality | ( | ) | const |
Returns call quality averaged over all the duration of the call.
See getCurrentQuality() for more details about quality measurement.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::CallLog> linphone::Call::getCallLog | ( | ) | const |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::ChatRoom> linphone::Call::getChatRoom | ( | ) |
Create a new chat room for real time messaging from a call if not already existing, else return existing one.
No reference is given to the caller: the chat room will be deleted when the call is ended.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Conference> linphone::Call::getConference | ( | ) | const |
Return the associated conference object.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Core> linphone::Call::getCore | ( | ) | const |
Get the core that has created the specified call.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::CallParams> linphone::Call::getCurrentParams | ( | ) | const |
Returns current parameters associated to the call.
LINPHONECXX_PUBLIC float linphone::Call::getCurrentQuality | ( | ) | const |
Obtain real-time quality rating of the call.
Based on local RTP statistics and RTCP feedback, a quality rating is computed and updated during all the duration of the call. This function returns its value at the time of the function call. It is expected that the rating is updated at least every 5 seconds or so. The rating is a floating point number comprised between 0 and 5. 4-5 = good quality 3-4 = average quality 2-3 = poor quality 1-2 = very poor quality 0-1 = can't be worse, mostly unusable
LINPHONECXX_PUBLIC Dir linphone::Call::getDir | ( | ) | const |
Returns direction of the call (incoming or outgoing).
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::Call::getDiversionAddress | ( | ) | const |
Returns the diversion address associated to this call.
LINPHONECXX_PUBLIC int linphone::Call::getDuration | ( | ) | const |
Returns call's duration in seconds.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::ErrorInfo> linphone::Call::getErrorInfo | ( | ) | const |
Returns full details about call errors or termination reasons.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::AudioDevice> linphone::Call::getInputAudioDevice | ( | ) | const |
Gets the current input device for this call.
LINPHONECXX_PUBLIC bool linphone::Call::getMicrophoneMuted | ( | ) | const |
Get microphone muted state.
Note that the microphone may be disabled globally if false was given to Core::enableMic().
LINPHONECXX_PUBLIC float linphone::Call::getMicrophoneVolumeGain | ( | ) | const |
Get microphone volume gain.
If the sound backend supports it, the returned gain is equal to the gain set with the system mixer.
LINPHONECXX_PUBLIC void* linphone::Call::getNativeVideoWindowId | ( | ) | const |
Get the native window handle of the video window, casted as an unsigned long.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::AudioDevice> linphone::Call::getOutputAudioDevice | ( | ) | const |
Gets the current output device for this call.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::CallParams> linphone::Call::getParams | ( | ) | const |
Returns local parameters associated with the call.
This is typically the parameters passed at call initiation to Core::inviteAddressWithParams() or acceptWithParams(), or some default parameters if no CallParams was explicitely passed during call initiation.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Player> linphone::Call::getPlayer | ( | ) |
Gets a player associated with the call to play a local file and stream it to the remote peer.
LINPHONECXX_PUBLIC float linphone::Call::getPlayVolume | ( | ) | const |
Get the mesured playback volume level (received from remote) in dbm0.
LINPHONECXX_PUBLIC linphone::Reason linphone::Call::getReason | ( | ) | const |
Returns the reason for a call termination (either error or normal termination)
LINPHONECXX_PUBLIC float linphone::Call::getRecordVolume | ( | ) | const |
Get the mesured record volume level (sent to remote) in dbm0.
LINPHONECXX_PUBLIC std::string linphone::Call::getReferTo | ( | ) | const |
Gets the refer-to uri (if the call was transfered).
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::Call::getRemoteAddress | ( | ) | const |
Returns the remote address associated to this call.
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::string linphone::Call::getRemoteAddressAsString | ( | ) | const |
Returns the remote address associated to this call as a string.
The result string must be freed by user using ms_free().
LINPHONECXX_PUBLIC std::string linphone::Call::getRemoteContact | ( | ) |
Returns the far end's sip contact as a string, if available.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::Call::getRemoteContactAddress | ( | ) |
Returns the far end's sip contact as an address, if available.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::CallParams> linphone::Call::getRemoteParams | ( | ) | const |
Returns call parameters proposed by remote.
This is useful when receiving an incoming call, to know whether the remote party supports video, encryption or whatever.
LINPHONECXX_PUBLIC std::string linphone::Call::getRemoteUserAgent | ( | ) |
Returns the far end's user agent description string, if available.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Call> linphone::Call::getReplacedCall | ( | ) |
Returns the call object this call is replacing, if any.
Call replacement can occur during call transfers. By default, the core automatically terminates the replaced call and accept the new one. This function allows the application to know whether a new incoming call is a one that replaces another one.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::Call::getRequestAddress | ( | ) | const |
The address to which the call has been sent, taken directly from the SIP URI of the INVITE.
Usually equal to the To field, except when e.g. using a fallback contact address. You should probably use getToAddress() instead, unless you know what you're doing.
LINPHONECXX_PUBLIC bool linphone::Call::getSpeakerMuted | ( | ) | const |
Get speaker muted state.
LINPHONECXX_PUBLIC float linphone::Call::getSpeakerVolumeGain | ( | ) | const |
Get speaker volume gain.
If the sound backend supports it, the returned gain is equal to the gain set with the system mixer.
LINPHONECXX_PUBLIC State linphone::Call::getState | ( | ) | const |
Retrieves the call's current state.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::CallStats> linphone::Call::getStats | ( | linphone::StreamType | type | ) |
Returns a copy of the call statistics for a particular stream type.
type | the StreamType |
LINPHONECXX_PUBLIC int linphone::Call::getStreamCount | ( | ) | const |
Returns the number of stream for the given call.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::CallStats> linphone::Call::getTextStats | ( | ) |
Returns a copy of the call statistics for the text stream.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::Address> linphone::Call::getToAddress | ( | ) | const |
Returns the to address with its headers associated to this call.
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED std::string linphone::Call::getToHeader | ( | const std::string & | headerName | ) | const |
Returns the value of the header name.
headerName | the name of the header to check. |
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Call> linphone::Call::getTransfererCall | ( | ) | const |
Gets the transferer if this call was started automatically as a result of an incoming transfer request.
The call in which the transfer request was received is returned in this case.
LINPHONECXX_PUBLIC State linphone::Call::getTransferState | ( | ) |
Returns the current transfer state, if a transfer has been initiated from this call.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::Call> linphone::Call::getTransferTargetCall | ( | ) | const |
When this call has received a transfer request, returns the new call that was automatically created as a result of the transfer.
LINPHONECXX_PUBLIC std::shared_ptr<const linphone::VideoSourceDescriptor> linphone::Call::getVideoSource | ( | ) | const |
Gets the video source of a call.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::CallStats> linphone::Call::getVideoStats | ( | ) |
Returns a copy of the call statistics for the video stream.
LINPHONECXX_PUBLIC bool linphone::Call::hasTransferPending | ( | ) | const |
Returns if this calls has received a transfer that has not been executed yet.
Pending transfers are executed when this call is being paused or closed, locally or by remote endpoint. If the call is already paused while receiving the transfer request, the transfer immediately occurs.
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED bool linphone::Call::isRecording | ( | ) |
Returns whether or not the call is currently being recorded.
LINPHONECXX_PUBLIC bool linphone::Call::mediaInProgress | ( | ) | const |
Indicates whether an operation is in progress at the media side.
It can be a bad idea to initiate signaling operations (adding video, pausing the call, removing video, changing video parameters) while the media is busy in establishing the connection (typically ICE connectivity checks). It can result in failures generating loss of time in future operations in the call. Applications are invited to check this function after each call state change to decide whether certain operations are permitted or not.
LINPHONECXX_PUBLIC void linphone::Call::notifyRinging | ( | ) |
Starts the process of replying 180 Ringing.
This function is used in conjonction with Core::enableAutoSendRinging(). If the automatic sending of the 180 Ringing is disabled, this function needs to be called manually before the call timeouts.
LINPHONECXX_PUBLIC linphone::Status linphone::Call::pause | ( | ) |
Pauses the call.
If a music file has been setup using Core::setPlayFile(), this file will be played to the remote user. The only way to resume a paused call is to call resume().
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED linphone::Status linphone::Call::redirect | ( | const std::string & | redirectUri | ) |
Redirect the specified call to the given redirect URI.
redirectUri | The URI to redirect the call to |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::redirectTo | ( | const std::shared_ptr< linphone::Address > & | redirectAddress | ) |
LINPHONECXX_PUBLIC void linphone::Call::removeListener | ( | const std::shared_ptr< CallListener > & | listener | ) |
Remove a previously added listener from the Call instance.
listener | the application listener |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::resume | ( | ) |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::sendDtmf | ( | char | dtmf | ) |
Send the specified dtmf.
The dtmf is automatically played to the user.
dtmf | The dtmf name specified as a char, such as '0', '#' etc... |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::sendDtmfs | ( | const std::string & | dtmfs | ) |
Send a list of dtmf.
The dtmfs are automatically sent to remote, separated by some needed customizable delay. Sending is canceled if the call state changes to something not LinphoneCallStreamsRunning.
dtmfs | A dtmf sequence such as '123#123123' |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::sendInfoMessage | ( | const std::shared_ptr< const linphone::InfoMessage > & | info | ) |
Sends an info message through an established call.
info | the InfoMessage to send |
LINPHONECXX_PUBLIC void linphone::Call::setAuthenticationTokenVerified | ( | bool | verified | ) |
Set the result of ZRTP short code verification by user.
If remote party also does the same, it will update the ZRTP cache so that user's verification will not be required for the two users.
verified | whether the ZRTP SAS is verified. |
LINPHONECXX_PUBLIC void linphone::Call::setInputAudioDevice | ( | const std::shared_ptr< linphone::AudioDevice > & | audioDevice | ) |
Sets the given AudioDevice as input for this call only.
audioDevice | The AudioDevice. nullptr does nothing. |
LINPHONECXX_PUBLIC void linphone::Call::setMicrophoneMuted | ( | bool | muted | ) |
Set microphone muted state.
The boolean value given is applied logical-and with the value given to Core::enableMic().
muted | The microphone muted state. |
LINPHONECXX_PUBLIC void linphone::Call::setMicrophoneVolumeGain | ( | float | volume | ) |
Set microphone volume gain.
If the sound backend supports it, the new gain will synchronized with the system mixer.
volume | Percentage of the max supported gain. Valid values are in [ 0.0 : 1.0 ]. |
LINPHONECXX_PUBLIC void linphone::Call::setNativeVideoWindowId | ( | void * | windowId | ) |
Set the native video window id where the video is to be displayed.
For MacOS, Linux, Windows: if not set or 0 a window will be automatically created, unless the special id -1 is given.
windowId | the native video window id. |
LINPHONECXX_PUBLIC void linphone::Call::setOutputAudioDevice | ( | const std::shared_ptr< linphone::AudioDevice > & | audioDevice | ) |
Sets the given AudioDevice as output for this call only.
audioDevice | The AudioDevice. nullptr does nothing. |
LINPHONECXX_PUBLIC void linphone::Call::setParams | ( | const std::shared_ptr< const linphone::CallParams > & | params | ) |
Set call parameters - advanced and not recommended feature - use with caution.
Local call parameters applicable to an outgoing or incoming shall usually be passed to Core::inviteAddressWithParams() or acceptWithParams(). However, in some cases it might be desirable from a software design standpoint to modify local parameters outside of the application layer, typically in the purpose of implementing a custom logic including special headers in INVITE or 200Ok requests, driven by a call_state_changed listener method. This function accepts to assign a new CallParams only in #LinphoneCallOutgoingInit and #LinphoneCallIncomingReceived states.
params | the CallParams object |
LINPHONECXX_PUBLIC void linphone::Call::setSpeakerMuted | ( | bool | muted | ) |
Set speaker muted state.
muted | The speaker muted state. |
LINPHONECXX_PUBLIC void linphone::Call::setSpeakerVolumeGain | ( | float | volume | ) |
Set speaker volume gain.
If the sound backend supports it, the new gain will synchronized with the system mixer.
volume | Percentage of the max supported gain. Valid values are in [ 0.0 : 1.0 ]. |
LINPHONECXX_PUBLIC void linphone::Call::setVideoSource | ( | const std::shared_ptr< const linphone::VideoSourceDescriptor > & | descriptor | ) |
Sets the video source of a call.
descriptor | The VideoSourceDescriptor describing the video source to set |
LINPHONECXX_PUBLIC void linphone::Call::startRecording | ( | ) |
Starts call recording.
Video record is only available if this function is called in state StreamRunning. The output file where audio is recorded must be previously specified with CallParams::setRecordFile().
LINPHONECXX_PUBLIC linphone::Status linphone::Call::takePreviewSnapshot | ( | const std::string & | filePath | ) |
Take a photo of currently captured video and write it into a jpeg file.
Note that the snapshot is asynchronous, an application shall not assume that the file is created when the function returns.
filePath | a path where to write the jpeg content. |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::takeVideoSnapshot | ( | const std::string & | filePath | ) |
Take a photo of currently received video and write it into a jpeg file.
Note that the snapshot is asynchronous, an application shall not assume that the file is created when the function returns.
filePath | a path where to write the jpeg content. |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::terminate | ( | ) |
Terminates a call.
LINPHONECXX_PUBLIC linphone::Status linphone::Call::terminateWithErrorInfo | ( | const std::shared_ptr< const linphone::ErrorInfo > & | ei | ) |
LINPHONECXX_PUBLIC LINPHONECXX_DEPRECATED linphone::Status linphone::Call::transfer | ( | const std::string & | referTo | ) |
Performs a simple call transfer to the specified destination.
The remote endpoint is expected to issue a new call to the specified destination. The current call remains active and thus can be later paused or terminated. It is possible to follow the progress of the transfer provided that transferee sends notification about it. In this case, the transfer_state_changed callback of the LinphoneCoreVTable is invoked to notify of the state of the new call at the other party. The notified states are #LinphoneCallOutgoingInit , #LinphoneCallOutgoingProgress, #LinphoneCallOutgoingRinging and #LinphoneCallConnected.
referTo | The destination the call is to be refered to. |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::transferTo | ( | const std::shared_ptr< linphone::Address > & | referTo | ) |
Performs a simple call transfer to the specified destination.
The remote endpoint is expected to issue a new call to the specified destination. The current call remains active and thus can be later paused or terminated. It is possible to follow the progress of the transfer provided that transferee sends notification about it. In this case, the transfer_state_changed callback of the LinphoneCoreVTable is invoked to notify of the state of the new call at the other party. The notified states are #LinphoneCallOutgoingInit , #LinphoneCallOutgoingProgress, #LinphoneCallOutgoingRinging and #LinphoneCallConnected.
referTo | The Address the call is to be refered to. |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::transferToAnother | ( | const std::shared_ptr< linphone::Call > & | dest | ) |
Transfers a call to destination of another running call.
This is used for "attended transfer" scenarios. The transfered call is supposed to be in paused state, so that it is able to accept the transfer immediately. The destination call is a call previously established to introduce the transfered person. This method will send a transfer request to the transfered person. The phone of the transfered is then expected to automatically call to the destination of the transfer. The receiver of the transfer will then automatically close the call with us (the 'dest' call). It is possible to follow the progress of the transfer provided that transferee sends notification about it. In this case, the transfer_state_changed callback of the LinphoneCoreVTable is invoked to notify of the state of the new call at the other party. The notified states are #LinphoneCallOutgoingInit , #LinphoneCallOutgoingProgress, #LinphoneCallOutgoingRinging and #LinphoneCallConnected.
dest | A running call whose remote person will receive the transfer |
LINPHONECXX_PUBLIC linphone::Status linphone::Call::update | ( | const std::shared_ptr< const linphone::CallParams > & | params | ) |
Updates a running call according to supplied call parameters or parameters changed in the LinphoneCore.
It triggers a SIP reINVITE in order to perform a new offer/answer of media capabilities. Changing the size of the transmitted video after calling linphone_core_set_preferred_video_size can be used by passing nullptr as params argument. In case no changes are requested through the CallParams argument, then this argument can be omitted and set to nullptr. WARNING: Updating a call in the #LinphoneCallPaused state will still result in a paused call even if the media directions set in the params are sendrecv. To resume a paused call, you need to call resume().
params | The new call parameters to use (may be nullptr). |
LINPHONECXX_PUBLIC void linphone::Call::zoom | ( | float | zoomFactor, |
float | cx, | ||
float | cy | ||
) |
Perform a zoom of the video displayed during a call.
The zoom ensures that all the screen is fullfilled with the video.
zoomFactor | a floating point number describing the zoom factor. A value 1.0 corresponds to no zoom applied. |
cx | a floating point number pointing the horizontal center of the zoom to be applied. This value should be between 0.0 and 1.0. |
cy | a floating point number pointing the vertical center of the zoom to be applied. This value should be between 0.0 and 1.0. |