[Emerald] Time Banking not Working

CPD JR ( jr@ceub.br )
Thu, 02 Sep 1999 17:38:17 -0300

Hi,

I really can't find a solution for this time banking problem, it just
won't subtract
the time from timeleft field in subaccounts table.
I appreciate all help.

I'm using:
Radius NT 2.5.162
Emerald 2.1.11)
Windows NT 4 SP5
SQL 6.5
3Com HiperARC...

On Radius NT admin/Advanced is checked:
Concurrency Control
Variable Login Limits
Time Banking
Manual Calls Update
Manual Srvc Update

Radius -x15:
-------------

0) Mode: 1
1) IgnoreCase: 0
2) TrimName: 0
3) ReqAcctAuth: 0
4) AllowMalformed: 1
5) Proxy: 0
6) Options: 207
7) Debug: 8
8) LogFile:
9) AcctLogFile:
10) ODBCDatasource: EMERALD
11) Username: username
12) Password: password
13) AcctODBCDatasource:
14) AcctUsername:
15) AcctPassword:
16) DataDirectory: d:\services\radius
17) AcctDirectory: d:\services\radius
18) UsersFile: Users
19) CompanyName: CEUB
20) License: 000000000
21) IPAddress: 172.16.1.5
22) SNMP: 0
23) TestDatabaseSecs:

Param: Debug Level: 15
Initializing Winsock...
ODBC Datasource: 'EMERALD'...
Making ODBC Connection...
MS SQL Server Mode Enabled

SQL Statement: Select DISTINCT Company, LicenseID From Licenses

SQL Statement: Select DISTINCT Company, LiscenseID From Liscenses

ODBC Datasource: 'EMERALD'...
Making ODBC Connection...
MS SQL Server Mode Enabled

SQL Statement: Select DISTINCT Company, LicenseID From Licenses

SQL Statement: Select DISTINCT Company, LiscenseID From Liscenses

Licensed MBRs: 10500
Allocating Statement...

Resp Time: 141 Auth: 3/0 -> 3 Acct: 3/0/0 -> 3
radrecv: Request from host c8fc5c2c code=4, id=98, length=294

User-Name = "mr614"
NAS-Identifier = 192.168.250.3
Acct-Status-Type = Stop
Acct-Session-Id = "2614010340"
Acct-Delay-Time = 0
Acct-Authentic = RADIUS
User-Service = Framed-User
NAS-Port-Type = Async
NAS-Port = 1309
Received unknown attribute 38978, vendor 429
Received unknown attribute 38979, vendor 429
Received unknown attribute 36889, vendor 429
Received unknown attribute 36890, vendor 429
Received unknown attribute 36891, vendor 429
Received unknown attribute 36893, vendor 429
Caller-Id = "612235797"
NAS-Port-DNIS = "1968"
Received unknown attribute 108, vendor 429
Received unknown attribute 153, vendor 429
Received unknown attribute 199, vendor 429
Received unknown attribute 36899, vendor 429
Framed-Protocol = PPP
Framed-Address = 192.168.250.87
Acct-Session-Time = 1007
Acct-Terminate-Cause = User-Request
Acct-Input-Octets = 63277
Acct-Output-Octets = 515724
Acct-Input-Packets = 753
Acct-Output-Packets = 568

SQL Statement: INSERT INTO Calls
(CallDate,UserName,NASIdentifier,AcctStatusType,AcctSessionId,AcctDelayTime,UserService,NASPortType,NASPort,CallerId,NASPortDNIS,FramedProtocol,FramedAddress,AcctSessionTime,AcctTerminateCause,AcctInputOctets,AcctOutputOctets)

VALUES
(GetDate(),'mr614','192.168.250.3',2,'2614010340',0,2,0,1309,'612235797','1968',1,'192.168.250.87',1007,1,63277,515724)

SQL Statement: UPDATE CallsOnline Set
Username='mr614',AcctStatusType=2, CallDate=GetDate(),
FramedAddress='192.168.250.87' WHERE NASIdentifier='192.168.250.3' and
NASPort=1309 AND
(DateAdd(Second, 0-2, GetDate()) >= CallDate OR CallDate IS NULL)

SQL Statement: UPDATE SubAccounts Set TimeLeft=TimeLeft-17 Where
TimeLeft<>Null And TimeLeft<>-9999
And Login='mr614'

Sending Accounting Ack of id 98 to c8fc5c2c (200.252.92.44)

Resp Time: 172 Auth: 3/0 -> 3 Acct: 4/0/0 -> 4
radrecv: Request from host c8fc5c2c code=1, id=151, length=165

User-Name = "ft57448"
Password = "X\00\30\33\g\22\31\20v\24\262"
NAS-Identifier = 192.168.250.3
NAS-Port = 22
Acct-Session-Id = "1376286"
Received unknown attribute 38979, vendor 429
User-Service = Framed-User
Framed-Protocol = PPP
Received unknown attribute 36889, vendor 429
Received unknown attribute 36890, vendor 429
Received unknown attribute 36891, vendor 429
Caller-Id = "615916133"
NAS-Port-DNIS = "1968"
NAS-Port-Type = Async
rad_authenticate_ODBC()

Password = "X\00\30\33\g\22\31\20v\24\262"

SQL Statement: Select DateDiff(Minute, GetDate(), DateAdd(Day,
(ma.Extension+ma.OverDue+1), maExpireDate)),
DateDiff(Minute, GetDate(), DateAdd(Day, sa.Extension+1, saExpireDate)),
sa.AccountID, sa.AccountType,
sa.Password, sa.Login, sa.Shell, sa.TimeLeft, sa.LoginLimit, ma.Balance,
ma.OverLimit From MasterAccounts ma,
SubAccounts sa Where (sa.Login='ft57448' or sa.Shell='ft57448' or
sa.Email='ft57448') AND
ma.CustomerID=sa.CustomerID and sa.Active<>0 and ma.Active<>0

Decrypted Password: i09as00
Database Password: i09as00
Checking for duplicate logins.

SQL Statement: RadCheckOnline 'ft57448'

ft57448 found on-line 0 time(s).

SQL Statement: RadGetConfigs 1117

Loading radius defaults for this type...

SQL Statement: RadGetATConfigs 'PPP'

User-Service = 2 (2)
Framed-Protocol = 1 (1)
Sending Ack of id 151 to c8fc5c2c (200.252.92.44)

User-Service = Framed-User
Framed-Protocol = PPP
Session-Timeout = 108000

Resp Time: 47 Auth: 4/0 -> 4 Acct: 4/0/0 -> 4
radrecv: Request from host c8fc5c2c code=4, id=99, length=255

User-Name = "ft57448"
NAS-Identifier = 192.168.250.3
Acct-Status-Type = Start
Acct-Session-Id = "1376286"
Acct-Delay-Time = 0
Acct-Authentic = RADIUS
User-Service = Framed-User
NAS-Port-Type = Async
NAS-Port = 22
Received unknown attribute 38978, vendor 429
Received unknown attribute 38979, vendor 429
Received unknown attribute 36889, vendor 429
Received unknown attribute 36890, vendor 429
Received unknown attribute 36891, vendor 429
Received unknown attribute 36893, vendor 429
Caller-Id = "615916133"
NAS-Port-DNIS = "1968"
Received unknown attribute 108, vendor 429
Received unknown attribute 153, vendor 429
Received unknown attribute 199, vendor 429
Received unknown attribute 36899, vendor 429
Framed-Protocol = PPP
Framed-Address = 192.168.250.80

SQL Statement: INSERT INTO Calls
(CallDate,UserName,NASIdentifier,AcctStatusType,AcctSessionId,AcctDelayTime,UserService,NASPortType,NASPort,CallerId,NASPortDNIS,FramedProtocol,FramedAddress)

VALUES
(GetDate(),'ft57448','192.168.250.3',1,'1376286',0,2,0,22,'615916133','1968',1,'192.168.250.80')

SQL Statement: UPDATE CallsOnline Set
Username='ft57448',AcctStatusType=1, CallDate=GetDate(),
FramedAddress='192.168.250.80' WHERE NASIdentifier='192.168.250.3' and
NASPort=22 AND
(DateAdd(Second, 0-1, GetDate()) >= CallDate OR CallDate IS NULL)

Sending Accounting Ack of id 99 to c8fc5c2c (200.252.92.44)

For more information about this list (including removal) go to:
http://www.iea-software.com/support/maillists/liststart