1#if defined(HAVE_CONFIG_H)
17#define RESIPROCATE_SUBSYSTEM resip::Subsystem::REPRO
25 mRouteStore(config.getDataStore()->mRouteStore),
26 mNoChallenge(config.getConfigBool(
"DisableAuth", false) || !config.getConfigBool(
"ChallengeThirdPartiesCallingLocalDomains", true)),
27 mParallelForkStaticRoutes(config.getConfigBool(
"ParallelForkStaticRoutes", false)),
28 mContinueProcessingAfterRoutesFound(config.getConfigBool(
"ContinueProcessingAfterRoutesFound", false)),
29 mUseAuthInt(!config.getConfigBool(
"DisableAuthInt", false))
31 std::vector<resip::Data> digestTypeStrings;
32 if (config.
getConfigValue(
"DigestChallengeAlgorithms", digestTypeStrings))
35 for (
auto it = digestTypeStrings.begin(); it != digestTypeStrings.end(); ++it)
51 DebugLog(<<
"Monkey handling request: " << *
this
52 <<
"; reqcontext = " << context);
62 event = msg.
header(h_Event).value() ;
68 bool requireAuth =
false;
69 bool externalTarget =
false;
75 for ( RouteStore::UriList::const_iterator i = targets.begin();
76 i != targets.end(); i++ )
78 const Data& targetDomain = i->host();
81 DebugLog(<<
"target domain " << targetDomain <<
" is not local");
82 externalTarget =
true;
92 && !externalTarget && requireAuth)
94 DebugLog(<<
"overriding requireAuth because certificate validation succeeded and no targets are external");
109 for (RouteStore::UriList::const_iterator i = targets.begin();
110 i != targets.end(); i++ )
113 InfoLog(<<
"Adding target " << *i );
118 parallelBatch.push_back(target);
126 if(parallelBatch.size() > 0)
static resip::KeyValueStore::Key mCertificateVerifiedKey
static resip::KeyValueStore::Key mFromTrustedNodeKey
resip::SipMessage & getOriginalRequest()
Returns the SipMessage associated with the server transaction.
ResponseContext & getResponseContext()
const resip::Data & getDigestIdentity() const
void sendResponse(resip::SipMessage &response)
resip::KeyValueStore & getKeyValueStore()
resip::Data addTarget(const resip::NameAddr &target, bool beginImmediately=false)
Adds this Target as a SimpleTarget to the collection of Targets.
bool addTargetBatch(TargetPtrList &targets, bool highPriority=false)
Adds a batch of Targets.
std::vector< resip::Uri > UriList
UriList process(const resip::Uri &ruri, const resip::Data &method, const resip::Data &event)
bool mParallelForkStaticRoutes
void challengeRequest(repro::RequestContext &rc, resip::Data &realm)
bool mContinueProcessingAfterRoutesFound
virtual processor_action_t process(RequestContext &)
std::vector< resip::DigestType > mChallengeDigestTypes
StaticRoute(ProxyConfig &config)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
bool empty() const noexcept
Checks whether the Data is empty.
static SipMessage * makeProxyChallenge(const SipMessage &request, const Data &realm, bool useAuth=true, bool stale=false, const std::vector< DigestType > &digestTypes=std::vector< DigestType >())
static bool isDigestAlgorithmSupported(const Auth &auth, DigestType &digestType)
const bool & getBoolValue(Key key) const
bool isWellFormed() const
Returns true iff this element was parsed successfully, according to the implementation of parse().
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
bool getConfigValue(const resip::Data &name, resip::Uri &value)
Represents a SIP message.
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.
resip::MethodTypes method() const
returns the method type of the message
bool isMyDomain(const Data &domain) const
Returns true iff domain matches one of the domains that this TransactionUser is responsible for.
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.
std::list< Target * > TargetPtrList
dcm! – add UnusedChecking(_enum) below;
const Data & getMethodName(MethodTypes t)
RequestLineType h_RequestLine