Added documentation about critical CDR.
Authentication is now accepted even if critical. git-svn-id: http://voip.null.ro/svn/yate@582 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
1c702aa43e
commit
7d7da19fdd
|
@ -85,6 +85,9 @@ priority=120
|
|||
[call.cdr]
|
||||
; Queries for the CDR updating message
|
||||
|
||||
; critical: boolean: Reject all registrations and routing if query fails
|
||||
;critical=yes
|
||||
|
||||
initquery=UPDATE cdr SET ended=true WHERE ended IS NULL OR NOT ended
|
||||
cdr_initialize=INSERT INTO cdr VALUES(TIMESTAMP 'EPOCH' + INTERVAL '${time} s','${chan}','${address}','${direction}','${billid}','${caller}','${called}',INTERVAL '${duration} s',INTERVAL '${billtime} s',INTERVAL '${ringtime} s','${status}','${reason}',false)
|
||||
cdr_update=UPDATE cdr SET address='${address}',direction='${direction}',billid='${billid}',caller='${caller}',called='${called}',duration=INTERVAL '${duration} s',billtime=INTERVAL '${billtime} s',ringtime=INTERVAL '${ringtime} s',status='${status}',reason='${reason}' WHERE chan='${chan}' AND time=TIMESTAMP 'EPOCH' + INTERVAL '${time} s'
|
||||
|
@ -94,6 +97,9 @@ cdr_finalize=UPDATE cdr SET address='${address}',direction='${direction}',billid
|
|||
[linetracker]
|
||||
; Queries for the line usage tracker
|
||||
|
||||
; critical: boolean: Reject all registrations and routing if query fails
|
||||
;critical=no
|
||||
|
||||
initquery=UPDATE users SET inuse='0'
|
||||
cdr_initialize=UPDATE users SET inuse=inuse+1 WHERE username='${external}'
|
||||
cdr_finalize=UPDATE users SET inuse=(CASE WHEN inuse>0 THEN inuse-1 ELSE 0 END) WHERE username='${external}'
|
||||
|
|
|
@ -201,8 +201,6 @@ bool AAAHandler::received(Message& msg)
|
|||
break;
|
||||
case Auth:
|
||||
{
|
||||
if (s_critical)
|
||||
return failure(&msg);
|
||||
Message m("database");
|
||||
m.addParam("account",m_account);
|
||||
m.addParam("query",query);
|
||||
|
|
Loading…
Reference in New Issue