Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::SIPCall Class Reference

#include <sipcall.h>

Inheritance diagram for jami::SIPCall:
Inheritance graph
Collaboration diagram for jami::SIPCall:
Collaboration graph

Classes

struct  InvSessionDeleter
 The invite session to be reused in case of transfer. More...
 
struct  RtpStream
 

Public Member Functions

void addLocalIceAttributes ()
 
void answer () override
 Answer the call.
 
void answer (const std::vector< libjami::MediaMap > &mediaList) override
 Answer a call with a list of media attributes.
 
void answerMediaChangeRequest (const std::vector< libjami::MediaMap > &mediaList, bool isRemote=false) override
 Answer to a media update request.
 
bool attendedTransfer (const std::string &to) override
 Attended transfer.
 
void carryingDTMFdigits (char code) override
 Send DTMF.
 
bool checkMediaChangeRequest (const std::vector< libjami::MediaMap > &remoteMediaList) override
 Check the media of an incoming media change request.
 
bool createIceMediaTransport (bool isReinvite)
 
std::vector< libjami::MediaMapcurrentMediaList () const override
 Retrieve current medias list.
 
void enterConference (std::shared_ptr< Conference > conference) override
 
void exitConference () override
 
std::shared_ptr< SystemCodecInfogetAudioCodec () const override
 
std::map< std::string, boolgetAudioStreams () const override
 
const std::string & getContactHeader () const
 
std::map< std::string, std::string > getDetails () const override
 
std::shared_ptr< dhtnet::IceTransport > getIceMedia () const
 
LinkType getLinkType () const override
 
std::vector< std::string > getLocalIceCandidates (unsigned compId) const
 
std::vector< MediaAttributegetMediaAttributeList () const override
 
std::vector< std::shared_ptr< RtpSession > > getRtpSessionList (MediaType type=MediaType::MEDIA_ALL) const
 
const std::vector< RtpStream > & getRtpStreams () const
 
SdpgetSDP ()
 Return the SDP's manager of this call.
 
std::shared_ptr< SIPAccountBasegetSIPAccount () const
 
SipTransportgetTransport ()
 
std::shared_ptr< SystemCodecInfogetVideoCodec () const override
 
void handleMediaChangeRequest (const std::vector< libjami::MediaMap > &remoteMediaList) override
 Process incoming media change request.
 
void hangup (int reason) override
 Hang up the call.
 
bool hasVideo () const override
 
bool initIceMediaTransport (bool master, std::optional< dhtnet::IceTransportOptions > options=std::nullopt)
 
bool isCaptureDeviceMuted (const MediaType &mediaType) const override
 
bool isIceEnabled () const override
 Check wether ICE is enabled for media.
 
bool isSipMethodAllowedByPeer (const std::string_view method) const
 Check if a SIP method is allowed by peer.
 
bool isSrtpEnabled () const
 
void monitor () const override
 
void muteMedia (const std::string &mediaType, bool isMuted) override
 mute/unmute a media of a call
 
bool offhold (OnReadyCb &&cb) override
 Resume a call from hold state.
 
void onAnswered ()
 Peer answered the call.
 
void onBusyHere ()
 Peer answered busy.
 
void onClosed ()
 Peer closed the connection.
 
void onFailure (signed cause=0)
 Called to report server/internal errors.
 
bool onhold (OnReadyCb &&cb) override
 Put a call on hold.
 
void onMediaNegotiationComplete ()
 Called when the media negotiation (SDP offer/answer) has completed.
 
void onPeerRinging ()
 Call is in ringing state on peer's side.
 
void onReceiveOfferIn200OK (const pjmedia_sdp_session *offer)
 
pj_status_t onReceiveReinvite (const pjmedia_sdp_session *offer, pjsip_rx_data *rdata)
 
void peerHungup () override
 Peer has hung up a call.
 
void peerMuted (bool state, int streamIdx) override
 
void peerRecording (bool state) override
 
std::string_view peerUri () const
 
void peerVoice (bool state) override
 
void refuse () override
 Refuse incoming call.
 
bool remoteHasValidIceAttributes () const
 
void removeCall () override
 
void reportMediaNegotiationStatus ()
 Announce to the client that medias are successfully negotiated.
 
void requestKeyframe (int streamIdx=-1)
 
bool requestMediaChange (const std::vector< libjami::MediaMap > &mediaList) override
 Make a change request of the current media with the provided media.
 
void restartMediaSender () override
 
void sendKeyframe (int streamIdx=-1) override
 
void sendSIPInfo (std::string_view body, std::string_view subtype)
 
void sendTextMessage (const std::map< std::string, std::string > &messages, const std::string &from) override
 Send a message to a call identified by its callid.
 
void setActiveMediaStream (const std::string &accountUri, const std::string &deviceId, const std::string &streamId, const bool &state)
 
void setIceMedia (std::shared_ptr< dhtnet::IceTransport > ice, bool isReinvite=false)
 
void setInviteSession (pjsip_inv_session *inviteSession=nullptr)
 
void setPeerAllowMethods (std::vector< std::string > methods)
 Set peer's allowed methods.
 
void setPeerRegisteredName (const std::string &name)
 
void setPeerUaVersion (std::string_view ua)
 Set peer's User-Agent found in the message header.
 
void setPeerUri (const std::string &peerUri)
 
void setSipTransport (const std::shared_ptr< SipTransport > &transport, const std::string &contactHdr={})
 
void setupIceResponse (bool isReinvite=false)
 Setup ICE locally to answer to an ICE offer.
 
 SIPCall (const std::shared_ptr< SIPAccountBase > &account, const std::string &id, Call::CallType type, const std::vector< libjami::MediaMap > &mediaList)
 Constructor.
 
void switchInput (const std::string &resource={}) override
 
void switchToIceReinviteIfNeeded ()
 
void terminateSipSession (int status)
 
bool toggleRecording () override
 This method must be implemented for this interface as calls and conferences have different behavior.
 
void transfer (const std::string &to) override
 Transfer a call to specified URI.
 
void updateRecState (bool state) override
 Update recording state.
 
std::weak_ptr< SIPCallweak ()
 
std::weak_ptr< const SIPCallweak () const
 
 ~SIPCall ()
 Destructor.
 
- Public Member Functions inherited from jami::Call
void addStateListener (StateListenerCb &&listener)
 
void addSubCall (Call &call)
 Attach subcall to this instance.
 
int conferenceProtocolVersion () const
 
std::weak_ptr< AccountgetAccount () const
 
std::string getAccountId () const
 
std::chrono::milliseconds getCallDuration () const
 
const std::string & getCallId () const
 Return a reference on the call id.
 
CallType getCallType () const
 
std::shared_ptr< ConferencegetConference () const
 Return a reference on the conference id.
 
std::vector< std::map< std::string, std::string > > getConferenceInfos () const
 
ConnectionState getConnectionState () const
 Get the connection state of the call (protected by mutex)
 
const std::string & getPeerDisplayName () const
 Get the peer display name (caller in ingoing) not protected by mutex (when created)
 
const std::string & getPeerNumber () const
 Get the peer number (destination on outgoing) not protected by mutex (when created)
 
CallState getState () const
 Get the call state of the call (protected by mutex)
 
std::string getStateStr () const
 
bool isConferenceParticipant () const
 
bool isIncoming () const
 Tell if the call is incoming.
 
bool isSubcall () const
 Return true if this call instance is a subcall (internal call for multi-device handling)
 
void onTextMessage (std::map< std::string, std::string > &&messages)
 
void resetConfInfo ()
 
void sendConfInfo (const std::string &json)
 
void sendConfOrder (const Json::Value &root)
 
void setConferenceInfo (const std::string &msg)
 A Call can be in a conference.
 
void setIPToIP (bool IPToIP)
 
void setPeerDisplayName (const std::string &name)
 Set the display name (caller in ingoing) not protected by mutex (when created)
 
void setPeerNumber (const std::string &number)
 Set the peer number (destination on outgoing) not protected by mutex (when created)
 
bool setState (CallState call_state, ConnectionState cnx_state, signed code=0)
 
bool setState (CallState call_state, signed code=0)
 Set the state of the call (protected by mutex)
 
bool setState (ConnectionState cnx_state, signed code=0)
 
const std::string & toUsername () const
 Get "To" from the invite.
 
void toUsername (const std::string &username)
 Updated by sipvoiplink, corresponds to the "To" in the invite.
 
std::weak_ptr< Callweak ()
 
virtual ~Call ()
 
- Public Member Functions inherited from jami::Recordable
virtual std::string getPath () const
 Return the file path for this recording.
 
bool isAudioOnly () const
 
bool isRecording () const
 Return recording state (true/false)
 
 Recordable ()
 
virtual bool startRecording (const std::string &path)
 Start recording.
 
virtual void stopRecording ()
 Stop recording.
 
virtual ~Recordable ()
 
- Public Member Functions inherited from jami::PeerRecorder
virtual bool hasPeerVoice () const
 
virtual bool isPeerMuted () const
 
virtual bool isPeerRecording () const
 
 PeerRecorder ()
 
virtual ~PeerRecorder ()
 

Static Public Member Functions

static size_t getActiveMediaStreamCount (const std::vector< MediaAttribute > &mediaAttrList)
 

Public Attributes

std::unique_ptr< pjsip_inv_session, InvSessionDeleterinviteSession_
 
- Public Attributes inherited from jami::Call
std::unique_ptr< AudioDeviceGuardaudioGuard
 

Static Public Attributes

static constexpr LinkType LINK_TYPE = LinkType::SIP
 

Additional Inherited Members

- Public Types inherited from jami::Call
enum class  CallState : unsigned {
  INACTIVE , ACTIVE , HOLD , BUSY ,
  PEER_BUSY , MERROR , OVER , COUNT__
}
 The Call State. More...
 
enum class  CallType : unsigned { INCOMING , OUTGOING , MISSED }
 This determines if the call originated from the local user (OUTGOING) or from some remote peer (INCOMING, MISSED). More...
 
enum class  ConnectionState : unsigned {
  DISCONNECTED , TRYING , PROGRESSING , RINGING ,
  CONNECTED , COUNT__
}
 Tell where we're at with the call. More...
 
enum class  LinkType { GENERIC , SIP }
 
using OnReadyCb = std::function< void(bool)>
 
using StateListenerCb = std::function< bool(CallState, ConnectionState, int)>
 
using SubcallSet = std::set< std::shared_ptr< Call >, std::owner_less< std::shared_ptr< Call > > >
 
- Protected Types inherited from jami::Call
using clock = std::chrono::steady_clock
 
using MsgList = std::list< std::pair< std::map< std::string, std::string >, std::string > >
 MultiDevice: message waiting to be sent (need a valid subcall)
 
using time_point = clock::time_point
 
- Protected Member Functions inherited from jami::Call
 Call (const std::shared_ptr< Account > &account, const std::string &id, Call::CallType type, const std::map< std::string, std::string > &details={})
 Constructor of a call.
 
- Protected Attributes inherited from jami::Call
std::weak_ptr< Accountaccount_
 Associate account ID.
 
std::recursive_mutex callMutex_ {}
 Protect every attribute that can be changed by two threads.
 
CallState callState_ {CallState::INACTIVE}
 Inactive/Active/Hold/Busy/Error.
 
std::weak_ptr< Conferenceconf_ {}
 Unique conference ID, used exclusively in case of a conference.
 
ConfInfo confInfo_ {}
 
std::mutex confInfoMutex_ {}
 
ConnectionState connectionState_ {ConnectionState::DISCONNECTED}
 Disconnected/Progressing/Trying/Ringing/Connected.
 
time_point duration_start_ {time_point::min()}
 
const std::string id_ {}
 MultiDevice: parent call, nullptr otherwise. Access protected by callMutex_.
 
bool isIPToIP_ {false}
 Direct IP-to-IP or classic call.
 
std::shared_ptr< Callparent_
 MultiDevice: list of attached subcall.
 
int peerConfProtocol_ {0}
 Supported conference protocol version.
 
std::string peerDisplayName_ {}
 Peer Display Name.
 
std::string peerNumber_ {}
 Number of the peer.
 
MsgList pendingInMessages_
 
MsgList pendingOutMessages_
 
std::string reason_ {}
 
SubcallSet subcalls_
 
time_t timestamp_start_ {0}
 MultiDevice: message received by subcall to merged yet.
 
std::string toUsername_ {}
 
CallType type_
 Type of the call.
 
- Protected Attributes inherited from jami::Recordable
std::mutex apiMutex_
 
bool isAudioOnly_ {false}
 
std::shared_ptr< MediaRecorderrecorder_
 
bool recording_ {false}
 
- Protected Attributes inherited from jami::PeerRecorder
bool peerMuted_ {false}
 
bool peerRecording_ {false}
 
bool peerVoice_ {false}
 

Detailed Description

Definition at line 71 of file sipcall.h.

Constructor & Destructor Documentation

◆ ~SIPCall()

jami::SIPCall::~SIPCall ( )

Destructor.

Definition at line 155 of file sipcall.cpp.

References jami::Call::callMutex_, jami::closeMediaPlayer(), jami::emitSignal(), setInviteSession(), and setSipTransport().

Here is the call graph for this function:

◆ SIPCall()

jami::SIPCall::SIPCall ( const std::shared_ptr< SIPAccountBase > &  account,
const std::string &  id,
Call::CallType  type,
const std::vector< libjami::MediaMap > &  mediaList 
)

Constructor.

Parameters
idThe call identifier
typeThe type of the call (incoming/outgoing)
mediaListA list of medias to include in the call

Definition at line 105 of file sipcall.cpp.

References jami::MediaAttribute::buildMediaAttributesList(), jami::emitSignal(), jami::Call::getCallId(), getSIPAccount(), jami::Call::getState(), jami::Call::HOLD, jami::Call::INCOMING, jami::Manager::instance(), isSrtpEnabled(), JAMI_DEBUG, jami_tracepoint, JAMI_WARN, jami::MEDIA_AUDIO, jami::MEDIA_VIDEO, jami::Call::OUTGOING, and jami::Call::type_.

Here is the call graph for this function:

Member Function Documentation

◆ addLocalIceAttributes()

void jami::SIPCall::addLocalIceAttributes ( )

◆ answer() [1/2]

void jami::SIPCall::answer ( )
overridevirtual

Answer the call.

Implements jami::Call.

Definition at line 801 of file sipcall.cpp.

References JAMI_DBG, JAMI_ERR, and JAMI_WARN.

◆ answer() [2/2]

void jami::SIPCall::answer ( const std::vector< libjami::MediaMap > &  mediaList)
overridevirtual

Answer a call with a list of media attributes.

Parameters
mediaListThe list of the media attributes. The media attributes set by the caller of this method will determine the response sent to the peer and the configuration of the local media. If the media list is empty, the current media set when the call was created will be used.

Implements jami::Call.

Definition at line 856 of file sipcall.cpp.

References JAMI_DBG, JAMI_DEBUG, JAMI_ERR, JAMI_ERROR, and JAMI_WARN.

◆ answerMediaChangeRequest()

void jami::SIPCall::answerMediaChangeRequest ( const std::vector< libjami::MediaMap > &  mediaList,
bool  isRemote = false 
)
overridevirtual

Answer to a media update request.

The media attributes set by the caller of this method will determine the response to send to the peer and the configuration of the local media.

Parameters
mediaListThe list of media attributes. An empty media list means the media update request was not accepted, meaning the call continue with the current media. It's up to the implementation to determine wether an answer will be sent to the peer.
isRemoteTrue if the media list is from the remote peer

Implements jami::Call.

Definition at line 996 of file sipcall.cpp.

References JAMI_DBG, JAMI_ERR, and JAMI_WARN.

◆ attendedTransfer()

bool jami::SIPCall::attendedTransfer ( const std::string &  to)
overridevirtual

Attended transfer.

Parameters
Thetarget call id
Returns
True on success

Implements jami::Call.

Definition at line 1303 of file sipcall.cpp.

References inviteSession_.

◆ carryingDTMFdigits()

void jami::SIPCall::carryingDTMFdigits ( char  code)
overridevirtual

Send DTMF.

Parameters
codeThe char code

Implements jami::Call.

Definition at line 1505 of file sipcall.cpp.

References JAMI_ERR.

◆ checkMediaChangeRequest()

bool jami::SIPCall::checkMediaChangeRequest ( const std::vector< libjami::MediaMap > &  remoteMediaList)
overridevirtual

Check the media of an incoming media change request.

This method checks the new media against the current media. It determines if the differences are significant enough to require more processing. For instance, this can be used to check if the a change request must be reported to the client for confirmation or can be handled by the daemon. The conditions that cause this method to return true are implementation specific.

Parameters
thenew media list from the remote
Returns
true if the new media differs from the current media

Implements jami::Call.

Definition at line 2848 of file sipcall.cpp.

References JAMI_DBG.

◆ createIceMediaTransport()

bool jami::SIPCall::createIceMediaTransport ( bool  isReinvite)

Definition at line 3432 of file sipcall.cpp.

References JAMI_DBG, and JAMI_ERR.

◆ currentMediaList()

std::vector< std::map< std::string, std::string > > jami::SIPCall::currentMediaList ( ) const
overridevirtual

Retrieve current medias list.

Returns
current medias

Implements jami::Call.

Definition at line 2669 of file sipcall.cpp.

◆ enterConference()

void jami::SIPCall::enterConference ( std::shared_ptr< Conference conference)
overridevirtual

Implements jami::Call.

Definition at line 3177 of file sipcall.cpp.

References JAMI_DEBUG.

◆ exitConference()

void jami::SIPCall::exitConference ( )
overridevirtual

Implements jami::Call.

Definition at line 3206 of file sipcall.cpp.

References JAMI_DBG.

◆ getActiveMediaStreamCount()

static size_t jami::SIPCall::getActiveMediaStreamCount ( const std::vector< MediaAttribute > &  mediaAttrList)
static

◆ getAudioCodec()

std::shared_ptr< SystemCodecInfo > jami::SIPCall::getAudioCodec ( ) const
overridevirtual

Reimplemented from jami::Call.

Definition at line 1976 of file sipcall.cpp.

◆ getAudioStreams()

std::map< std::string, bool > jami::SIPCall::getAudioStreams ( ) const
overridevirtual

Implements jami::Call.

Definition at line 2686 of file sipcall.cpp.

References jami::MEDIA_AUDIO.

◆ getContactHeader()

const std::string & jami::SIPCall::getContactHeader ( ) const

Definition at line 458 of file sipcall.cpp.

◆ getDetails()

◆ getIceMedia()

std::shared_ptr< dhtnet::IceTransport > jami::SIPCall::getIceMedia ( ) const
inline

Definition at line 251 of file sipcall.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ getLinkType()

LinkType jami::SIPCall::getLinkType ( ) const
inlineoverridevirtual

Reimplemented from jami::Call.

Definition at line 108 of file sipcall.h.

References LINK_TYPE.

◆ getLocalIceCandidates()

std::vector< std::string > jami::SIPCall::getLocalIceCandidates ( unsigned  compId) const

Definition at line 3523 of file sipcall.cpp.

References JAMI_WARN.

◆ getMediaAttributeList()

std::vector< MediaAttribute > jami::SIPCall::getMediaAttributeList ( ) const
overridevirtual

Implements jami::Call.

Definition at line 2675 of file sipcall.cpp.

Referenced by jami::transferCall().

◆ getRtpSessionList()

std::vector< std::shared_ptr< RtpSession > > jami::SIPCall::getRtpSessionList ( MediaType  type = MediaType::MEDIA_ALL) const

Definition at line 3347 of file sipcall.cpp.

◆ getRtpStreams()

const std::vector< RtpStream > & jami::SIPCall::getRtpStreams ( ) const
inline

Definition at line 334 of file sipcall.h.

◆ getSDP()

Sdp & jami::SIPCall::getSDP ( )
inline

Return the SDP's manager of this call.

Definition at line 192 of file sipcall.h.

◆ getSIPAccount()

std::shared_ptr< SIPAccountBase > jami::SIPCall::getSIPAccount ( ) const

Definition at line 325 of file sipcall.cpp.

Referenced by SIPCall().

◆ getTransport()

SipTransport * jami::SIPCall::getTransport ( )
inline

Definition at line 235 of file sipcall.h.

◆ getVideoCodec()

std::shared_ptr< SystemCodecInfo > jami::SIPCall::getVideoCodec ( ) const
overridevirtual

Reimplemented from jami::Call.

Definition at line 1963 of file sipcall.cpp.

◆ handleMediaChangeRequest()

void jami::SIPCall::handleMediaChangeRequest ( const std::vector< libjami::MediaMap > &  remoteMediaList)
overridevirtual

Process incoming media change request.

Parameters
thenew media list from the remote

Implements jami::Call.

Definition at line 2875 of file sipcall.cpp.

References JAMI_DBG, and JAMI_ERR.

◆ hangup()

void jami::SIPCall::hangup ( int  reason)
overridevirtual

Hang up the call.

Parameters
reason

Implements jami::Call.

Definition at line 1100 of file sipcall.cpp.

References JAMI_DBG.

◆ hasVideo()

bool jami::SIPCall::hasVideo ( ) const
overridevirtual

◆ initIceMediaTransport()

bool jami::SIPCall::initIceMediaTransport ( bool  master,
std::optional< dhtnet::IceTransportOptions >  options = std::nullopt 
)

Definition at line 3450 of file sipcall.cpp.

References JAMI_DBG, and JAMI_ERR.

◆ isCaptureDeviceMuted()

bool jami::SIPCall::isCaptureDeviceMuted ( const MediaType mediaType) const
overridevirtual

Implements jami::Call.

Definition at line 2051 of file sipcall.cpp.

References jami::SIPCall::RtpStream::mediaAttribute_.

◆ isIceEnabled()

bool jami::SIPCall::isIceEnabled ( ) const
overridevirtual

Check wether ICE is enabled for media.

Implements jami::Call.

Definition at line 1699 of file sipcall.cpp.

◆ isSipMethodAllowedByPeer()

bool jami::SIPCall::isSipMethodAllowedByPeer ( const std::string_view  method) const

Check if a SIP method is allowed by peer.

Definition at line 1813 of file sipcall.cpp.

◆ isSrtpEnabled()

bool jami::SIPCall::isSrtpEnabled ( ) const
inline

Definition at line 156 of file sipcall.h.

Referenced by SIPCall().

◆ monitor()

void jami::SIPCall::monitor ( ) const
overridevirtual

Implements jami::Call.

Definition at line 3359 of file sipcall.cpp.

References JAMI_DBG, and JAMI_ERR.

◆ muteMedia()

void jami::SIPCall::muteMedia ( const std::string &  mediaType,
bool  isMuted 
)
overridevirtual

mute/unmute a media of a call

Parameters
mediaTypetype of media
isMutedtrue for muting, false for unmuting

Implements jami::Call.

Definition at line 2319 of file sipcall.cpp.

References JAMI_ERR, JAMI_WARN, jami::MediaAttribute::muted_, and jami::MediaAttribute::type_.

◆ offhold()

bool jami::SIPCall::offhold ( OnReadyCb &&  cb)
overridevirtual

Resume a call from hold state.

Parameters
cbOn hold can be queued if waiting for ICE. This callback will be called when ready
Returns
bool True on success, False if failed or pending

Implements jami::Call.

Definition at line 1388 of file sipcall.cpp.

References JAMI_DBG.

◆ onAnswered()

void jami::SIPCall::onAnswered ( )

Peer answered the call.

Definition at line 1660 of file sipcall.cpp.

References JAMI_WARN.

◆ onBusyHere()

void jami::SIPCall::onBusyHere ( )

Peer answered busy.

Definition at line 1631 of file sipcall.cpp.

◆ onClosed()

void jami::SIPCall::onClosed ( )

Peer closed the connection.

Definition at line 1648 of file sipcall.cpp.

◆ onFailure()

void jami::SIPCall::onFailure ( signed  cause = 0)

Called to report server/internal errors.

Parameters
causeOptional error code

Definition at line 1617 of file sipcall.cpp.

◆ onhold()

bool jami::SIPCall::onhold ( OnReadyCb &&  cb)
overridevirtual

Put a call on hold.

Parameters
cbOn hold can be queued if waiting for ICE. This callback will be called when ready
Returns
bool True on success, False if failed or pending

Implements jami::Call.

Definition at line 1339 of file sipcall.cpp.

◆ onMediaNegotiationComplete()

void jami::SIPCall::onMediaNegotiationComplete ( )

Called when the media negotiation (SDP offer/answer) has completed.

Definition at line 2700 of file sipcall.cpp.

References JAMI_DBG, and JAMI_WARN.

◆ onPeerRinging()

void jami::SIPCall::onPeerRinging ( )

Call is in ringing state on peer's side.

Definition at line 1822 of file sipcall.cpp.

References JAMI_DBG.

◆ onReceiveOfferIn200OK()

void jami::SIPCall::onReceiveOfferIn200OK ( const pjmedia_sdp_session offer)

◆ onReceiveReinvite()

pj_status_t jami::SIPCall::onReceiveReinvite ( const pjmedia_sdp_session offer,
pjsip_rx_data rdata 
)

Definition at line 2924 of file sipcall.cpp.

References JAMI_DBG, JAMI_ERR, and JAMI_WARN.

◆ peerHungup()

void jami::SIPCall::peerHungup ( )
overridevirtual

Peer has hung up a call.

Reimplemented from jami::Call.

Definition at line 1492 of file sipcall.cpp.

◆ peerMuted()

void jami::SIPCall::peerMuted ( bool  state,
int  streamIdx 
)
overridevirtual

Implements jami::PeerRecorder.

Definition at line 3726 of file sipcall.cpp.

References JAMI_WARN.

Referenced by jami::handleMediaControl().

◆ peerRecording()

void jami::SIPCall::peerRecording ( bool  state)
overridevirtual

Implements jami::PeerRecorder.

Definition at line 3709 of file sipcall.cpp.

References JAMI_WARN.

Referenced by jami::handleMediaControl().

◆ peerUri()

std::string_view jami::SIPCall::peerUri ( ) const
inline

Definition at line 301 of file sipcall.h.

Referenced by setPeerUri().

◆ peerVoice()

void jami::SIPCall::peerVoice ( bool  state)
overridevirtual

Implements jami::PeerRecorder.

Definition at line 3749 of file sipcall.cpp.

Referenced by jami::handleMediaControl().

◆ refuse()

void jami::SIPCall::refuse ( )
overridevirtual

Refuse incoming call.

Implements jami::Call.

Definition at line 1154 of file sipcall.cpp.

◆ remoteHasValidIceAttributes()

bool jami::SIPCall::remoteHasValidIceAttributes ( ) const

Definition at line 3576 of file sipcall.cpp.

References JAMI_DBG.

◆ removeCall()

void jami::SIPCall::removeCall ( )
overridevirtual

Reimplemented from jami::Call.

Definition at line 1592 of file sipcall.cpp.

References jami::Manager::instance(), and JAMI_DBG.

Here is the call graph for this function:

◆ reportMediaNegotiationStatus()

void jami::SIPCall::reportMediaNegotiationStatus ( )

Announce to the client that medias are successfully negotiated.

Definition at line 2745 of file sipcall.cpp.

References libjami::Media::MediaNegotiationStatusEvents::NEGOTIATION_SUCCESS.

◆ requestKeyframe()

void jami::SIPCall::requestKeyframe ( int  streamIdx = -1)

Definition at line 667 of file sipcall.cpp.

References JAMI_DBG, JAMI_ERR, and jami::MS_BETWEEN_2_KEYFRAME_REQUEST.

◆ requestMediaChange()

bool jami::SIPCall::requestMediaChange ( const std::vector< libjami::MediaMap > &  mediaList)
overridevirtual

Make a change request of the current media with the provided media.

Parameters
mediaListthe new media list
Returns
true on success

Implements jami::Call.

Definition at line 2526 of file sipcall.cpp.

References libjami::Media::VideoProtocolPrefix::FILE, JAMI_DEBUG, JAMI_ERROR, JAMI_WARNING, jami::MediaAttribute::label_, libjami::Media::VideoProtocolPrefix::SEPARATOR, jami::MediaAttribute::toString(), and jami::MediaAttribute::type_.

Here is the call graph for this function:

◆ restartMediaSender()

void jami::SIPCall::restartMediaSender ( )
overridevirtual

Implements jami::Call.

Definition at line 2253 of file sipcall.cpp.

References JAMI_DBG.

◆ sendKeyframe()

void jami::SIPCall::sendKeyframe ( int  streamIdx = -1)
overridevirtual

Implements jami::Call.

Definition at line 1676 of file sipcall.cpp.

Referenced by jami::handleMediaControl().

◆ sendSIPInfo()

void jami::SIPCall::sendSIPInfo ( std::string_view  body,
std::string_view  subtype 
)

Definition at line 614 of file sipcall.cpp.

References JAMI_ERR.

◆ sendTextMessage()

void jami::SIPCall::sendTextMessage ( const std::map< std::string, std::string > &  messages,
const std::string &  from 
)
overridevirtual

Send a message to a call identified by its callid.

Parameters
Alist of mimetype/payload pairs
Thesender of this message (could be another participant of a conference)

Implements jami::Call.

Definition at line 1547 of file sipcall.cpp.

References JAMI_ERR, JAMI_INFO, and JAMI_WARN.

◆ setActiveMediaStream()

void jami::SIPCall::setActiveMediaStream ( const std::string &  accountUri,
const std::string &  deviceId,
const std::string &  streamId,
const bool state 
)

Definition at line 3233 of file sipcall.cpp.

◆ setIceMedia()

void jami::SIPCall::setIceMedia ( std::shared_ptr< dhtnet::IceTransport >  ice,
bool  isReinvite = false 
)

Definition at line 3597 of file sipcall.cpp.

References JAMI_DBG.

◆ setInviteSession()

void jami::SIPCall::setInviteSession ( pjsip_inv_session inviteSession = nullptr)

Definition at line 737 of file sipcall.cpp.

References JAMI_DBG, and JAMI_WARN.

Referenced by ~SIPCall().

◆ setPeerAllowMethods()

void jami::SIPCall::setPeerAllowMethods ( std::vector< std::string >  methods)

Set peer's allowed methods.

Definition at line 1806 of file sipcall.cpp.

◆ setPeerRegisteredName()

void jami::SIPCall::setPeerRegisteredName ( const std::string &  name)
inline

Definition at line 291 of file sipcall.h.

◆ setPeerUaVersion()

◆ setPeerUri()

void jami::SIPCall::setPeerUri ( const std::string &  peerUri)
inline

Definition at line 296 of file sipcall.h.

References peerUri().

Here is the call graph for this function:

◆ setSipTransport()

void jami::SIPCall::setSipTransport ( const std::shared_ptr< SipTransport > &  transport,
const std::string &  contactHdr = {} 
)

Definition at line 464 of file sipcall.cpp.

References JAMI_DBG, and JAMI_WARN.

Referenced by ~SIPCall().

◆ setupIceResponse()

void jami::SIPCall::setupIceResponse ( bool  isReinvite = false)

Setup ICE locally to answer to an ICE offer.

The ICE session has the controlled role (slave)

Definition at line 3628 of file sipcall.cpp.

References JAMI_DBG, and JAMI_ERR.

◆ switchInput()

void jami::SIPCall::switchInput ( const std::string &  resource = {})
overridevirtual

Reimplemented from jami::Call.

Definition at line 1463 of file sipcall.cpp.

References JAMI_DBG.

◆ switchToIceReinviteIfNeeded()

void jami::SIPCall::switchToIceReinviteIfNeeded ( )

Definition at line 3613 of file sipcall.cpp.

References JAMI_DBG.

◆ terminateSipSession()

void jami::SIPCall::terminateSipSession ( int  status)

Definition at line 766 of file sipcall.cpp.

References JAMI_DBG, and JAMI_ERR.

Referenced by jami::transfer_client_cb().

◆ toggleRecording()

bool jami::SIPCall::toggleRecording ( )
overridevirtual

This method must be implemented for this interface as calls and conferences have different behavior.

Implementations must call the super method.

Reimplemented from jami::Call.

Definition at line 3383 of file sipcall.cpp.

References JAMI_ERR.

◆ transfer()

void jami::SIPCall::transfer ( const std::string &  to)
overridevirtual

Transfer a call to specified URI.

Parameters
toThe recipient of the call

Implements jami::Call.

Definition at line 1281 of file sipcall.cpp.

References JAMI_DBG, and JAMI_ERR.

◆ updateRecState()

void jami::SIPCall::updateRecState ( bool  state)
overridevirtual

Update recording state.

Typically used to send notifications to peers about the local recording session state

Implements jami::Call.

Definition at line 647 of file sipcall.cpp.

References JAMI_DBG, and JAMI_ERR.

◆ weak() [1/2]

std::weak_ptr< SIPCall > jami::SIPCall::weak ( )
inline

Definition at line 325 of file sipcall.h.

◆ weak() [2/2]

std::weak_ptr< const SIPCall > jami::SIPCall::weak ( ) const
inline

Definition at line 321 of file sipcall.h.

Member Data Documentation

◆ inviteSession_

std::unique_ptr<pjsip_inv_session, InvSessionDeleter> jami::SIPCall::inviteSession_

Definition at line 319 of file sipcall.h.

Referenced by attendedTransfer().

◆ LINK_TYPE

constexpr LinkType jami::SIPCall::LINK_TYPE = LinkType::SIP
staticconstexpr

Definition at line 80 of file sipcall.h.

Referenced by getLinkType().


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