radiator 2.17.1 and radmin 2.14 on slack7.1(kernel 2.2.16) mysql 3.22.32 and
cisco 5300 VoIP.
seems that when a second person calls in, they never appear in 'Current
Session' from Radmin. i get an error while inserting the record into the SQL
table. the first person that calls in shows up fine!
i'm pretty sure it has to do with the table definition of RADONLINE, but being
no mySQL (or any database guru), i'm not sure what i need to change..
any and all help would be greatly appreciated!
here is the relevant trace 4 log:
*** Received from 10.0.65.66 port 1646 ....
Code: Accounting-Request
Identifier: 76
Authentic: <184><158>"<136>K<174><244>dH<197>`<237><25>=]<14>
Attributes:
NAS-IP-Address = 10.0.65.66
NAS-Port-Type = Async
User-Name = "8503090604"
Called-Station-Id = "2190999"
Calling-Station-Id = "8503090604"
Acct-Status-Type = Start
Service-Type = Login-User
cisco-h323-gw-id = "h323-gw-id=gw0-flta-gc.accesswire.net"
cisco-h323-conf-id = "h323-conf-id=443C3A21 A31602BB 0 2C984E78"
cisco-avpair = "h323-incoming-conf-id=443C3A21 A31602BB 0 2C984E78"
cisco-h323-call-origin = "h323-call-origin=answer"
cisco-h323-call-type = "h323-call-type=Telephony"
cisco-h323-setup-time = "h323-setup-time=10:57:18.674 est Fri Dec 8
2000
"
Acct-Session-Id = "00000102"
Acct-Delay-Time = 0
Fri Dec 8 10:59:00 2000: DEBUG: Check if Handler Called-Station-Id=2190999
should be used to handle this request
Fri Dec 8 10:59:00 2000: DEBUG: Handling request with Handler
'Called-Station-Id=2190999'
Fri Dec 8 10:59:00 2000: DEBUG: dummy Adding session for 8503090604,
10.0.65.66,
Fri Dec 8 10:59:00 2000: DEBUG: do query is: delete from RADONLINE where
USERNAME = '8503090604' and NASIDENTIFIER = '10.0.65.66'
Fri Dec 8 10:59:00 2000: DEBUG: do query is: insert into RADONLINE
(USERNAME, N
ASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS,
NASPORTTYPE,
SERVICETYPE) values ('8503090604', '10.0.65.66', 0, '00000102', 976291140,
'', 'Async', 'Login-User')
Fri Dec 8 10:59:00 2000: ERR: do failed for 'insert into RADONLINE
(USERNAME, N
ASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS,
NASPORTTYPE,
SERVICETYPE) values ('8503090604', '10.0.65.66', 0, '00000102', 976291140,
'', 'Async', 'Login-User')': Duplicate entry '10.0.65.66-0' for key 2
Fri Dec 8 10:59:00 2000: ERR: do failed for 'insert into RADONLINE
(USERNAME, N
ASIDENTIFIER, NASPORT, ACCTSESSIONID, TIME_STAMP, FRAMEDIPADDRESS,
NASPORTTYPE,
SERVICETYPE) values ('8503090604', '10.0.65.66', 0, '00000102', 976291140,
'', 'Async', 'Login-User')': Duplicate entry '10.0.65.66-0' for key 2
Fri Dec 8 10:59:00 2000: DEBUG: Accounting accepted
Fri Dec 8 10:59:00 2000: DEBUG: Packet dump:
*** Sending to 10.0.65.66 port 1646 ....
here is my current radius.cfg:
Foreground
LogStdout
LogDir /usr/local/etc/raddb/
DbDir /usr/local/etc/raddb/
LogFile logfile
Trace 4
BindAddress 10.0.65.68
#<Log SQL>
# DBSource dbi:mysql:radmin:localhost
# DBUsername xxxxxx
# DBAuth xxxxxx
# Table RADMESSAGES
# Trace 3
# LogQuery insert into RADMESSAGES (TIME_STAMP, TYPE, MESSAGE) values
#(%t, $p, $s)
#</Log>
<ClientListSQL>
DBSource dbi:mysql:radmin:localhost
DBUsername xxxxxx
DBAuth xxxxxx
</ClientListSQL>
<Handler Called-Station-Id=2190999>
AccountingHandled
SessionDatabase dummy
</Handler>
<Handler Acct-Status-Type=Start>
AccountingHandled
SessionDatabase start
</Handler>
<Handler
Acct-Status-Type=Stop,cisco-h323-call-origin=h323-call-origin=answer>
AccountingHandled
SessionDatabase stop
</Handler>
<Handler>
SessionDatabase radmin
<AuthBy RADMIN>
DBSource dbi:mysql:radmin:localhost
DBUsername xxxxxx
DBAuth xxxxxx
AccountingTable RADUSAGE
AcctColumnDef USERNAME,User-Name
AcctColumnDef TIME_STAMP,Timestamp,integer
AcctColumnDef ACCTINPUTOCTETS,Acct-Input-Octets,integer
AcctColumnDef ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
AcctColumnDef ACCTSTATUSTYPE,Acct-Status-Type,integer
AcctColumnDef ACCTDELAYTIME,Acct-Delay-Time,integer
AcctColumnDef ACCTSESSIONID,Acct-Session-Id
AcctColumnDef ACCTSESSIONTIME,Acct-Session-Time,integer
AcctColumnDef ACCTTERMINATECAUSE,cisco-h323-disconnect-cause,integer
AcctColumnDef NASIDENTIFIER,NAS-IP-Address
AcctColumnDef DNIS,Called-Station-Id
</AuthBy>
</Handler>
<SessionDatabase SQL>
Identifier radmin
DBSource dbi:mysql:radmin:localhost
DBUsername xxxxxx
DBAuth xxxxxx
AddQuery insert into RADONLINE (USERNAME, NASIDENTIFIER,
ACCTSESSIONID, TIME_STAMP, DNIS) values ('%n', '%N', '%{Acct-Session-Id}',
'%{Timestamp}', '%{Called-Station-Id}')
DeleteQuery delete from RADONLINE where USERNAME = '%n' and
NASIDENTIFIER = '%N'
</SessionDatabase>
<SessionDatabase SQL>
Identifier dummy
DBSource dbi:mysql:dummy:localhost
DBUsername xxxxxx
DBAuth xxxxxx
DeleteQuery delete from RADONLINE where USERNAME = '%n' and
NASIDENTIFIER = '%N'
</SessionDatabase>
<SessionDatabase SQL>
Identifier start
DBSource dbi:mysql:radmin:localhost
DBUsername xxxxxx
DBAuth xxxxxx
AddQuery insert into RADONLINE (USERNAME, NASIDENTIFIER,
ACCTSESSIONID, TIME_STAMP, DNIS) values ('%n', '%N', '%{Acct-Session-Id}',
'%{Timestamp}', '%{Called-Station-Id}')
DeleteQuery delete from RADONLINE where USERNAME = '%n' and
NASIDENTIFIER = '%N'
</SessionDatabase>
<SessionDatabase SQL>
Identifier stop
DBSource dbi:mysql:radmin:localhost
DBUsername xxxxxx
DBAuth xxxxxx
DeleteQuery delete from RADONLINE where USERNAME = '%n' and
NASIDENTIFIER = '%N'
</SessionDatabase>
#---------------------------------------------------------------#
# Ken Sain [EMAIL PROTECTED] #
# Systems Administrator 850.309.7999 - office #
# Genesis Communications Network 888.598.8942 - pager #
#---------------------------------------------------------------#
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.