1#if defined(HAVE_CONFIG_H)
15#define RESIPROCATE_SUBSYSTEM resip::Subsystem::REPRO
23 mAlwaysAllowRelaying(alwaysAllowRelaying)
32 DebugLog(<<
"Monkey handling request: " << *
this
33 <<
"; reqcontext = " << context);
44 request.
header(h_Routes).empty());
51 target->rec().mUseFlowRouting =
true;
57 if (!request.
exists(h_Routes) ||
58 request.
header(h_Routes).empty())
73 InfoLog(<<
"Garbage in To header: needed for relay check.");
110 InfoLog(<<
"Garbage in From header: needed for relay check.");
129 InfoLog (<< *
this <<
": will not relay to " << uri <<
" from "
130 << request.
header(h_From).
uri() <<
", send 403");
137 std::unique_ptr<Target> target(
new Target(uri));
140 InfoLog (<<
"Sending to requri: " << uri);
#define resip_assert(x)
This file needs to work for both C and C++ code.
virtual processor_action_t process(RequestContext &)
AmIResponsible(bool alwaysAllowRelaying=false)
virtual ~AmIResponsible()
bool mAlwaysAllowRelaying
static resip::KeyValueStore::Key mFromTrustedNodeKey
virtual bool isMyUri(const resip::Uri &uri) const
void doSessionAccounting(const resip::SipMessage &sip, bool received, RequestContext &context)
resip::SipMessage & getOriginalRequest()
Returns the SipMessage associated with the server transaction.
ResponseContext & getResponseContext()
resip::Tuple & getTopRouteFlowTuple()
void sendResponse(resip::SipMessage &response)
bool isTopRouteFlowTupleSet()
resip::KeyValueStore & getKeyValueStore()
resip::Data addTarget(const resip::NameAddr &target, bool beginImmediately=false)
Adds this Target as a SimpleTarget to the collection of Targets.
static void makeResponse(SipMessage &response, const SipMessage &request, int responseCode, const Data &reason=Data::Empty, const Data &hostname=Data::Empty, const Data &warning=Data::Empty)
Make a response to a provided request.
const bool & getBoolValue(Key key) const
bool isWellFormed() const
Returns true iff this element was parsed successfully, according to the implementation of parse().
Represents a SIP message.
bool hasForceTarget() const
const RequestLine & header(const RequestLineType &l) const
Returns the RequestLine. This is only valid for request messages.
bool exists(const HeaderBase &headerType) const
Returns true if the given header field is present, false otherwise.
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
This Class is used to implement a primitive form of RPC using loose XML formatting.
dcm! – add UnusedChecking(_enum) below;
RequestLineType h_RequestLine