Fixed sample query to log out disabled accounts.

git-svn-id: http://voip.null.ro/svn/yate@4601 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2011-09-14 12:47:43 +00:00
parent b17f75a817
commit f91686b2bc
1 changed files with 6 additions and 2 deletions

View File

@ -147,10 +147,14 @@
; Queries for registering as client to other servers
; query executed only once to create client registrations at startup
;initquery=SELECT enabled,protocol,username,password,server FROM accounts WHERE enabled IS TRUE
;initquery=SELECT protocol,username,password,server FROM accounts WHERE enabled IS TRUE
; poll on timer to update registrations if database was changed externally
;timerquery=BEGIN; SELECT enabled,protocol,username,password,server FROM accounts WHERE modified IS TRUE; UPDATE accounts SET modified=FALSE; COMMIT
;timerquery=BEGIN; \
; SELECT (CASE WHEN enabled IS FALSE THEN 'logout' ELSE 'login' END) AS operation,\
; protocol,username,password,server FROM accounts WHERE modified IS TRUE; \
; UPDATE accounts SET modified=FALSE; \
; COMMIT
; update account status after receiving an user.notify
;statusquery=UPDATE accounts SET status='${status}' WHERE account='${internalaccount}'