Ring Daemon
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 (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::map< std::string, boolgetRemoteAudioStreams () const override
 Return a map of audio stream IDs to their remote (peer-side) muted state.
 
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 code) override
 Hang up the call.
 
bool hasVideo () const override
 
bool hold (OnReadyCb &&cb) override
 Hold call.
 
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
 
void onAnswered ()
 Peer answered the call.
 
void onBusyHere ()
 Peer answered busy.
 
void onClosed ()
 Peer closed the connection.
 
void onFailure (int code=0)
 Called to report server/internal errors.
 
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 (int code=0) 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
 
bool resume (OnReadyCb &&cb) override
 Resume call from hold state.
 
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)
 Set the state of the call (protected by mutex)
 
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)
 Set the state of the call (protected by mutex)
 
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.
 
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 : uint8_t {
  INACTIVE , ACTIVE , HOLD , BUSY ,
  PEER_BUSY , MERROR , OVER , COUNT__
}
 The Call State. More...
 
enum class  CallType : uint8_t { 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 : uint8_t {
  DISCONNECTED , TRYING , PROGRESSING , RINGING ,
  CONNECTED , COUNT__
}
 Tell where we're at with the call. More...
 
enum class  LinkType : uint8_t { 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)
 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_
 
asio::steady_timer timeoutTimer_
 
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 142 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 97 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_WARNING, 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()

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 754 of file sipcall.cpp.

References JAMI_DEBUG, JAMI_ERROR, and JAMI_WARNING.

◆ 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 886 of file sipcall.cpp.

References JAMI_DEBUG, JAMI_ERROR, and JAMI_WARNING.

◆ 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 1181 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 1380 of file sipcall.cpp.

References JAMI_ERROR.

◆ 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 2741 of file sipcall.cpp.

References JAMI_DEBUG.

◆ createIceMediaTransport()

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

Definition at line 3301 of file sipcall.cpp.

References JAMI_DEBUG, and JAMI_ERROR.

◆ 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 2542 of file sipcall.cpp.

◆ enterConference()

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

Implements jami::Call.

Definition at line 3055 of file sipcall.cpp.

References JAMI_DEBUG.

◆ exitConference()

void jami::SIPCall::exitConference ( )
overridevirtual

Implements jami::Call.

Definition at line 3082 of file sipcall.cpp.

References JAMI_DEBUG.

◆ 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 1828 of file sipcall.cpp.

◆ getAudioStreams()

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

Implements jami::Call.

Definition at line 2559 of file sipcall.cpp.

References jami::MEDIA_AUDIO.

◆ getContactHeader()

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

Definition at line 423 of file sipcall.cpp.

◆ getDetails()

◆ getIceMedia()

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

Definition at line 239 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 3391 of file sipcall.cpp.

References JAMI_WARNING.

◆ getMediaAttributeList()

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

Implements jami::Call.

Definition at line 2548 of file sipcall.cpp.

Referenced by jami::transferCall().

◆ getRemoteAudioStreams()

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

Return a map of audio stream IDs to their remote (peer-side) muted state.

Unlike getAudioStreams() which returns the local send muted state, this returns whether the remote peer is sending audio on each stream.

Implements jami::Call.

Definition at line 2573 of file sipcall.cpp.

References jami::MEDIA_AUDIO.

◆ getRtpSessionList()

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

Definition at line 3218 of file sipcall.cpp.

◆ getRtpStreams()

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

Definition at line 306 of file sipcall.h.

◆ getSDP()

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

Return the SDP's manager of this call.

Definition at line 187 of file sipcall.h.

◆ getSIPAccount()

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

Definition at line 301 of file sipcall.cpp.

Referenced by SIPCall().

◆ getTransport()

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

Definition at line 226 of file sipcall.h.

◆ getVideoCodec()

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

Reimplemented from jami::Call.

Definition at line 1815 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 2767 of file sipcall.cpp.

References JAMI_DEBUG, and JAMI_ERROR.

◆ hangup()

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

Hang up the call.

Parameters
reason

Implements jami::Call.

Definition at line 981 of file sipcall.cpp.

References JAMI_DEBUG.

◆ hasVideo()

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

◆ hold()

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

Hold call.

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 1214 of file sipcall.cpp.

◆ initIceMediaTransport()

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

Definition at line 3319 of file sipcall.cpp.

References JAMI_DEBUG, and JAMI_ERROR.

◆ isCaptureDeviceMuted()

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

Implements jami::Call.

Definition at line 1904 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 1564 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 1673 of file sipcall.cpp.

◆ isSrtpEnabled()

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

Definition at line 154 of file sipcall.h.

Referenced by SIPCall().

◆ monitor()

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

Implements jami::Call.

Definition at line 3230 of file sipcall.cpp.

References JAMI_ERROR, and JAMI_LOG.

◆ 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 2179 of file sipcall.cpp.

References JAMI_ERROR, JAMI_WARNING, jami::MediaAttribute::muted_, and jami::MediaAttribute::type_.

◆ onAnswered()

void jami::SIPCall::onAnswered ( )

Peer answered the call.

Definition at line 1527 of file sipcall.cpp.

References JAMI_WARNING.

◆ onBusyHere()

void jami::SIPCall::onBusyHere ( )

Peer answered busy.

Definition at line 1498 of file sipcall.cpp.

◆ onClosed()

void jami::SIPCall::onClosed ( )

Peer closed the connection.

Definition at line 1515 of file sipcall.cpp.

◆ onFailure()

void jami::SIPCall::onFailure ( int  code = 0)

Called to report server/internal errors.

Parameters
codeOptional SIP response code (see RFC3261)

Definition at line 1484 of file sipcall.cpp.

◆ onMediaNegotiationComplete()

void jami::SIPCall::onMediaNegotiationComplete ( )

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

Definition at line 2589 of file sipcall.cpp.

References JAMI_DEBUG, and JAMI_WARNING.

◆ onPeerRinging()

void jami::SIPCall::onPeerRinging ( )

Call is in ringing state on peer's side.

Definition at line 1681 of file sipcall.cpp.

References JAMI_DEBUG.

◆ 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 2813 of file sipcall.cpp.

References JAMI_DEBUG, JAMI_ERROR, and JAMI_WARNING.

◆ peerHungup()

void jami::SIPCall::peerHungup ( )
overridevirtual

Peer has hung up a call.

Reimplemented from jami::Call.

Definition at line 1367 of file sipcall.cpp.

◆ peerMuted()

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

Implements jami::PeerRecorder.

Definition at line 3591 of file sipcall.cpp.

References JAMI_WARNING.

Referenced by jami::handleMediaControl().

◆ peerRecording()

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

Implements jami::PeerRecorder.

Definition at line 3574 of file sipcall.cpp.

References JAMI_WARNING.

Referenced by jami::handleMediaControl().

◆ peerUri()

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

Definition at line 282 of file sipcall.h.

Referenced by setPeerUri().

◆ peerVoice()

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

Implements jami::PeerRecorder.

Definition at line 3614 of file sipcall.cpp.

Referenced by jami::handleMediaControl().

◆ refuse()

void jami::SIPCall::refuse ( )
overridevirtual

Refuse incoming call.

Implements jami::Call.

Definition at line 1034 of file sipcall.cpp.

◆ remoteHasValidIceAttributes()

bool jami::SIPCall::remoteHasValidIceAttributes ( ) const

Definition at line 3443 of file sipcall.cpp.

References JAMI_DEBUG.

◆ removeCall()

void jami::SIPCall::removeCall ( int  code = 0)
overridevirtual
Parameters
codeOptional SIP response code (see RFC3261)

Reimplemented from jami::Call.

Definition at line 1460 of file sipcall.cpp.

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

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 2632 of file sipcall.cpp.

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

◆ requestKeyframe()

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

Definition at line 620 of file sipcall.cpp.

References JAMI_DEBUG, JAMI_ERROR, 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 2405 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 2117 of file sipcall.cpp.

References JAMI_DEBUG.

◆ resume()

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

Resume 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 1263 of file sipcall.cpp.

References JAMI_DEBUG.

◆ sendKeyframe()

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

Implements jami::Call.

Definition at line 1543 of file sipcall.cpp.

Referenced by jami::handleMediaControl().

◆ sendSIPInfo()

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

Definition at line 570 of file sipcall.cpp.

References JAMI_ERROR.

◆ 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 1418 of file sipcall.cpp.

References JAMI_ERROR, JAMI_LOG, and JAMI_WARNING.

◆ setActiveMediaStream()

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

Definition at line 3109 of file sipcall.cpp.

◆ setIceMedia()

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

Definition at line 3464 of file sipcall.cpp.

References JAMI_DEBUG.

◆ setInviteSession()

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

Definition at line 689 of file sipcall.cpp.

References JAMI_DEBUG, and JAMI_WARNING.

Referenced by ~SIPCall().

◆ setPeerAllowMethods()

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

Set peer's allowed methods.

Definition at line 1666 of file sipcall.cpp.

◆ setPeerRegisteredName()

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

Definition at line 278 of file sipcall.h.

◆ setPeerUaVersion()

◆ setPeerUri()

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

Definition at line 280 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 429 of file sipcall.cpp.

References JAMI_DEBUG, and JAMI_WARNING.

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 3493 of file sipcall.cpp.

References JAMI_DEBUG, and JAMI_ERROR.

◆ switchInput()

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

Reimplemented from jami::Call.

Definition at line 1338 of file sipcall.cpp.

References JAMI_DEBUG.

◆ switchToIceReinviteIfNeeded()

void jami::SIPCall::switchToIceReinviteIfNeeded ( )

Definition at line 3480 of file sipcall.cpp.

References JAMI_DEBUG.

◆ terminateSipSession()

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

Definition at line 718 of file sipcall.cpp.

References JAMI_DEBUG, and JAMI_ERROR.

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 3254 of file sipcall.cpp.

References JAMI_ERROR.

◆ 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 1159 of file sipcall.cpp.

References JAMI_DEBUG, and JAMI_ERROR.

◆ 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 600 of file sipcall.cpp.

References JAMI_DEBUG, and JAMI_ERROR.

◆ weak() [1/2]

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

Definition at line 300 of file sipcall.h.

◆ weak() [2/2]

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

Definition at line 299 of file sipcall.h.

Member Data Documentation

◆ inviteSession_

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

Definition at line 297 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: