19#define RESIPROCATE_SUBSYSTEM resip::Subsystem::REPRO
24using resip::h_RecordRoutes;
60 DebugLog(<<
"Proxy::decorateMessage called.");
63 if(isTransportSwitch(
source))
65 if(mAlreadySingleRecordRouted)
78 if(outboundFlowTokenNeeded(
request,
source, destination, sigcompId) ||
104 resip::NameAddrs::iterator second = ++(
routes->begin());
105 if(*second ==
routes->front())
124 if(outboundFlowTokenNeeded(
request,
source, destination, sigcompId))
126 if(isSecure(destination.
getType()))
163 rt.uri().param(p_comp)=
"sigcomp";
171 InfoLog(<<
"Adding outbound Path: " <<
rt);
176 InfoLog(<<
"Adding outbound Record-Route: " <<
rt);
210 request.header(h_RecordRoutes).push_front(
rt);
219 if(mForceRecordRouteEnabled)
242 || mIsOriginalSenderBehindNAT
243 || !sigcompId.
empty());
253 &(
request.header(resip::h_Paths)) :
254 &(
request.header(resip::h_RecordRoutes));
256 if (mAddedRecordRoute < 0)
258 ErrLog(<<
"RRDecorator::rollbackMessage: mAddedRecordRoute=" << mAddedRecordRoute <<
" is < 0, logic error, resetting to 0");
259 mAddedRecordRoute = 0;
262 while (mAddedRecordRoute > 0 && !
routes->empty())
268 if (mAlreadySingleRecordRouted && !
routes->empty())
#define resip_assert(x)
This file needs to work for both C and C++ code.
const resip::NameAddr & getRecordRoute(unsigned int transportKey, bool *transportSpecific=0) const
static resip::Data FlowTokenSalt
bool compressionEnabled() const
virtual MessageDecorator * clone() const
virtual void decorateMessage(resip::SipMessage &msg, const resip::Tuple &source, const resip::Tuple &destination, const resip::Data &sigcompId)
virtual void rollbackMessage(resip::SipMessage &msg)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
bool empty() const noexcept
Checks whether the Data is empty.
static void massageRoute(const SipMessage &request, NameAddr &route)
static bool getRRTokenHackEnabled()
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
void pop_front()
if mParsers vector is not empty, erase the first element
Represents a SIP message.
Represents a network address.
IpVersion ipVersion() const
Returns V4 or V6 as appropriate.
bool onlyUseExistingConnection
static const Data & toDataLower(TransportType type)
static void writeBinaryToken(const Tuple &tuple, Data &container, const Data &salt=Data::Empty)
TransportType getType() const
static Data inet_ntop(const Tuple &tuple)
Converts the binary socket address to presentation format, via the DnsUtil::inet_ntop() method.
TransportKey mTransportKey
This Class is used to implement a primitive form of RPC using loose XML formatting.
RequestLineType h_RequestLine