reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::ClientInviteSession Class Reference

#include <ClientInviteSession.hxx>

Inheritance diagram for resip::ClientInviteSession:
[legend]

Public Member Functions

 ClientInviteSession (DialogUsageManager &dum, Dialog &dialog, std::shared_ptr< SipMessage > request, const Contents *initialOffer, DialogUsageManager::EncryptionLevel level, ServerSubscriptionHandle serverSub=ServerSubscriptionHandle::NotValid())
 
 ClientInviteSession (const ClientInviteSession &)=delete
 
 ClientInviteSession (ClientInviteSession &&)=delete
 
ClientInviteSession & operator= (const ClientInviteSession &)=delete
 
ClientInviteSession & operator= (ClientInviteSession &&)=delete
 
ClientInviteSessionHandle getHandle ()
 
void provideOffer (const Contents &offer) override
 Called to set the offer that will be used in the next message that sends an offer.
 
void provideOffer (const Contents &offer, DialogUsageManager::EncryptionLevel level, const Contents *alternative) override
 
void provideAnswer (const Contents &answer) override
 Similar to provideOffer - called to set the answer to be signaled to the peer.
 
void end (const Data &userReason) override
 Makes the specific dialog end.
 
void end (const ParserContainer< Token > &endReasons) override
 
void end (EndReason reason) override
 
void end () override
 
void reject (int statusCode, WarningCategory *warning=nullptr) override
 Rejects an offer at the SIP level.
 
void reject (int statusCode, const Contents *contents, WarningCategory *warning=0) override
 
const Contents & getEarlyMedia () const
 
- Public Member Functions inherited from resip::InviteSession
 InviteSession (const InviteSession &)=delete
 
 InviteSession (InviteSession &&)=delete
 
InviteSession & operator= (const InviteSession &)=delete
 
InviteSession & operator= (InviteSession &&)=delete
 
virtual void requestOffer ()
 Called to request that the far end provide an offer.
 
virtual void targetRefresh (const NameAddr &localUri)
 will send a reINVITE (current offerAnswer) or UPDATE with new Contact header
 
virtual void refer (const NameAddr &referTo, bool referSub=true)
 sends a refer request
 
virtual void refer (const NameAddr &referTo, const NameAddr &referredBy, bool referSub=true)
 
virtual void refer (const NameAddr &referTo, std::unique_ptr< resip::Contents > contents, bool referSub=true)
 
virtual void refer (const NameAddr &referTo, const NameAddr &referredBy, std::unique_ptr< resip::Contents > contents, bool referSub=true)
 
virtual void refer (const NameAddr &referTo, InviteSessionHandle sessionToReplace, bool referSub=true)
 sends a refer request with a replaces header
 
virtual void refer (const NameAddr &referTo, InviteSessionHandle sessionToReplace, std::unique_ptr< resip::Contents > contents, bool referSub=true)
 
virtual void refer (const NameAddr &referTo, const CallId &replaces, bool referSub=true)
 
virtual void refer (const NameAddr &referTo, const CallId &replaces, std::unique_ptr< resip::Contents > contents, bool referSub=true)
 
virtual void info (const Contents &contents)
 sends an info request
 
virtual void message (const Contents &contents)
 sends a message request
 
virtual void acceptNIT (int statusCode=200, const Contents *contents=0)
 accepts an INFO or MESSAGE request with a 2xx and an optional contents
 
virtual void rejectNIT (int statusCode=488)
 rejects an INFO or MESSAGE request with an error status code
 
std::shared_ptr< SipMessage > getLastSentNITRequest () const
 gets the last NIT request that was sent by the session
 
virtual void provideOfferCommand (const Contents &offer)
 Provide asynchronous method access by using command.
 
virtual void provideOfferCommand (const Contents &offer, DialogUsageManager::EncryptionLevel level, const Contents *alternative)
 
virtual void provideAnswerCommand (const Contents &answer)
 
virtual void endCommand (EndReason reason=NotSpecified)
 Asynchronously makes the specific dialog end.
 
virtual void endCommand (const Data &userReason)
 
virtual void endCommand (const resip::ParserContainer< resip::Token > &endReasons)
 
virtual void rejectCommand (int statusCode, WarningCategory *warning=0)
 Asynchronously rejects an offer at the SIP level.
 
virtual void rejectCommand (int statusCode, const Contents *contents, WarningCategory *warning=0)
 
virtual void referCommand (const NameAddr &referTo, bool referSub=true)
 
virtual void referCommand (const NameAddr &referTo, InviteSessionHandle sessionToReplace, bool referSub=true)
 
virtual void infoCommand (const Contents &contents)
 
virtual void messageCommand (const Contents &contents)
 
virtual void acceptNITCommand (int statusCode=200, const Contents *contents=0)
 Asynchronously accepts an INFO or MESSAGE request with a 2xx and an optional contents.
 
virtual void rejectNITCommand (int statusCode=488)
 Asynchronously rejects an INFO or MESSAGE request with an error status code.
 
virtual void acceptReferNoSub (int statusCode=200)
 
virtual void rejectReferNoSub (int responseCode)
 
bool hasLocalOfferAnswer () const
 
const Contents & getLocalOfferAnswer () const
 
bool hasRemoteOfferAnswer () const
 
const Contents & getRemoteOfferAnswer () const
 
bool hasProposedRemoteOfferAnswer () const
 
const Contents & getProposedRemoteOfferAnswer () const
 
bool hasLocalSdp () const
 
const SdpContents & getLocalSdp () const
 
bool hasRemoteSdp () const
 
const SdpContents & getRemoteSdp () const
 
bool hasProposedRemoteSdp () const
 
const SdpContents & getProposedRemoteSdp () const
 
bool isConnected () const
 
bool isSessionModificationInFlight () const
 
bool isTerminated () const
 
bool isEarly () const
 
bool isAccepted () const
 
Tokens & getPeerSupportedMethods ()
 
Tokens & getPeerSupportedOptionTags ()
 
Tokens & getPeerRequiresOptionsTags ()
 
Mimes & getPeerSupportedMimeTypes ()
 
Tokens & getPeerSupportedEncodings ()
 
Tokens & getPeerSupportedLanguages ()
 
Tokens & getPeerAllowedEvents ()
 
Data & getPeerUserAgent ()
 
NameAddrs & getPeerPAssertedIdentities ()
 
EncodeStream & dump (EncodeStream &strm) const override
 
InviteSessionHandle getSessionHandle ()
 
- Public Member Functions inherited from resip::DialogUsage
AppDialogSetHandle getAppDialogSet () const
 
AppDialogHandle getAppDialog () const
 
const NameAddr & myAddr () const noexcept
 
const NameAddr & peerAddr () const noexcept
 
const NameAddr & remoteTarget () const noexcept
 
const NameAddr & pendingRemoteTarget () const
 
const NameAddrs & getRouteSet () const noexcept
 
const DialogId & getDialogId () const
 
const Data & getCallId () const
 
std::shared_ptr< UserProfile > getUserProfile () const
 
- Public Member Functions inherited from resip::BaseUsage
virtual void postDum (Message *messageForDum)
 posts a message on dum
 
- Public Member Functions inherited from resip::Handled
 Handled (HandleManager &ham)
 
virtual ~Handled ()
 

Friends

class Dialog
 

Additional Inherited Members

- Public Types inherited from resip::InviteSession
enum  OfferAnswerType { None , Offer , Answer }
 
enum  EndReason {
  NotSpecified =0 , UserHangup , AppRejectedSdp , IllegalNegotiation ,
  AckNotReceived , SessionExpired , StaleReInvite , ENDREASON_MAX ,
  UserSpecified
}
 
- Public Types inherited from resip::Handled
enum  { npos = 0 }
 
typedef unsigned long Id
 
- Protected Types inherited from resip::InviteSession
enum  State {
  Undefined , Connected , SentUpdate , SentUpdateGlare ,
  SentReinvite , SentReinviteGlare , SentReinviteNoOffer , SentReinviteAnswered ,
  SentReinviteNoOfferGlare , SentOptions , SentOptionsGlare , ReceivedUpdate ,
  ReceivedReinvite , ReceivedReinviteNoOffer , ReceivedReinviteSentOffer , Answered ,
  WaitingToOffer , WaitingToRequestOffer , WaitingToTerminate , WaitingToHangup ,
  Terminated , UAC_Start , UAC_Early , UAC_EarlyWithOffer ,
  UAC_EarlyWithAnswer , UAC_Answered , UAC_SentUpdateEarly , UAC_SentUpdateEarlyGlare ,
  UAC_ReceivedUpdateEarly , UAC_SentAnswer , UAC_QueuedUpdate , UAC_Cancelled ,
  UAS_Start , UAS_Offer , UAS_OfferProvidedAnswer , UAS_EarlyOffer ,
  UAS_EarlyProvidedAnswer , UAS_NoOffer , UAS_ProvidedOffer , UAS_EarlyNoOffer ,
  UAS_EarlyProvidedOffer , UAS_Accepted , UAS_WaitingToOffer , UAS_WaitingToRequestOffer ,
  UAS_AcceptedWaitingAnswer , UAS_OfferReliable , UAS_OfferReliableProvidedAnswer , UAS_NoOfferReliable ,
  UAS_ProvidedOfferReliable , UAS_FirstSentOfferReliable , UAS_FirstSentAnswerReliable , UAS_NoAnswerReliableWaitingPrack ,
  UAS_NegotiatedReliable , UAS_NoAnswerReliable , UAS_SentUpdate , UAS_SentUpdateAccepted ,
  UAS_SentUpdateGlare , UAS_ReceivedUpdate , UAS_ReceivedUpdateWaitingAnswer , UAS_WaitingToHangup
}
 
enum  Event {
  OnRedirect , OnGeneralFailure , OnInvite , OnInviteOffer ,
  OnInviteReliableOffer , OnInviteReliable , OnCancel , OnBye ,
  On200Bye , On1xx , On1xxEarly , On1xxOffer ,
  On1xxAnswer , On2xx , On2xxOffer , On2xxAnswer ,
  On422Invite , On487Invite , On491Invite , OnInviteFailure ,
  OnAck , OnAckAnswer , On200Cancel , OnCancelFailure ,
  OnUpdate , OnUpdateOffer , OnUpdateRejected , On422Update ,
  On491Update , On200Update , OnPrack , On200Prack ,
  OnOptions , On200Options , On491Options , Unknown
}
 
enum  NitState { NitComplete , NitProceeding }
 
typedef HashMap< Data, std::shared_ptr< SipMessage > > AckMap
 
- Protected Member Functions inherited from resip::InviteSession
 InviteSession (DialogUsageManager &dum, Dialog &dialog)
 
virtual ~InviteSession ()
 
virtual void onReadyToSend (SipMessage &msg) override
 
virtual void flowTerminated ()
 
void dispatch (const SipMessage &msg) override
 
void dispatch (const DumTimeout &timer) override
 
void dispatchConnected (const SipMessage &msg)
 
void dispatchSentUpdate (const SipMessage &msg)
 
void dispatchSentReinvite (const SipMessage &msg)
 
void dispatchSentReinviteNoOffer (const SipMessage &msg)
 
void dispatchSentReinviteAnswered (const SipMessage &msg)
 
void dispatchGlare (const SipMessage &msg)
 
void dispatchSentOptions (const SipMessage &msg)
 
void dispatchReinviteNoOfferGlare (const SipMessage &msg)
 
void dispatchReceivedUpdateOrReinvite (const SipMessage &msg)
 
void dispatchReceivedReinviteSentOffer (const SipMessage &msg)
 
void dispatchAnswered (const SipMessage &msg)
 
void dispatchWaitingToOffer (const SipMessage &msg)
 
void dispatchWaitingToRequestOffer (const SipMessage &msg)
 
void dispatchWaitingToTerminate (const SipMessage &msg)
 
void dispatchWaitingToHangup (const SipMessage &msg)
 
void dispatchTerminated (const SipMessage &msg)
 
void dispatchBye (const SipMessage &msg)
 
void dispatchInfo (const SipMessage &msg)
 
void dispatchMessage (const SipMessage &msg)
 
void dispatchOptions (const SipMessage &msg)
 
bool isAckForCurrent200 (const SipMessage &ack) const
 
void startRetransmit200Timer ()
 
void start491Timer ()
 
void startStaleReInviteTimer ()
 
void setSessionTimerHeaders (SipMessage &msg)
 
void sessionRefresh ()
 
void checkDeferredSessionExpiration ()
 
bool expireSessionAfterFailedModification ()
 
void setSessionTimerPreferences ()
 
void startSessionTimer ()
 
void handleSessionTimerResponse (const SipMessage &msg)
 
void handleSessionTimerRequest (SipMessage &response, const SipMessage &request)
 
void transition (State target)
 
std::unique_ptr< Contents > getOfferAnswer (const SipMessage &msg)
 
bool isReliable (const SipMessage &msg) const
 
void provideProposedOffer ()
 
void storePeerCapabilities (const SipMessage &msg)
 
bool updateMethodSupported () const
 
bool sessionTimerSupportedLocalAndPeer () const
 
std::shared_ptr< SipMessage > sendAck (const Contents *answer=0)
 
std::shared_ptr< SipMessage > sendBye ()
 
const Data & getEndReasonString (InviteSession::EndReason reason)
 
DialogUsageManager::EncryptionLevel getEncryptionLevel (const SipMessage &msg)
 
void setCurrentLocalOfferAnswer (const SipMessage &msg)
 
void referNoSub (const SipMessage &msg)
 
Event toEvent (const SipMessage &msg, const Contents *offeranswer)
 
void nitComplete ()
 
- Protected Member Functions inherited from resip::DialogUsage
virtual void send (std::shared_ptr< SipMessage > msg)
 
virtual void sendCommand (std::shared_ptr< SipMessage > msg)
 
 DialogUsage (DialogUsageManager &dum, Dialog &dialog)
 
virtual ~DialogUsage ()
 
- Protected Member Functions inherited from resip::BaseUsage
 BaseUsage (DialogUsageManager &dum)
 
virtual ~BaseUsage ()
 
BaseUsageHandle getBaseHandle () const
 
- Static Protected Member Functions inherited from resip::InviteSession
static Data toData (State state)
 
static std::unique_ptr< Contents > makeOfferAnswer (const Contents &offerAnswer)
 
static std::unique_ptr< Contents > makeOfferAnswer (const Contents &offerAnswer, const Contents *alternative)
 
static void setOfferAnswer (SipMessage &msg, const Contents &offerAnswer, const Contents *alternative=0)
 
static void setOfferAnswer (SipMessage &msg, const Contents *offerAnswer)
 
- Protected Attributes inherited from resip::InviteSession
Tokens mPeerSupportedMethods
 
Tokens mPeerSupportedOptionTags
 
Tokens mPeerRequiresOptionTags
 
Mimes mPeerSupportedMimeTypes
 
Tokens mPeerSupportedEncodings
 
Tokens mPeerSupportedLanguages
 
Tokens mPeerAllowedEvents
 
Data mPeerUserAgent
 
NameAddrs mPeerPAssertedIdentities
 
bool mPeerSupportsSessionTimer
 
State mState
 
NitState mNitState
 
NitState mServerNitState
 
std::unique_ptr< Contents > mCurrentLocalOfferAnswer
 
std::unique_ptr< Contents > mProposedLocalOfferAnswer
 
std::unique_ptr< Contents > mCurrentRemoteOfferAnswer
 
std::unique_ptr< Contents > mProposedRemoteOfferAnswer
 
std::shared_ptr< SipMessage > mLastLocalSessionModification
 
std::shared_ptr< SipMessage > mLastRemoteSessionModification
 
std::shared_ptr< SipMessage > mInvite200
 
std::shared_ptr< SipMessage > mLastNitResponse
 
SipMessage mLastReferNoSubRequest
 
unsigned long mCurrentRetransmit200
 
unsigned int mStaleReInviteTimerSeq
 
uint32_t mSessionInterval
 
uint32_t mMinSE
 
bool mSessionRefresher
 
unsigned int mSessionRefreshTimerSeq
 
unsigned int mSessionExpirationTimerSeq
 
bool mSessionRefreshReInvite
 
bool mSessionExpirationPending
 
std::queue< QueuedNIT * > mNITQueue
 
bool mReferSub
 
std::shared_ptr< SipMessage > mLastSentNITRequest
 
DialogUsageManager::EncryptionLevel mCurrentEncryptionLevel
 
DialogUsageManager::EncryptionLevel mProposedEncryptionLevel
 
EndReason mEndReason
 
Data mUserEndReason
 
ParserContainer< Token > mUserEndReasons
 
AckMap mAcks
 
- Protected Attributes inherited from resip::DialogUsage
Dialog & mDialog
 
- Protected Attributes inherited from resip::BaseUsage
DialogUsageManager & mDum
 
- Protected Attributes inherited from resip::Handled
HandleManager & mHam
 
Handled::Id mId
 

Detailed Description

Definition at line 12 of file ClientInviteSession.hxx.

Constructor & Destructor Documentation

◆ ClientInviteSession() [1/3]

ClientInviteSession::ClientInviteSession ( DialogUsageManager &  dum,
Dialog &  dialog,
std::shared_ptr< SipMessage >  request,
const Contents *  initialOffer,
DialogUsageManager::EncryptionLevel  level,
ServerSubscriptionHandle  serverSub = ServerSubscriptionHandle::NotValid() 
)

Definition at line 28 of file ClientInviteSession.cxx.

◆ ClientInviteSession() [2/3]

resip::ClientInviteSession::ClientInviteSession ( const ClientInviteSession &  )
delete

◆ ClientInviteSession() [3/3]

resip::ClientInviteSession::ClientInviteSession ( ClientInviteSession &&  )
delete

Member Function Documentation

◆ end() [1/4]

void ClientInviteSession::end ( )
overridevirtual

Reimplemented from resip::InviteSession.

Definition at line 197 of file ClientInviteSession.cxx.

◆ end() [2/4]

void ClientInviteSession::end ( const Data &  userReason)
overridevirtual

Makes the specific dialog end.

Will send a BYE (not a CANCEL)

Reimplemented from resip::InviteSession.

Definition at line 203 of file ClientInviteSession.cxx.

◆ end() [3/4]

void ClientInviteSession::end ( const ParserContainer< Token > &  endReasons)
overridevirtual

Reimplemented from resip::InviteSession.

Definition at line 210 of file ClientInviteSession.cxx.

◆ end() [4/4]

void ClientInviteSession::end ( EndReason  reason)
overridevirtual

Reimplemented from resip::InviteSession.

Definition at line 217 of file ClientInviteSession.cxx.

◆ getEarlyMedia()

const Contents & ClientInviteSession::getEarlyMedia ( ) const

Definition at line 58 of file ClientInviteSession.cxx.

◆ getHandle()

ClientInviteSessionHandle ClientInviteSession::getHandle ( )

Definition at line 52 of file ClientInviteSession.cxx.

◆ operator=() [1/2]

ClientInviteSession & resip::ClientInviteSession::operator= ( ClientInviteSession &&  )
delete

◆ operator=() [2/2]

ClientInviteSession & resip::ClientInviteSession::operator= ( const ClientInviteSession &  )
delete

◆ provideAnswer()

void ClientInviteSession::provideAnswer ( const Contents &  answer)
overridevirtual

Similar to provideOffer - called to set the answer to be signaled to the peer.

May result in message being sent synchronously depending on the state.

Reimplemented from resip::InviteSession.

Definition at line 131 of file ClientInviteSession.cxx.

◆ provideOffer() [1/2]

void ClientInviteSession::provideOffer ( const Contents &  offer)
overridevirtual

Called to set the offer that will be used in the next message that sends an offer.

For a UAC in an early dialog, this can be used to send an UPDATE request with an offer.

Reimplemented from resip::InviteSession.

Definition at line 125 of file ClientInviteSession.cxx.

◆ provideOffer() [2/2]

void ClientInviteSession::provideOffer ( const Contents &  offer,
DialogUsageManager::EncryptionLevel  level,
const Contents *  alternative 
)
overridevirtual

Reimplemented from resip::InviteSession.

Definition at line 64 of file ClientInviteSession.cxx.

◆ reject() [1/2]

void ClientInviteSession::reject ( int  statusCode,
const Contents *  contents,
WarningCategory *  warning = 0 
)
overridevirtual

Reimplemented from resip::InviteSession.

Definition at line 265 of file ClientInviteSession.cxx.

◆ reject() [2/2]

void ClientInviteSession::reject ( int  statusCode,
WarningCategory *  warning = nullptr 
)
overridevirtual

Rejects an offer at the SIP level.

For a UAC in an early dialog this typically only makes sense, when rejecting an UPDATE request that contains an offer in an early dialog.

Reimplemented from resip::InviteSession.

Definition at line 259 of file ClientInviteSession.cxx.

Friends And Related Symbol Documentation

◆ Dialog

friend class Dialog
friend

Definition at line 103 of file ClientInviteSession.hxx.


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