Allow selective handling of user.auth and call.cdr in several modules.
git-svn-id: http://yate.null.ro/svn/yate/trunk@4422 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
1139c82d79
commit
aa86953a04
|
@ -85,6 +85,8 @@ void CdrFileHandler::init(const char *fname, bool tabsep, const char* format)
|
|||
|
||||
bool CdrFileHandler::received(Message &msg)
|
||||
{
|
||||
if (!msg.getBoolValue("cdrwrite_cdrfile",true))
|
||||
return false;
|
||||
String op(msg.getValue("operation"));
|
||||
if (op != "finalize")
|
||||
return false;
|
||||
|
|
|
@ -129,6 +129,8 @@ bool expired(const NamedList& list, unsigned int time)
|
|||
|
||||
bool AuthHandler::received(Message &msg)
|
||||
{
|
||||
if (!msg.getBoolValue("auth_regfile",true))
|
||||
return false;
|
||||
String username(msg.getValue("username"));
|
||||
if (username.null() || username == s_general)
|
||||
return false;
|
||||
|
|
|
@ -436,6 +436,8 @@ bool AAAHandler::received(Message& msg)
|
|||
break;
|
||||
case Auth:
|
||||
{
|
||||
if (!msg.getBoolValue("auth_register",true))
|
||||
return false;
|
||||
Message m("database");
|
||||
prepareQuery(m,account,query,true);
|
||||
if (Engine::dispatch(m))
|
||||
|
@ -550,6 +552,8 @@ bool CDRHandler::loadQuery()
|
|||
|
||||
bool CDRHandler::received(Message& msg)
|
||||
{
|
||||
if (!msg.getBoolValue("cdrwrite_register",true))
|
||||
return false;
|
||||
if (m_account.null())
|
||||
return false;
|
||||
// Don't update CDR if told so
|
||||
|
|
|
@ -1326,6 +1326,8 @@ bool RadiusClient::returnAttributes(NamedList& params, const ObjList* attributes
|
|||
|
||||
bool AuthHandler::received(Message& msg)
|
||||
{
|
||||
if (!msg.getBoolValue("auth_radius",true))
|
||||
return false;
|
||||
String proto = msg.getValue("protocol",msg.getValue("module"));
|
||||
if (proto.null())
|
||||
return false;
|
||||
|
@ -1424,6 +1426,8 @@ static bool ciscoTime(double t, String& ret)
|
|||
|
||||
bool AcctHandler::received(Message& msg)
|
||||
{
|
||||
if (!msg.getBoolValue("cdrwrite_radius",true))
|
||||
return false;
|
||||
String op = msg.getValue("operation");
|
||||
int acctStat = 0;
|
||||
if (op == "initialize")
|
||||
|
|
Loading…
Reference in New Issue