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

Represents a SIP message. More...

#include <SipMessage.hxx>

Inheritance diagram for resip::SipMessage:
[legend]

Classes

class  Exception
 Base exception for SipMessage related exceptions. More...
 
class  KnownHeaders
 List of known SIP headers, searchable by header type. More...
 

Public Types

typedef std::list< std::pair< Data, HeaderFieldValueList * >, StlPoolAllocator< std::pair< Data, HeaderFieldValueList * >, PoolBase > > UnknownHeaders
 

Public Member Functions

 RESIP_HeapCount (SipMessage)
 
 SipMessage (const Tuple *receivedTransport=0)
 
 SipMessage (const SipMessage &message)
 
virtual Message * clone () const
 
SipMessage & operator= (const SipMessage &rhs)
 
virtual const Data & getTransactionId () const
 Returns the transaction id from the branch or if 2543, the computed hash.
 
const Data & getRFC2543TransactionId () const
 Calculates an MD5 hash over the Request-URI, To tag (for non-INVITE transactions), From tag, Call-ID, CSeq (including the method), and top Via header.
 
void setRFC2543TransactionId (const Data &tid)
 
virtual ~SipMessage ()
 
void parseAllHeaders ()
 
void setFromTU ()
 Mark message as internally generated.
 
void setFromExternal ()
 Mark message as externally generated.
 
bool isExternal () const
 Check if SipMessage is to be treated as it came off the wire.
 
bool isFromWire () const
 Check if SipMessage came off the wire.
 
virtual bool isClientTransaction () const
 Check if SipMessage is a client transaction.
 
virtual EncodeStream & encode (EncodeStream &str) const
 Generate a string from the SipMessage object.
 
virtual EncodeStream & encodeSipFrag (EncodeStream &str) const
 
EncodeStream & encodeEmbedded (EncodeStream &str) const
 
virtual EncodeStream & encodeBrief (EncodeStream &str) const
 output a brief description to stream
 
EncodeStream & encodeSingleHeader (Headers::Type type, EncodeStream &str) const
 
bool isRequest () const
 Returns true if message is a request, false otherwise.
 
bool isResponse () const
 Returns true if message is a response, false otherwise.
 
bool isInvalid () const
 Returns true if message failed to parse, false otherwise.
 
resip::MethodTypes method () const
 returns the method type of the message
 
const Data & methodStr () const
 Returns a string containing the SIP method for the message.
 
const resip::Data * getReason () const
 Returns a string containing the response reason text.
 
const RequestLine & header (const RequestLineType &l) const
 Returns the RequestLine. This is only valid for request messages.
 
RequestLine & header (const RequestLineType &l)
 Returns the RequestLine. This is only valid for request messages.
 
const RequestLine & const_header (const RequestLineType &l) const
 
const StatusLine & header (const StatusLineType &l) const
 Returns the StatusLine. This is only valid for response messages.
 
StatusLine & header (const StatusLineType &l)
 Returns the StatusLine. This is only valid for response messages.
 
const StatusLine & const_header (const StatusLineType &l) const
 
bool exists (const HeaderBase &headerType) const
 Returns true if the given header field is present, false otherwise.
 
bool empty (const HeaderBase &headerType) const
 Returns true if the header field is present and non-empty, false otherwise.
 
void remove (const HeaderBase &headerType)
 Prevents a header field from being present when the message is prepared for sending to a transport.
 
void remove (Headers::Type type)
 
 defineHeader (ContentDisposition, "Content-Disposition", Token, "RFC 3261")
 
 defineHeader (ContentEncoding, "Content-Encoding", Token, "RFC 3261")
 
 defineHeader (MIMEVersion, "Mime-Version", Token, "RFC 3261")
 
 defineHeader (Priority, "Priority", Token, "RFC 3261")
 
 defineHeader (Event, "Event", Token, "RFC 3265")
 
 defineHeader (SubscriptionState, "Subscription-State", Token, "RFC 3265")
 
 defineHeader (SIPETag, "SIP-ETag", Token, "RFC 3903")
 
 defineHeader (SIPIfMatch, "SIP-If-Match", Token, "RFC 3903")
 
 defineHeader (ContentId, "Content-ID", Token, "RFC 2045")
 
 defineMultiHeader (AllowEvents, "Allow-Events", Token, "RFC 3265")
 
 defineMultiHeader (Identity, "Identity", IdentityCategory, "RFC 8224")
 
 defineMultiHeader (AcceptEncoding, "Accept-Encoding", Token, "RFC 3261")
 
 defineMultiHeader (AcceptLanguage, "Accept-Language", Token, "RFC 3261")
 
 defineMultiHeader (Allow, "Allow", Token, "RFC 3261")
 
 defineMultiHeader (ContentLanguage, "Content-Language", Token, "RFC 3261")
 
 defineMultiHeader (ProxyRequire, "Proxy-Require", Token, "RFC 3261")
 
 defineMultiHeader (Require, "Require", Token, "RFC 3261")
 
 defineMultiHeader (Supported, "Supported", Token, "RFC 3261")
 
 defineMultiHeader (Unsupported, "Unsupported", Token, "RFC 3261")
 
 defineMultiHeader (SecurityClient, "Security-Client", Token, "RFC 3329")
 
 defineMultiHeader (SecurityServer, "Security-Server", Token, "RFC 3329")
 
 defineMultiHeader (SecurityVerify, "Security-Verify", Token, "RFC 3329")
 
 defineMultiHeader (RequestDisposition, "Request-Disposition", Token, "RFC 3841")
 
 defineMultiHeader (Reason, "Reason", Token, "RFC 3326")
 
 defineMultiHeader (Privacy, "Privacy", PrivacyCategory, "RFC 3323")
 
 defineMultiHeader (PMediaAuthorization, "P-Media-Authorization", Token, "RFC 3313")
 
 defineHeader (ReferSub, "Refer-Sub", Token, "RFC 4488")
 
 defineHeader (AnswerMode, "Answer-Mode", Token, "draft-ietf-answermode-04")
 
 defineHeader (PrivAnswerMode, "Priv-Answer-Mode", Token, "draft-ietf-answermode-04")
 
 defineMultiHeader (Accept, "Accept", Mime, "RFC 3261")
 
 defineHeader (ContentType, "Content-Type", Mime, "RFC 3261")
 
 defineMultiHeader (CallInfo, "Call-Info", GenericUri, "RFC 3261")
 
 defineMultiHeader (AlertInfo, "Alert-Info", GenericUri, "RFC 3261")
 
 defineMultiHeader (ErrorInfo, "Error-Info", GenericUri, "RFC 3261")
 
 defineHeader (IdentityInfo, "Identity-Info", GenericUri, "RFC 4474")
 
 defineMultiHeader (RecordRoute, "Record-Route", NameAddr, "RFC 3261")
 
 defineMultiHeader (Route, "Route", NameAddr, "RFC 3261")
 
 defineMultiHeader (Contact, "Contact", NameAddr, "RFC 3261")
 
 defineHeader (From, "From", NameAddr, "RFC 3261")
 
 defineHeader (To, "To", NameAddr, "RFC 3261")
 
 defineHeader (ReplyTo, "Reply-To", NameAddr, "RFC 3261")
 
 defineHeader (ReferTo, "Refer-To", NameAddr, "RFC 3515")
 
 defineHeader (ReferredBy, "Referred-By", NameAddr, "RFC 3892")
 
 defineMultiHeader (Path, "Path", NameAddr, "RFC 3327")
 
 defineMultiHeader (AcceptContact, "Accept-Contact", NameAddr, "RFC 3841")
 
 defineMultiHeader (RejectContact, "Reject-Contact", NameAddr, "RFC 3841")
 
 defineMultiHeader (PAssertedIdentity, "P-Asserted-Identity", NameAddr, "RFC 3325")
 
 defineMultiHeader (PPreferredIdentity, "P-Preferred-Identity", NameAddr, "RFC 3325")
 
 defineHeader (PCalledPartyId, "P-Called-Party-ID", NameAddr, "RFC 3455")
 
 defineMultiHeader (PAssociatedUri, "P-Associated-URI", NameAddr, "RFC 3455")
 
 defineMultiHeader (ServiceRoute, "Service-Route", NameAddr, "RFC 3608")
 
 defineMultiHeader (RemotePartyId, "Remote-Party-ID", NameAddr, "draft-ietf-sip-privacy-04")
 
 defineMultiHeader (HistoryInfo, "History-Info", NameAddr, "RFC 4244")
 
 defineMultiHeader (Diversion, "Diversion", NameAddr, "RFC 5806")
 
 defineHeader (ContentTransferEncoding, "Content-Transfer-Encoding", StringCategory, "RFC 1521")
 
 defineHeader (Organization, "Organization", StringCategory, "RFC 3261")
 
 defineHeader (SecWebSocketKey, "Sec-WebSocket-Key", StringCategory, "RFC 6455")
 
 defineHeader (SecWebSocketKey1, "Sec-WebSocket-Key1", StringCategory, "draft-hixie- thewebsocketprotocol-76")
 
 defineHeader (SecWebSocketKey2, "Sec-WebSocket-Key2", StringCategory, "draft-hixie- thewebsocketprotocol-76")
 
 defineHeader (Origin, "Origin", StringCategory, "draft-hixie- thewebsocketprotocol-76")
 
 defineHeader (Host, "Host", StringCategory, "draft-hixie- thewebsocketprotocol-76")
 
 defineHeader (SecWebSocketAccept, "Sec-WebSocket-Accept", StringCategory, "RFC 6455")
 
 defineMultiHeader (Cookie, "Cookie", StringCategory, "RFC 6265")
 
 defineHeader (Server, "Server", StringCategory, "RFC 3261")
 
 defineHeader (Subject, "Subject", StringCategory, "RFC 3261")
 
 defineHeader (UserAgent, "User-Agent", StringCategory, "RFC 3261")
 
 defineHeader (Timestamp, "Timestamp", StringCategory, "RFC 3261")
 
 defineHeader (ContentLength, "Content-Length", UInt32Category, "RFC 3261")
 
 defineHeader (MaxForwards, "Max-Forwards", UInt32Category, "RFC 3261")
 
 defineHeader (MinExpires, "Min-Expires", UInt32Category, "RFC 3261")
 
 defineHeader (RSeq, "RSeq", UInt32Category, "RFC 3261")
 
 defineHeader (RetryAfter, "Retry-After", UInt32Category, "RFC 3261")
 
 defineHeader (FlowTimer, "Flow-Timer", UInt32Category, "RFC 5626")
 
 defineHeader (Expires, "Expires", ExpiresCategory, "RFC 3261")
 
 defineHeader (SessionExpires, "Session-Expires", ExpiresCategory, "RFC 4028")
 
 defineHeader (MinSE, "Min-SE", ExpiresCategory, "RFC 4028")
 
 defineHeader (CallID, "Call-ID", CallID, "RFC 3261")
 
 defineHeader (Replaces, "Replaces", CallID, "RFC 3891")
 
 defineHeader (InReplyTo, "In-Reply-To", CallID, "RFC 3261")
 
 defineHeader (Join, "Join", CallId, "RFC 3911")
 
 defineHeader (TargetDialog, "Target-Dialog", CallId, "RFC 4538")
 
 defineHeader (AuthenticationInfo, "Authentication-Info", Auth, "RFC 3261")
 
 defineMultiHeader (Authorization, "Authorization", Auth, "RFC 3261")
 
 defineMultiHeader (ProxyAuthenticate, "Proxy-Authenticate", Auth, "RFC 3261")
 
 defineMultiHeader (ProxyAuthorization, "Proxy-Authorization", Auth, "RFC 3261")
 
 defineMultiHeader (WWWAuthenticate, "Www-Authenticate", Auth, "RFC 3261")
 
 defineHeader (CSeq, "CSeq", CSeqCategory, "RFC 3261")
 
 defineHeader (Date, "Date", DateCategory, "RFC 3261")
 
 defineMultiHeader (Warning, "Warning", WarningCategory, "RFC 3261")
 
 defineMultiHeader (Via, "Via", Via, "RFC 3261")
 
 defineHeader (RAck, "RAck", RAckCategory, "RFC 3262")
 
 defineMultiHeader (PAccessNetworkInfo, "P-Access-Network-Info", Token, "RFC 7315")
 
 defineHeader (PChargingVector, "P-Charging-Vector", Token, "RFC 3455")
 
 defineHeader (PChargingFunctionAddresses, "P-Charging-Function-Addresses", Token, "RFC 3455")
 
 defineMultiHeader (PVisitedNetworkID, "P-Visited-Network-ID", TokenOrQuotedStringCategory, "RFC 3455")
 
 defineMultiHeader (UserToUser, "User-to-User", TokenOrQuotedStringCategory, "draft-ietf-cuss-sip-uui-17")
 
const StringCategories & header (const ExtensionHeader &symbol) const
 unknown header interface
 
StringCategories & header (const ExtensionHeader &symbol)
 Retrieves extension header values.
 
bool exists (const ExtensionHeader &symbol) const
 
void remove (const ExtensionHeader &symbol)
 
const HeaderFieldValueList * getRawHeader (Headers::Type headerType) const
 typeless header interface
 
void setRawHeader (const HeaderFieldValueList *hfvs, Headers::Type headerType)
 
const KnownHeaders & getRawHeaders () const noexcept
 
const UnknownHeaders & getRawUnknownHeaders () const noexcept
 
const HeaderFieldValue & getRawBody () const noexcept
 Return the raw body string (if it exists).
 
void setRawBody (const HeaderFieldValue &body)
 Remove any existing body/contents, and (if non-empty) set the body to {body}.
 
Contents * getContents () const
 Retrieves the body of a SIP message.
 
std::unique_ptr< Contents > releaseContents ()
 Removes the contents from the message.
 
void setContents (const Contents *contents)
 Set the contents of the message.
 
void setContents (std::unique_ptr< Contents > contents)
 
void setStartLine (const char *start, uint32_t len)
 
void setBody (const char *start, uint32_t len)
 
void addHeader (Headers::Type header, const char *headerName, uint32_t headerNameLen, const char *value, uint32_t valuelen)
 Add HeaderFieldValue given enum, header name and value.
 
const Tuple & getReceivedTransportTuple () const
 
void setReceivedTransportTuple (const Tuple &transportTuple)
 Set Tuple for transport from whence this message came.
 
void setSource (const Tuple &tuple)
 
const Tuple & getSource () const
 Returns the source tuple that the message was received from only makes sense for messages received from the wire.
 
void setDestination (const Tuple &tuple)
 Used by the stateless interface to specify where to send a request/response.
 
Tuple & getDestination ()
 
void addBuffer (char *buf)
 
uint64_t getCreatedTimeMicroSec () const
 
void setForceTarget (const Uri &uri)
 deal with a notion of an "out-of-band" forced target for SIP routing
 
void clearForceTarget ()
 
const Uri & getForceTarget () const
 
bool hasForceTarget () const
 
const Data & getTlsDomain () const
 
void setTlsDomain (const Data &domain)
 
const std::shared_ptr< const ConnectionInfo > & getConnectionInfo () const noexcept
 TLS and WebSocket details of the connection this message was received on, shared by every message received on that connection.
 
void setConnectionInfo (std::shared_ptr< const ConnectionInfo > connectionInfo) noexcept
 
const std::list< Data > & getTlsPeerNames () const
 
const Data & getTlsSni () const
 SNI (TLS server_name) the peer sent in its ClientHello.
 
const CookieList & getWsCookies () const
 
std::shared_ptr< WsCookieContext > getWsCookieContext () const noexcept
 
void setTlsPeerNames (const std::list< Data > &tlsPeerNames)
 
void setWsCookies (const CookieList &wsCookies)
 
void setWsCookieContext (std::shared_ptr< WsCookieContext > wsCookieContext)
 
Data getCanonicalIdentityString () const
 
SipMessage & mergeUri (const Uri &source)
 
void setSecurityAttributes (std::unique_ptr< SecurityAttributes >) noexcept
 
const SecurityAttributes * getSecurityAttributes () const noexcept
 
void addOutboundDecorator (std::unique_ptr< MessageDecorator > md)
 Call a MessageDecorator to process the message before it is sent to the transport.
 
void clearOutboundDecorators ()
 
void callOutboundDecorators (const Tuple &src, const Tuple &dest, const Data &sigcompId)
 
void rollbackOutboundDecorators ()
 
void copyOutboundDecoratorsToStackCancel (SipMessage &cancel)
 
void copyOutboundDecoratorsToStackFailureAck (SipMessage &ack)
 
- Public Member Functions inherited from resip::TransactionMessage
 RESIP_HeapCount (TransactionMessage)
 
- Public Member Functions inherited from resip::Message
 Message ()
 
virtual ~Message ()
 
virtual Brief brief () const
 return a facet for brief encoding of message
 

Static Public Member Functions

static SipMessage * make (const Data &buffer, bool isExternal=false)
 Construct a SipMessage object from a string containing a SIP request or response.
 

Public Attributes

bool mIsDecorated
 
bool mIsBadAck200
 

Static Public Attributes

static bool checkContentLength =true
 

Protected Member Functions

void clear (bool leaveResponseStuff=false)
 
void freeMem (bool leaveResponseStuff=false)
 
void clearHeaders ()
 
void init (const SipMessage &rhs)
 
- Protected Member Functions inherited from resip::Message
bool hasTransactionUser () const
 
void setTransactionUser (TransactionUser *t)
 
TransactionUser * getTransactionUser ()
 

Friends

class TransportSelector
 

Additional Inherited Members

- Protected Attributes inherited from resip::Message
TransactionUser * mTu
 

Detailed Description

Represents a SIP message.

This is the class that your app will spend the most time working with. This is because, in the UA core/Transaction User architecture, the vast majority of interaction is carried out through SIP messaging.

When you get a SipMessage, generally the first thing you want to know is whether it is a request or a response. This is done by calling SipMessage::isRequest() or SipMessage::isResponse().

Next, it is usually important to determine what the SIP method of the message is. This is done by calling SipMessage::method() (this is a convenience function that checks the method of the Request-Line if the message is a request, or the method of the CSeq if a response).

At this point, it may become useful to examine the start-line of the message.

If the message is a request, you can get the Request-Line (represented by a RequestLine&) by calling SipMessage::header(const RequestLineType&)

RequestLine& rLine = sip.header(h_RequestLine);
Represents the "Request-Line" element in the RFC 3261 grammar.
RequestLineType h_RequestLine
Definition Headers.cxx:347

If the message is a response, you can get the Status-Line (represented by a StatusLine&) by calling SipMessage::header(const StatusLineType&)

StatusLine& sLine = sip.header(h_StatusLine);
Represents the "Status-Line" element in the RFC 3261 grammar.
StatusLineType h_StatusLine
Definition Headers.cxx:348

From here, examination of the various headers is in order. The way the underlying code works is very complicated, but fortunately relatively painless to use. For each header type, there is a subclass of HeaderBase, and a SipMessage::header() function that takes a reference to this subclass. On top of this, there is a static instance of each of these subclasses. Examples include h_To, h_From, h_CSeq, h_CallId, h_Routes, h_Contacts, h_RecordRoutes, etc.

NameAddr& to = sip.header(h_To);
NameAddr& from = sip.header(h_From);
CSeqCategory& cseq = sip.header(h_CSeq);
CallId& callId = sip.header(h_CallId);
ParserContainer<NameAddr>& routes = sip.header(h_Routes);
ParserContainer<NameAddr>& contacts = sip.header(h_Contacts);
ParserContainer<NameAddr>& rRoutes = sip.header(h_RecordRoutes);
Represents a CSeq header field value (this doesn't have an official name in the RFC 3261 grammar).
Represents the "callid" element in the SIP grammar.
Definition CallId.hxx:18
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
Definition NameAddr.hxx:19
Container class for ParserCategory, used by SipMessage to represent multi-valued headers (Contact,...
H_CallId h_CallId
Definition Headers.cxx:266

Generally speaking, the access token is named in a predictable fashion; all non-alphanumeric characters are omitted, the first letter of each word is capitalized, and the name is pluralized if the header is multi-valued (since this stuff is all macro-generated, sometimes this pluralization isn't quite right; h_AllowEventss, h_PAssertedIdentitys).

When accessing a single-value header, you need to check whether it exists first (unless you want it to be created implicitly). Also, since all header field values are lazily parsed (see LazyParser), you'll want to make sure it is well-formed before attempting to access any portion of it.

if(sip.exists(h_Event))
{
Token& event = sip.header(h_Event);
if(event.isWellFormed())
{
// do stuff with event.
}
else
{
// complain bitterly
}
}
Represents the "token" element in the RFC 3261 grammar.
Definition Token.hxx:18

When accessing a multi-value header, it is important to keep in mind that it can be empty, even if it exists (for example, "Supported: " has a meaning that is distinct from the lack of a Supported header).

if(sip.exists(h_Contacts))
{
ParserContainer<NameAddr>& contacts = sip.header(h_Contacts);
if(!contacts.empty())
{
NameAddr& frontContact = contacts.front();
if(frontContact.isWellFormed())
{
// do stuff with frontContact
}
else
{
// complain bitterly
}
}
else
{
// complain bitterly
}
}
bool isWellFormed() const
Returns true iff this element was parsed successfully, according to the implementation of parse().
bool empty() const
return true or false indicating whether the mParsers vector is empty or not
T & front()
Returns the first header field value in this container.

In some cases, you will need to access header-types that are not natively supported by the stack (ie, don't have an access-token). ExtensionHeader will allow you to construct an access-token at runtime that will retrieve the header field value as a ParserContainer<StringCategory>. Here's an example:

// We need to access the FooBar header field value here.
static ExtensionHeader h_FooBar("FooBar");
if(sip.exists(h_FooBar))
{
ParserContainer<StringCategory>& fooBars = sip.header(h_FooBar);
}

Definition at line 174 of file SipMessage.hxx.

Member Typedef Documentation

◆ UnknownHeaders

Definition at line 179 of file SipMessage.hxx.

Constructor & Destructor Documentation

◆ SipMessage() [1/2]

SipMessage::SipMessage ( const Tuple *  receivedTransport = 0)
explicit

Definition at line 154 of file SipMessage.cxx.

◆ SipMessage() [2/2]

SipMessage::SipMessage ( const SipMessage &  message)
Todo:
.dlb. public, allows pass by value to compile.

Definition at line 179 of file SipMessage.cxx.

◆ ~SipMessage()

SipMessage::~SipMessage ( )
virtual

Definition at line 208 of file SipMessage.cxx.

Member Function Documentation

◆ addBuffer()

void SipMessage::addBuffer ( char *  buf)

Definition at line 958 of file SipMessage.cxx.

◆ addHeader()

void SipMessage::addHeader ( Headers::Type  header,
const char *  headerName,
uint32_t  headerNameLen,
const char *  value,
uint32_t  valuelen 
)

Add HeaderFieldValue given enum, header name and value.

Definition at line 1300 of file SipMessage.cxx.

◆ addOutboundDecorator()

void resip::SipMessage::addOutboundDecorator ( std::unique_ptr< MessageDecorator >  md)
inline

Call a MessageDecorator to process the message before it is sent to the transport.

Definition at line 1035 of file SipMessage.hxx.

◆ callOutboundDecorators()

void SipMessage::callOutboundDecorators ( const Tuple &  src,
const Tuple &  dest,
const Data &  sigcompId 
)

Definition at line 1862 of file SipMessage.cxx.

◆ clear()

void SipMessage::clear ( bool  leaveResponseStuff = false)
protected

Definition at line 227 of file SipMessage.cxx.

◆ clearForceTarget()

void SipMessage::clearForceTarget ( )

Definition at line 1705 of file SipMessage.cxx.

◆ clearHeaders()

void SipMessage::clearHeaders ( )
protected

Definition at line 366 of file SipMessage.cxx.

◆ clearOutboundDecorators()

void SipMessage::clearOutboundDecorators ( )

Definition at line 1876 of file SipMessage.cxx.

◆ clone()

Message * SipMessage::clone ( ) const
virtual
Todo:
.dlb. sure would be nice to have overloaded return value here..

Reimplemented from resip::TransactionMessage.

Reimplemented in resip::KeepAliveMessage.

Definition at line 192 of file SipMessage.cxx.

◆ const_header() [1/2]

const RequestLine & resip::SipMessage::const_header ( const RequestLineType &  l) const
inline

Definition at line 753 of file SipMessage.hxx.

◆ const_header() [2/2]

const StatusLine & resip::SipMessage::const_header ( const StatusLineType &  l) const
inline

Definition at line 761 of file SipMessage.hxx.

◆ copyOutboundDecoratorsToStackCancel()

void SipMessage::copyOutboundDecoratorsToStackCancel ( SipMessage &  cancel)

Definition at line 1902 of file SipMessage.cxx.

◆ copyOutboundDecoratorsToStackFailureAck()

void SipMessage::copyOutboundDecoratorsToStackFailureAck ( SipMessage &  ack)

Definition at line 1914 of file SipMessage.cxx.

◆ defineHeader() [1/52]

resip::SipMessage::defineHeader ( AnswerMode  ,
"Answer-Mode"  ,
Token  ,
"draft-ietf-answermode-04"   
)

◆ defineHeader() [2/52]

resip::SipMessage::defineHeader ( AuthenticationInfo  ,
"Authentication-Info"  ,
Auth  ,
"RFC 3261"   
)

◆ defineHeader() [3/52]

resip::SipMessage::defineHeader ( CallID  ,
"Call-ID"  ,
CallID  ,
"RFC 3261"   
)

◆ defineHeader() [4/52]

resip::SipMessage::defineHeader ( ContentDisposition  ,
"Content-Disposition"  ,
Token  ,
"RFC 3261"   
)

◆ defineHeader() [5/52]

resip::SipMessage::defineHeader ( ContentEncoding  ,
"Content-Encoding"  ,
Token  ,
"RFC 3261"   
)

◆ defineHeader() [6/52]

resip::SipMessage::defineHeader ( ContentId  ,
"Content-ID"  ,
Token  ,
"RFC 2045"   
)

◆ defineHeader() [7/52]

resip::SipMessage::defineHeader ( ContentLength  ,
"Content-Length"  ,
UInt32Category  ,
"RFC 3261"   
)

◆ defineHeader() [8/52]

resip::SipMessage::defineHeader ( ContentTransferEncoding  ,
"Content-Transfer-Encoding"  ,
StringCategory  ,
"RFC 1521"   
)

◆ defineHeader() [9/52]

resip::SipMessage::defineHeader ( ContentType  ,
"Content-Type"  ,
Mime  ,
"RFC 3261"   
)

◆ defineHeader() [10/52]

resip::SipMessage::defineHeader ( CSeq  ,
"CSeq"  ,
CSeqCategory  ,
"RFC 3261"   
)

◆ defineHeader() [11/52]

resip::SipMessage::defineHeader ( Date  ,
"Date"  ,
DateCategory  ,
"RFC 3261"   
)

◆ defineHeader() [12/52]

resip::SipMessage::defineHeader ( Event  ,
"Event"  ,
Token  ,
"RFC 3265"   
)

◆ defineHeader() [13/52]

resip::SipMessage::defineHeader ( Expires  ,
"Expires"  ,
ExpiresCategory  ,
"RFC 3261"   
)

◆ defineHeader() [14/52]

resip::SipMessage::defineHeader ( FlowTimer  ,
"Flow-Timer"  ,
UInt32Category  ,
"RFC 5626"   
)

◆ defineHeader() [15/52]

resip::SipMessage::defineHeader ( From  ,
"From"  ,
NameAddr  ,
"RFC 3261"   
)

◆ defineHeader() [16/52]

resip::SipMessage::defineHeader ( Host  ,
"Host"  ,
StringCategory  ,
"draft-hixie- thewebsocketprotocol-76"   
)

◆ defineHeader() [17/52]

resip::SipMessage::defineHeader ( IdentityInfo  ,
"Identity-Info"  ,
GenericUri  ,
"RFC 4474"   
)

◆ defineHeader() [18/52]

resip::SipMessage::defineHeader ( InReplyTo  ,
"In-Reply-To"  ,
CallID  ,
"RFC 3261"   
)

◆ defineHeader() [19/52]

resip::SipMessage::defineHeader ( Join  ,
"Join"  ,
CallId  ,
"RFC 3911"   
)

◆ defineHeader() [20/52]

resip::SipMessage::defineHeader ( MaxForwards  ,
"Max-Forwards"  ,
UInt32Category  ,
"RFC 3261"   
)

◆ defineHeader() [21/52]

resip::SipMessage::defineHeader ( MIMEVersion  ,
"Mime-Version"  ,
Token  ,
"RFC 3261"   
)

◆ defineHeader() [22/52]

resip::SipMessage::defineHeader ( MinExpires  ,
"Min-Expires"  ,
UInt32Category  ,
"RFC 3261"   
)

◆ defineHeader() [23/52]

resip::SipMessage::defineHeader ( MinSE  ,
"Min-SE"  ,
ExpiresCategory  ,
"RFC 4028"   
)

◆ defineHeader() [24/52]

resip::SipMessage::defineHeader ( Organization  ,
"Organization"  ,
StringCategory  ,
"RFC 3261"   
)

◆ defineHeader() [25/52]

resip::SipMessage::defineHeader ( Origin  ,
"Origin"  ,
StringCategory  ,
"draft-hixie- thewebsocketprotocol-76"   
)

◆ defineHeader() [26/52]

resip::SipMessage::defineHeader ( PCalledPartyId  ,
"P-Called-Party-ID"  ,
NameAddr  ,
"RFC 3455"   
)

◆ defineHeader() [27/52]

resip::SipMessage::defineHeader ( PChargingFunctionAddresses  ,
"P-Charging-Function-Addresses"  ,
Token  ,
"RFC 3455"   
)

◆ defineHeader() [28/52]

resip::SipMessage::defineHeader ( PChargingVector  ,
"P-Charging-Vector"  ,
Token  ,
"RFC 3455"   
)

◆ defineHeader() [29/52]

resip::SipMessage::defineHeader ( Priority  ,
"Priority"  ,
Token  ,
"RFC 3261"   
)

◆ defineHeader() [30/52]

resip::SipMessage::defineHeader ( PrivAnswerMode  ,
"Priv-Answer-Mode"  ,
Token  ,
"draft-ietf-answermode-04"   
)

◆ defineHeader() [31/52]

resip::SipMessage::defineHeader ( RAck  ,
"RAck"  ,
RAckCategory  ,
"RFC 3262"   
)

◆ defineHeader() [32/52]

resip::SipMessage::defineHeader ( ReferredBy  ,
"Referred-By"  ,
NameAddr  ,
"RFC 3892"   
)

◆ defineHeader() [33/52]

resip::SipMessage::defineHeader ( ReferSub  ,
"Refer-Sub"  ,
Token  ,
"RFC 4488"   
)

◆ defineHeader() [34/52]

resip::SipMessage::defineHeader ( ReferTo  ,
"Refer-To"  ,
NameAddr  ,
"RFC 3515"   
)

◆ defineHeader() [35/52]

resip::SipMessage::defineHeader ( Replaces  ,
"Replaces"  ,
CallID  ,
"RFC 3891"   
)

◆ defineHeader() [36/52]

resip::SipMessage::defineHeader ( ReplyTo  ,
"Reply-To"  ,
NameAddr  ,
"RFC 3261"   
)

◆ defineHeader() [37/52]

resip::SipMessage::defineHeader ( RetryAfter  ,
"Retry-After"  ,
UInt32Category  ,
"RFC 3261"   
)
Todo:
!dlb! this one is not quite right – can have (comment) after field value

◆ defineHeader() [38/52]

resip::SipMessage::defineHeader ( RSeq  ,
"RSeq"  ,
UInt32Category  ,
"RFC 3261"   
)

◆ defineHeader() [39/52]

resip::SipMessage::defineHeader ( SecWebSocketAccept  ,
"Sec-WebSocket-Accept"  ,
StringCategory  ,
"RFC 6455"   
)

◆ defineHeader() [40/52]

resip::SipMessage::defineHeader ( SecWebSocketKey  ,
"Sec-WebSocket-Key"  ,
StringCategory  ,
"RFC 6455"   
)

◆ defineHeader() [41/52]

resip::SipMessage::defineHeader ( SecWebSocketKey1  ,
"Sec-WebSocket-Key1"  ,
StringCategory  ,
"draft-hixie- thewebsocketprotocol-76"   
)

◆ defineHeader() [42/52]

resip::SipMessage::defineHeader ( SecWebSocketKey2  ,
"Sec-WebSocket-Key2"  ,
StringCategory  ,
"draft-hixie- thewebsocketprotocol-76"   
)

◆ defineHeader() [43/52]

resip::SipMessage::defineHeader ( Server  ,
"Server"  ,
StringCategory  ,
"RFC 3261"   
)

◆ defineHeader() [44/52]

resip::SipMessage::defineHeader ( SessionExpires  ,
"Session-Expires"  ,
ExpiresCategory  ,
"RFC 4028"   
)

◆ defineHeader() [45/52]

resip::SipMessage::defineHeader ( SIPETag  ,
"SIP-ETag"  ,
Token  ,
"RFC 3903"   
)

◆ defineHeader() [46/52]

resip::SipMessage::defineHeader ( SIPIfMatch  ,
"SIP-If-Match"  ,
Token  ,
"RFC 3903"   
)

◆ defineHeader() [47/52]

resip::SipMessage::defineHeader ( Subject  ,
"Subject"  ,
StringCategory  ,
"RFC 3261"   
)

◆ defineHeader() [48/52]

resip::SipMessage::defineHeader ( SubscriptionState  ,
"Subscription-State"  ,
Token  ,
"RFC 3265"   
)

◆ defineHeader() [49/52]

resip::SipMessage::defineHeader ( TargetDialog  ,
"Target-Dialog"  ,
CallId  ,
"RFC 4538"   
)

◆ defineHeader() [50/52]

resip::SipMessage::defineHeader ( Timestamp  ,
"Timestamp"  ,
StringCategory  ,
"RFC 3261"   
)

◆ defineHeader() [51/52]

resip::SipMessage::defineHeader ( To  ,
"To"  ,
NameAddr  ,
"RFC 3261"   
)

◆ defineHeader() [52/52]

resip::SipMessage::defineHeader ( UserAgent  ,
"User-Agent"  ,
StringCategory  ,
"RFC 3261"   
)

◆ defineMultiHeader() [1/44]

resip::SipMessage::defineMultiHeader ( Accept  ,
"Accept"  ,
Mime  ,
"RFC 3261"   
)

◆ defineMultiHeader() [2/44]

resip::SipMessage::defineMultiHeader ( AcceptContact  ,
"Accept-Contact"  ,
NameAddr  ,
"RFC 3841"   
)

◆ defineMultiHeader() [3/44]

resip::SipMessage::defineMultiHeader ( AcceptEncoding  ,
"Accept-Encoding"  ,
Token  ,
"RFC 3261"   
)

◆ defineMultiHeader() [4/44]

resip::SipMessage::defineMultiHeader ( AcceptLanguage  ,
"Accept-Language"  ,
Token  ,
"RFC 3261"   
)

◆ defineMultiHeader() [5/44]

resip::SipMessage::defineMultiHeader ( AlertInfo  ,
"Alert-Info"  ,
GenericUri  ,
"RFC 3261"   
)

◆ defineMultiHeader() [6/44]

resip::SipMessage::defineMultiHeader ( Allow  ,
"Allow"  ,
Token  ,
"RFC 3261"   
)

◆ defineMultiHeader() [7/44]

resip::SipMessage::defineMultiHeader ( AllowEvents  ,
"Allow-Events"  ,
Token  ,
"RFC 3265"   
)

◆ defineMultiHeader() [8/44]

resip::SipMessage::defineMultiHeader ( Authorization  ,
"Authorization"  ,
Auth  ,
"RFC 3261"   
)

◆ defineMultiHeader() [9/44]

resip::SipMessage::defineMultiHeader ( CallInfo  ,
"Call-Info"  ,
GenericUri  ,
"RFC 3261"   
)

◆ defineMultiHeader() [10/44]

resip::SipMessage::defineMultiHeader ( Contact  ,
"Contact"  ,
NameAddr  ,
"RFC 3261"   
)

◆ defineMultiHeader() [11/44]

resip::SipMessage::defineMultiHeader ( ContentLanguage  ,
"Content-Language"  ,
Token  ,
"RFC 3261"   
)

◆ defineMultiHeader() [12/44]

resip::SipMessage::defineMultiHeader ( Cookie  ,
"Cookie"  ,
StringCategory  ,
"RFC 6265"   
)

◆ defineMultiHeader() [13/44]

resip::SipMessage::defineMultiHeader ( Diversion  ,
"Diversion"  ,
NameAddr  ,
"RFC 5806"   
)

◆ defineMultiHeader() [14/44]

resip::SipMessage::defineMultiHeader ( ErrorInfo  ,
"Error-Info"  ,
GenericUri  ,
"RFC 3261"   
)

◆ defineMultiHeader() [15/44]

resip::SipMessage::defineMultiHeader ( HistoryInfo  ,
"History-Info"  ,
NameAddr  ,
"RFC 4244"   
)

◆ defineMultiHeader() [16/44]

resip::SipMessage::defineMultiHeader ( Identity  ,
"Identity"  ,
IdentityCategory  ,
"RFC 8224"   
)

◆ defineMultiHeader() [17/44]

resip::SipMessage::defineMultiHeader ( PAccessNetworkInfo  ,
"P-Access-Network-Info"  ,
Token  ,
"RFC 7315"   
)

◆ defineMultiHeader() [18/44]

resip::SipMessage::defineMultiHeader ( PAssertedIdentity  ,
"P-Asserted-Identity"  ,
NameAddr  ,
"RFC 3325"   
)

◆ defineMultiHeader() [19/44]

resip::SipMessage::defineMultiHeader ( PAssociatedUri  ,
"P-Associated-URI"  ,
NameAddr  ,
"RFC 3455"   
)

◆ defineMultiHeader() [20/44]

resip::SipMessage::defineMultiHeader ( Path  ,
"Path"  ,
NameAddr  ,
"RFC 3327"   
)

◆ defineMultiHeader() [21/44]

resip::SipMessage::defineMultiHeader ( PMediaAuthorization  ,
"P-Media-Authorization"  ,
Token  ,
"RFC 3313"   
)

◆ defineMultiHeader() [22/44]

resip::SipMessage::defineMultiHeader ( PPreferredIdentity  ,
"P-Preferred-Identity"  ,
NameAddr  ,
"RFC 3325"   
)

◆ defineMultiHeader() [23/44]

resip::SipMessage::defineMultiHeader ( Privacy  ,
"Privacy"  ,
PrivacyCategory  ,
"RFC 3323"   
)

◆ defineMultiHeader() [24/44]

resip::SipMessage::defineMultiHeader ( ProxyAuthenticate  ,
"Proxy-Authenticate"  ,
Auth  ,
"RFC 3261"   
)

◆ defineMultiHeader() [25/44]

resip::SipMessage::defineMultiHeader ( ProxyAuthorization  ,
"Proxy-Authorization"  ,
Auth  ,
"RFC 3261"   
)

◆ defineMultiHeader() [26/44]

resip::SipMessage::defineMultiHeader ( ProxyRequire  ,
"Proxy-Require"  ,
Token  ,
"RFC 3261"   
)

◆ defineMultiHeader() [27/44]

resip::SipMessage::defineMultiHeader ( PVisitedNetworkID  ,
"P-Visited-Network-ID"  ,
TokenOrQuotedStringCategory  ,
"RFC 3455"   
)

◆ defineMultiHeader() [28/44]

resip::SipMessage::defineMultiHeader ( Reason  ,
"Reason"  ,
Token  ,
"RFC 3326"   
)

◆ defineMultiHeader() [29/44]

resip::SipMessage::defineMultiHeader ( RecordRoute  ,
"Record-Route"  ,
NameAddr  ,
"RFC 3261"   
)

◆ defineMultiHeader() [30/44]

resip::SipMessage::defineMultiHeader ( RejectContact  ,
"Reject-Contact"  ,
NameAddr  ,
"RFC 3841"   
)

◆ defineMultiHeader() [31/44]

resip::SipMessage::defineMultiHeader ( RemotePartyId  ,
"Remote-Party-ID"  ,
NameAddr  ,
"draft-ietf-sip-privacy-04"   
)

◆ defineMultiHeader() [32/44]

resip::SipMessage::defineMultiHeader ( RequestDisposition  ,
"Request-Disposition"  ,
Token  ,
"RFC 3841"   
)

◆ defineMultiHeader() [33/44]

resip::SipMessage::defineMultiHeader ( Require  ,
"Require"  ,
Token  ,
"RFC 3261"   
)

◆ defineMultiHeader() [34/44]

resip::SipMessage::defineMultiHeader ( Route  ,
"Route"  ,
NameAddr  ,
"RFC 3261"   
)

◆ defineMultiHeader() [35/44]

resip::SipMessage::defineMultiHeader ( SecurityClient  ,
"Security-Client"  ,
Token  ,
"RFC 3329"   
)

◆ defineMultiHeader() [36/44]

resip::SipMessage::defineMultiHeader ( SecurityServer  ,
"Security-Server"  ,
Token  ,
"RFC 3329"   
)

◆ defineMultiHeader() [37/44]

resip::SipMessage::defineMultiHeader ( SecurityVerify  ,
"Security-Verify"  ,
Token  ,
"RFC 3329"   
)

◆ defineMultiHeader() [38/44]

resip::SipMessage::defineMultiHeader ( ServiceRoute  ,
"Service-Route"  ,
NameAddr  ,
"RFC 3608"   
)

◆ defineMultiHeader() [39/44]

resip::SipMessage::defineMultiHeader ( Supported  ,
"Supported"  ,
Token  ,
"RFC 3261"   
)

◆ defineMultiHeader() [40/44]

resip::SipMessage::defineMultiHeader ( Unsupported  ,
"Unsupported"  ,
Token  ,
"RFC 3261"   
)

◆ defineMultiHeader() [41/44]

resip::SipMessage::defineMultiHeader ( UserToUser  ,
"User-to-User"  ,
TokenOrQuotedStringCategory  ,
"draft-ietf-cuss-sip-uui-17"   
)

◆ defineMultiHeader() [42/44]

resip::SipMessage::defineMultiHeader ( Via  ,
"Via"  ,
Via  ,
"RFC 3261"   
)

◆ defineMultiHeader() [43/44]

resip::SipMessage::defineMultiHeader ( Warning  ,
"Warning"  ,
WarningCategory  ,
"RFC 3261"   
)

◆ defineMultiHeader() [44/44]

resip::SipMessage::defineMultiHeader ( WWWAuthenticate  ,
"Www-Authenticate"  ,
Auth  ,
"RFC 3261"   
)

◆ empty()

bool SipMessage::empty ( const HeaderBase &  headerType) const

Returns true if the header field is present and non-empty, false otherwise.

Definition at line 1472 of file SipMessage.cxx.

◆ encode()

EncodeStream & SipMessage::encode ( EncodeStream &  str) const
virtual

Generate a string from the SipMessage object.

Returns
string representation of a SIP message.

Implements resip::Message.

Reimplemented in resip::KeepAliveMessage.

Definition at line 811 of file SipMessage.cxx.

◆ encodeBrief()

EncodeStream & SipMessage::encodeBrief ( EncodeStream &  str) const
virtual

output a brief description to stream

Implements resip::Message.

Definition at line 736 of file SipMessage.cxx.

◆ encodeEmbedded()

EncodeStream & SipMessage::encodeEmbedded ( EncodeStream &  str) const

Definition at line 888 of file SipMessage.cxx.

◆ encodeSingleHeader()

EncodeStream & SipMessage::encodeSingleHeader ( Headers::Type  type,
EncodeStream &  str 
) const

Definition at line 877 of file SipMessage.cxx.

◆ encodeSipFrag()

EncodeStream & SipMessage::encodeSipFrag ( EncodeStream &  str) const
virtual

Definition at line 817 of file SipMessage.cxx.

◆ exists() [1/2]

bool SipMessage::exists ( const ExtensionHeader &  symbol) const

Definition at line 1271 of file SipMessage.cxx.

◆ exists() [2/2]

bool SipMessage::exists ( const HeaderBase &  headerType) const

Returns true if the given header field is present, false otherwise.

Definition at line 1466 of file SipMessage.cxx.

◆ freeMem()

void SipMessage::freeMem ( bool  leaveResponseStuff = false)
protected

Definition at line 331 of file SipMessage.cxx.

◆ getCanonicalIdentityString()

Data SipMessage::getCanonicalIdentityString ( ) const

Definition at line 601 of file SipMessage.cxx.

◆ getConnectionInfo()

const std::shared_ptr< const ConnectionInfo > & resip::SipMessage::getConnectionInfo ( ) const
inlinenoexcept

TLS and WebSocket details of the connection this message was received on, shared by every message received on that connection.

Null if the message did not arrive on a TLS or WebSocket connection.

Definition at line 1007 of file SipMessage.hxx.

◆ getContents()

Contents * SipMessage::getContents ( ) const

Retrieves the body of a SIP message.

In the case of an INVITE request containing SDP, the body would be an SdpContents. For a MESSAGE request, the body may be PlainContents, CpimContents, or another subclass of Contents.

Returns
pointer to the contents of the SIP message

Definition at line 1148 of file SipMessage.cxx.

◆ getCreatedTimeMicroSec()

uint64_t resip::SipMessage::getCreatedTimeMicroSec ( ) const
inline

Definition at line 993 of file SipMessage.hxx.

◆ getDestination()

Tuple & resip::SipMessage::getDestination ( )
inline

Definition at line 989 of file SipMessage.hxx.

◆ getForceTarget()

const Uri & SipMessage::getForceTarget ( ) const

Definition at line 1712 of file SipMessage.cxx.

◆ getRawBody()

const HeaderFieldValue & resip::SipMessage::getRawBody ( ) const
inlinenoexcept

Return the raw body string (if it exists).

The returned HFV and its underlying memory is owned by the SipMessage, and may be released when this SipMessage is manipulated.

This is a low-level interface; see getContents() for higher level.

Definition at line 931 of file SipMessage.hxx.

◆ getRawHeader()

const HeaderFieldValueList * SipMessage::getRawHeader ( Headers::Type  headerType) const

typeless header interface

Definition at line 1651 of file SipMessage.cxx.

◆ getRawHeaders()

const KnownHeaders & resip::SipMessage::getRawHeaders ( ) const
inlinenoexcept

Definition at line 921 of file SipMessage.hxx.

◆ getRawUnknownHeaders()

const UnknownHeaders & resip::SipMessage::getRawUnknownHeaders ( ) const
inlinenoexcept

Definition at line 922 of file SipMessage.hxx.

◆ getReason()

const resip::Data * resip::SipMessage::getReason ( ) const
inline

Returns a string containing the response reason text.

Definition at line 745 of file SipMessage.hxx.

◆ getReceivedTransportTuple()

const Tuple & resip::SipMessage::getReceivedTransportTuple ( ) const
inline

Definition at line 975 of file SipMessage.hxx.

◆ getRFC2543TransactionId()

const Data & SipMessage::getRFC2543TransactionId ( ) const

Calculates an MD5 hash over the Request-URI, To tag (for non-INVITE transactions), From tag, Call-ID, CSeq (including the method), and top Via header.

The hash is used for transaction matching.

Definition at line 584 of file SipMessage.cxx.

◆ getSecurityAttributes()

const SecurityAttributes * resip::SipMessage::getSecurityAttributes ( ) const
inlinenoexcept

Definition at line 1031 of file SipMessage.hxx.

◆ getSource()

const Tuple & resip::SipMessage::getSource ( ) const
inline

Returns the source tuple that the message was received from only makes sense for messages received from the wire.

Definition at line 985 of file SipMessage.hxx.

◆ getTlsDomain()

const Data & resip::SipMessage::getTlsDomain ( ) const
inline

Definition at line 1001 of file SipMessage.hxx.

◆ getTlsPeerNames()

const std::list< Data > & SipMessage::getTlsPeerNames ( ) const

Definition at line 1804 of file SipMessage.cxx.

◆ getTlsSni()

const Data & SipMessage::getTlsSni ( ) const

SNI (TLS server_name) the peer sent in its ClientHello.

Only set for messages received on a TLS/WSS connection that we accepted (server mode); empty if the peer did not send one.

Definition at line 1811 of file SipMessage.cxx.

◆ getTransactionId()

const Data & SipMessage::getTransactionId ( ) const
virtual

Returns the transaction id from the branch or if 2543, the computed hash.

Implements resip::TransactionMessage.

Definition at line 458 of file SipMessage.cxx.

◆ getWsCookieContext()

std::shared_ptr< WsCookieContext > SipMessage::getWsCookieContext ( ) const
noexcept

Definition at line 1824 of file SipMessage.cxx.

◆ getWsCookies()

const CookieList & SipMessage::getWsCookies ( ) const

Definition at line 1817 of file SipMessage.cxx.

◆ hasForceTarget()

bool SipMessage::hasForceTarget ( ) const

Definition at line 1719 of file SipMessage.cxx.

◆ header() [1/6]

StringCategories & SipMessage::header ( const ExtensionHeader &  symbol)

Retrieves extension header values.

Adds an empty list of header values if the header is not found.

Definition at line 1247 of file SipMessage.cxx.

◆ header() [2/6]

const StringCategories & SipMessage::header ( const ExtensionHeader &  symbol) const

unknown header interface

Retrieves extension header values.

Throws an exception if the header is not found.

Definition at line 1219 of file SipMessage.cxx.

◆ header() [3/6]

RequestLine & SipMessage::header ( const RequestLineType &  l)

Returns the RequestLine. This is only valid for request messages.

Definition at line 1370 of file SipMessage.cxx.

◆ header() [4/6]

const RequestLine & SipMessage::header ( const RequestLineType &  l) const

Returns the RequestLine. This is only valid for request messages.

Definition at line 1382 of file SipMessage.cxx.

◆ header() [5/6]

StatusLine & SipMessage::header ( const StatusLineType &  l)

Returns the StatusLine. This is only valid for response messages.

Definition at line 1394 of file SipMessage.cxx.

◆ header() [6/6]

const StatusLine & SipMessage::header ( const StatusLineType &  l) const

Returns the StatusLine. This is only valid for response messages.

Definition at line 1406 of file SipMessage.cxx.

◆ init()

void SipMessage::init ( const SipMessage &  rhs)
protected

Definition at line 247 of file SipMessage.cxx.

◆ isClientTransaction()

bool SipMessage::isClientTransaction ( ) const
virtual

Check if SipMessage is a client transaction.

Returns
true if the message is external and is a response or an internally-generated request.

Implements resip::TransactionMessage.

Definition at line 804 of file SipMessage.cxx.

◆ isExternal()

bool resip::SipMessage::isExternal ( ) const
inline

Check if SipMessage is to be treated as it came off the wire.

Returns
true if the message came from an IP interface or if it was an internally generated response to an internally generated request (ie: 408), false otherwise.

Definition at line 699 of file SipMessage.hxx.

◆ isFromWire()

bool resip::SipMessage::isFromWire ( ) const
inline

Check if SipMessage came off the wire.

Note
differs from isExternal(), since isExternal() also returns true for internally generated responses to internally generate requests (ie: 408, etc.). isFromWire only ever returns true if the message actually came off the wire.
Returns
true if the message came from an IP interface, false otherwise.

Definition at line 711 of file SipMessage.hxx.

◆ isInvalid()

bool resip::SipMessage::isInvalid ( ) const
inline

Returns true if message failed to parse, false otherwise.

Definition at line 736 of file SipMessage.hxx.

◆ isRequest()

bool resip::SipMessage::isRequest ( ) const
inline

Returns true if message is a request, false otherwise.

Definition at line 732 of file SipMessage.hxx.

◆ isResponse()

bool resip::SipMessage::isResponse ( ) const
inline

Returns true if message is a response, false otherwise.

Definition at line 734 of file SipMessage.hxx.

◆ make()

SipMessage * SipMessage::make ( const Data &  buffer,
bool  isExternal = false 
)
static

Construct a SipMessage object from a string containing a SIP request or response.

Parameters
buffera buffer containing a SIP message
isExternaltrue for a message generated externally, false otherwise.
Returns
constructed SipMessage object

Definition at line 372 of file SipMessage.cxx.

◆ mergeUri()

SipMessage & SipMessage::mergeUri ( const Uri &  source)

Definition at line 1725 of file SipMessage.cxx.

◆ method()

resip::MethodTypes SipMessage::method ( ) const

returns the method type of the message

See also
MethodTypes

Definition at line 670 of file SipMessage.cxx.

◆ methodStr()

const Data & SipMessage::methodStr ( ) const

Returns a string containing the SIP method for the message.

Definition at line 696 of file SipMessage.cxx.

◆ operator=()

SipMessage & SipMessage::operator= ( const SipMessage &  rhs)

Definition at line 198 of file SipMessage.cxx.

◆ parseAllHeaders()

void SipMessage::parseAllHeaders ( )

Definition at line 416 of file SipMessage.cxx.

◆ releaseContents()

unique_ptr< Contents > SipMessage::releaseContents ( )

Removes the contents from the message.

Definition at line 1202 of file SipMessage.cxx.

◆ remove() [1/3]

void SipMessage::remove ( const ExtensionHeader &  symbol)

Definition at line 1285 of file SipMessage.cxx.

◆ remove() [2/3]

void resip::SipMessage::remove ( const HeaderBase &  headerType)
inline

Prevents a header field from being present when the message is prepared for sending to a transport.

This does not free the memory that was used by the header.

Definition at line 770 of file SipMessage.hxx.

◆ remove() [3/3]

void SipMessage::remove ( Headers::Type  type)

Definition at line 1479 of file SipMessage.cxx.

◆ RESIP_HeapCount()

resip::SipMessage::RESIP_HeapCount ( SipMessage  )

◆ rollbackOutboundDecorators()

void SipMessage::rollbackOutboundDecorators ( )

Definition at line 1888 of file SipMessage.cxx.

◆ setBody()

void SipMessage::setBody ( const char *  start,
uint32_t  len 
)

Definition at line 1009 of file SipMessage.cxx.

◆ setConnectionInfo()

void resip::SipMessage::setConnectionInfo ( std::shared_ptr< const ConnectionInfo >  connectionInfo)
inlinenoexcept

Definition at line 1008 of file SipMessage.hxx.

◆ setContents() [1/2]

void SipMessage::setContents ( const Contents *  contents)

Set the contents of the message.

Parameters
contentsto store in the message

Definition at line 1135 of file SipMessage.cxx.

◆ setContents() [2/2]

void SipMessage::setContents ( std::unique_ptr< Contents >  contents)

Definition at line 1089 of file SipMessage.cxx.

◆ setDestination()

void resip::SipMessage::setDestination ( const Tuple &  tuple)
inline

Used by the stateless interface to specify where to send a request/response.

Definition at line 988 of file SipMessage.hxx.

◆ setForceTarget()

void SipMessage::setForceTarget ( const Uri &  uri)

deal with a notion of an "out-of-band" forced target for SIP routing

Definition at line 1692 of file SipMessage.cxx.

◆ setFromExternal()

void resip::SipMessage::setFromExternal ( )
inline

Mark message as externally generated.

Definition at line 690 of file SipMessage.hxx.

◆ setFromTU()

void resip::SipMessage::setFromTU ( )
inline

Mark message as internally generated.

Definition at line 687 of file SipMessage.hxx.

◆ setRawBody()

void SipMessage::setRawBody ( const HeaderFieldValue &  body)

Remove any existing body/contents, and (if non-empty) set the body to {body}.

It makes full copy of the body to stored within the SipMessage (since lifetime of the message is unpredictable).

This is a low-level interface; see setContents() for higher level.

Definition at line 1081 of file SipMessage.cxx.

◆ setRawHeader()

void SipMessage::setRawHeader ( const HeaderFieldValueList *  hfvs,
Headers::Type  headerType 
)

Definition at line 1663 of file SipMessage.cxx.

◆ setReceivedTransportTuple()

void resip::SipMessage::setReceivedTransportTuple ( const Tuple &  transportTuple)
inline

Set Tuple for transport from whence this message came.

Definition at line 978 of file SipMessage.hxx.

◆ setRFC2543TransactionId()

void SipMessage::setRFC2543TransactionId ( const Data &  tid)

Definition at line 664 of file SipMessage.cxx.

◆ setSecurityAttributes()

void SipMessage::setSecurityAttributes ( std::unique_ptr< SecurityAttributes >  sec)
noexcept

Definition at line 1798 of file SipMessage.cxx.

◆ setSource()

void resip::SipMessage::setSource ( const Tuple &  tuple)
inline

Definition at line 982 of file SipMessage.hxx.

◆ setStartLine()

void SipMessage::setStartLine ( const char *  start,
uint32_t  len 
)

dcm! should invoke the statusline parser here once it does limited validation

dcm! should invoke the responseline parser here once it does limited validation

Definition at line 964 of file SipMessage.cxx.

◆ setTlsDomain()

void resip::SipMessage::setTlsDomain ( const Data &  domain)
inline

Definition at line 1002 of file SipMessage.hxx.

◆ setTlsPeerNames()

void SipMessage::setTlsPeerNames ( const std::list< Data > &  tlsPeerNames)

Definition at line 1838 of file SipMessage.cxx.

◆ setWsCookieContext()

void SipMessage::setWsCookieContext ( std::shared_ptr< WsCookieContext >  wsCookieContext)

Definition at line 1854 of file SipMessage.cxx.

◆ setWsCookies()

void SipMessage::setWsCookies ( const CookieList &  wsCookies)

Definition at line 1846 of file SipMessage.cxx.

Friends And Related Symbol Documentation

◆ TransportSelector

friend class TransportSelector
friend

Definition at line 1181 of file SipMessage.hxx.

Member Data Documentation

◆ checkContentLength

bool SipMessage::checkContentLength =true
static

Definition at line 665 of file SipMessage.hxx.

◆ mIsBadAck200

bool resip::SipMessage::mIsBadAck200

Definition at line 1045 of file SipMessage.hxx.

◆ mIsDecorated

bool resip::SipMessage::mIsDecorated

Definition at line 1043 of file SipMessage.hxx.


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