1#if defined(HAVE_CONFIG_H)
10#include "resip/dum/RegistrationPersistence
14#define RESIPROCATE_SUBSYSTEM resip::Subsystem::REPRO
29 DebugLog(<<
"Monkey handling request: " << *
this
30 <<
"; reqcontext = " << context);
47 if (reqUri.
exists(p_opaque))
54 if (!mStore.mUserStore.aorExists(aor))
58 InfoLog (<< *
this <<
": no AOR matching this GRUU found. Gruu: <" << uri <<
">, sending 404");
64 if (mStore.isContactRegistered(reqUri.
getAor(), reqUri.
param(p_opaque)))
70 grid = reqUri.params(p_grid);
74 RegistrationPersistenceManager::ContactList records = mStore.getRegistrationBinding(aor)->mContacts;
75 RegistrationPersistenceManager::ContactList::const_iterator i;
77 for (i = records.begin(); i != records.end(); ++i)
79 if (i->mInstance == reqUri.
param(p_opaque))
85 if (i->mContact.exists(p_q))
87 newTarget.
param(p_q) = i->mContact.param(p_q);
93 newTarget.
uri().
param(p_grid) = grid;
99 if (i->mSipPath.empty())
102 context.addTarget(newTarget, i->mServerSessionId);
106 context.addTarget(newTarget, i->mSipPath);
119 InfoLog (<< *
this <<
": no contacts matching this GRUU found. Gruu: <" << uri <<
">, sending 480");
133 os <<
"Gruu Monkey" << std::endl;
#define resip_assert(x)
This file needs to work for both C and C++ code.
virtual void dump(std::ostream &os) const
virtual processor_action_t process(RequestContext &)
resip::SipMessage & getOriginalRequest()
Returns the SipMessage associated with the server transaction.
void sendResponse(resip::SipMessage &response)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
bool empty() const noexcept
Checks whether the Data is empty.
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.
Represents the "name-addr" and the "addr-spec" elements in the RFC 3261 grammar.
const Data & param(const ExtensionParameter ¶m) const
Const accessor for non-natively-supported parameter types.
Represents a SIP message.
const RequestLine & header(const RequestLineType &l) const
Returns the RequestLine. This is only valid for request messages.
Represents the "SIP-URI" and "SIPS-URI" elements in the RFC 3261 grammar.
bool exists(const Param< Uri > ¶mType) const
const Data & param(const ExtensionParameter ¶m) const
Const accessor for non-natively-supported parameter types.
This Class is used to implement a primitive form of RPC using loose XML formatting.
dcm! – add UnusedChecking(_enum) below;
RequestLineType h_RequestLine