Re: Freeradius - MySQL Update problem

2007-08-09 Thread Claudiu Filip
Hi musoket,
> rad_recv: Accounting-Request packet from host n.a.s.1:1646, id=239,
> length=531
> Acct-Session-Id = "0024F8FF"
> Calling-Station-Id = "442098765432"
> Called-Station-Id = "0002561234567"
> h323-setup-time = "h323-setup-time=16:53:14.471 GMT+3 Mon Aug 6 2007"
> h323-gw-id = "h323-gw-id=Rotelkom_Gateway.www.nas.co.ug"
> h323-conf-id = "h323-conf-id=B4550CDC FAA011D6 887DF94C E05F1EEE"
> h323-call-origin = "h323-call-origin=answer"
> h323-call-type = "h323-call-type=VoIP"
> Cisco-AVPair = "h323-incoming-conf-id=B4550CDC FAA011D6 887DF94C
> E05F1EEE"
> Cisco-AVPair = "subscriber=Unknown"
> Cisco-AVPair = "session-protocol=cisco"
> Cisco-AVPair = "gw-rxd-cdn=ton:0,npi:1,#:0002561234567"
> User-Name = "rem.ote.add.ress"
> Cisco-AVPair = "connect-progress=Call Up"
> Acct-Authentic = 0
> Acct-Status-Type = Start
> Service-Type = Login-User
> NAS-IP-Address = n.a.s.1
> Acct-Delay-Time = 10


At the beginning of this thread you said that you saw in logs
h323-remote-address, but not in the sql database.
>From this snapshot, I dont see an entry with
 h323-remote-address = "h323-remote-address=x.y.z.t"

If you get the remote-address as User-Name, you can store that field
in db.


Regards,

Claudiu Filip
@: [EMAIL PROTECTED]
Http://www.globtel.ro
T:+40344880100
F:+40344880113




- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Freeradius - MySQL Update problem

2007-08-08 Thread musoket
Hi Claudiu,

Thanks for your response,

Wed, 8 Aug 2007 12:24:57 +0300, you wrote:
>For Cisco, please be sure that you have in your config
>
>radius-server vsa send accounting
>gw-accounting aaa
>
>(or "gw-accounting h323 aaa" for an older IOS)
>
>
>Best regards,
>
>Claudiu Filip
>@: [EMAIL PROTECTED]
>Http://www.globtel.ro
>T:+40344880100
>F:+40344880113

Yes, in my CISCO config I already have:

radius-server vsa send accounting
gw-accounting aaa


Regards

Timothy

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re[2]: Freeradius - MySQL Update problem

2007-08-08 Thread Claudiu Filip



For Cisco, please be sure that you have in your config

radius-server vsa send accounting
gw-accounting aaa

(or "gw-accounting h323 aaa" for an older IOS)


Best regards,

Claudiu Filip
@: [EMAIL PROTECTED]
Http://www.globtel.ro
T:+40344880100
F:+40344880113

Monday, August 6, 2007, 6:58:06 PM, Ivan Kalik wrote:
> PS. BTW there is no h323-remote-address attribute in those requests.


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Freeradius - MySQL Update problem

2007-08-07 Thread tnt
Yes, but there was no h323-remote-address attribute in the accounting
requests. So, nothing was logged.

Ivan Kalik
Kalik Informatika ISP


Dana 7/8/2007, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> piše:

>
>Hello Ivan,
>Mon, 06 Aug 2007 16:45:09 +0100, you wrote:
>
>>>rlm_acct_unique: WARNING: Attribute NAS-Port was not found in request,
>>>unique ID MAY be inconsistent
>
>>This is the source of the errors in log entries.
>
>>These are accounting start (VoIP and telephony) and stop requests. They
>>will use accounting_start_query and accounting_stop_query. In your
>>previous post you showed what you have done to
>>accounting_update_query_alt:
>>
>>accounting_update_query_alt = "INSERT into ${acct_table1} (AcctSessionId,
>>AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType,
>>AcctSt
>>artTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start,
>>AcctInputOctets,
>>AcctOutputOctets, CalledStationId, CallingStationId,
>>ServiceType,FramedProtocol, FramedIPAddress, AcctStartDelay)
>>values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',
>>'%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}',
>>'%{Cisco-NAS-Port}',
>>'%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} +
>>%{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}',
>>'%{Acct-Authentic}','', '%{Acct-Input-Octets}',
>>'%{Acct-Output-Octets}',
>>'%{Called-Station-Id}', '%{Calling-Station-Id}',
>>'%{h323-remote-address}',
>>'%{Framed-Protocol}', '%{h323-remote-address}', '0')"
>
>>That query is not getting executed. You need to alter
>>accounting_start_query and expand it with those attributes.
>
>>Ivan Kalik
>>Kalik Informatika ISP
>
>Here are my accounting_start and accounting_stop queries. The attributes were
>already included:
>
>
>accounting_start_query = "INSERT into ${acct_table1} (AcctSessionId,
>AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPor
>tType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic,
>ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets,
> CalledStationId, CallingStationId, AcctTerminateCause, ServiceType,
>FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values
>('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}',
>'%{Realm}', '%{NAS-IP-Address}', '%{Cisco-NAS-Port}', '%{NAS-Port-T
>ype}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0',
>'%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{h323-r
>emote-address}', '%{Framed-Protocol}', '%{h323-remote-address}',
>'%{Acct-Delay-Time}', '0')"
>
>accounting_start_query_alt  = "UPDATE ${acct_table1} SET
>AcctStartTime = '%S', AcctStartDelay = '%{Acct-Delay-Time}', ConnectInfo_s
>tart = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND
>UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}
>'"
>
>accounting_stop_query = "UPDATE ${acct_table2} SET AcctStopTime =
>'%S', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets =
> '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}',
>AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acc
>t-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId =
>'%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIP
>Address = '%{NAS-IP-Address}'"
>
>accounting_stop_query_alt = "INSERT into ${acct_table2} (AcctSessionId,
>AcctUniqueId, UserName, Realm, NASIPAddress,NASPortId, NASPortType,
> AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic,
>ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, Calle
>dStationId, CallingStationId, AcctTerminateCause, ServiceType,
>FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Ac
>ct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}',
>'%{NAS-IP-Address}', '%{Cisco-NAS-Port}', '%{NAS-Port-Type}',
> DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0})
>SECOND), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '',
>'%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}',
>'%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Caus
>e}', '%{h323-remote-address}', '%{Framed-Protocol}',
>'%{h323-remote-address}', '0', '%{Acct-Delay-Time}')"
>
>
>
>-
>List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Freeradius - MySQL Update problem

2007-08-06 Thread musoket

Hello Ivan,
Mon, 06 Aug 2007 16:45:09 +0100, you wrote:

>>rlm_acct_unique: WARNING: Attribute NAS-Port was not found in request,
>>unique ID MAY be inconsistent

>This is the source of the errors in log entries.

>These are accounting start (VoIP and telephony) and stop requests. They
>will use accounting_start_query and accounting_stop_query. In your
>previous post you showed what you have done to
>accounting_update_query_alt:
>
>accounting_update_query_alt = "INSERT into ${acct_table1} (AcctSessionId,
>AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType,
>AcctSt
>artTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start,
>AcctInputOctets,
>AcctOutputOctets, CalledStationId, CallingStationId,
>ServiceType,FramedProtocol, FramedIPAddress, AcctStartDelay)
>values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',
>'%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}',
>'%{Cisco-NAS-Port}',
>'%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} +
>%{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}',
>'%{Acct-Authentic}','', '%{Acct-Input-Octets}',
>'%{Acct-Output-Octets}',
>'%{Called-Station-Id}', '%{Calling-Station-Id}',
>'%{h323-remote-address}',
>'%{Framed-Protocol}', '%{h323-remote-address}', '0')"

>That query is not getting executed. You need to alter
>accounting_start_query and expand it with those attributes.

>Ivan Kalik
>Kalik Informatika ISP

Here are my accounting_start and accounting_stop queries. The attributes were
already included:


accounting_start_query = "INSERT into ${acct_table1} (AcctSessionId,
AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPor
tType, AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic,
ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets,
 CalledStationId, CallingStationId, AcctTerminateCause, ServiceType,
FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values
('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}',
'%{Realm}', '%{NAS-IP-Address}', '%{Cisco-NAS-Port}', '%{NAS-Port-T
ype}', '%S', '0', '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0',
'%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{h323-r
emote-address}', '%{Framed-Protocol}', '%{h323-remote-address}',
'%{Acct-Delay-Time}', '0')"

accounting_start_query_alt  = "UPDATE ${acct_table1} SET
AcctStartTime = '%S', AcctStartDelay = '%{Acct-Delay-Time}', ConnectInfo_s
tart = '%{Connect-Info}' WHERE AcctSessionId = '%{Acct-Session-Id}' AND
UserName = '%{SQL-User-Name}' AND NASIPAddress = '%{NAS-IP-Address}
'"

accounting_stop_query = "UPDATE ${acct_table2} SET AcctStopTime =
'%S', AcctSessionTime = '%{Acct-Session-Time}', AcctInputOctets =
 '%{Acct-Input-Octets}', AcctOutputOctets = '%{Acct-Output-Octets}',
AcctTerminateCause = '%{Acct-Terminate-Cause}', AcctStopDelay = '%{Acc
t-Delay-Time}', ConnectInfo_stop = '%{Connect-Info}' WHERE AcctSessionId =
'%{Acct-Session-Id}' AND UserName = '%{SQL-User-Name}' AND NASIP
Address = '%{NAS-IP-Address}'"

accounting_stop_query_alt = "INSERT into ${acct_table2} (AcctSessionId,
AcctUniqueId, UserName, Realm, NASIPAddress,NASPortId, NASPortType,
 AcctStartTime, AcctStopTime, AcctSessionTime, AcctAuthentic,
ConnectInfo_start, ConnectInfo_stop, AcctInputOctets, AcctOutputOctets, Calle
dStationId, CallingStationId, AcctTerminateCause, ServiceType,
FramedProtocol, FramedIPAddress, AcctStartDelay, AcctStopDelay) values('%{Ac
ct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}',
'%{NAS-IP-Address}', '%{Cisco-NAS-Port}', '%{NAS-Port-Type}',
 DATE_SUB('%S', INTERVAL (%{Acct-Session-Time:-0} + %{Acct-Delay-Time:-0})
SECOND), '%S', '%{Acct-Session-Time}', '%{Acct-Authentic}', '',
'%{Connect-Info}', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}',
'%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Acct-Terminate-Caus
e}', '%{h323-remote-address}', '%{Framed-Protocol}',
'%{h323-remote-address}', '0', '%{Acct-Delay-Time}')"



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Freeradius - MySQL Update problem

2007-08-06 Thread tnt
PS. BTW there is no h323-remote-address attribute in those requests.

Ivan Kalik
Kalik Informatika ISP


Dana 6/8/2007, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> piše:

>
>Hello Ivan,
>
>Mon, 06 Aug 2007 12:52:20 +0100, you wrote:
>From: <[EMAIL PROTECTED]>
>
>>1. Send debug with the Accounting-Request
>>2. Create an extra field for that attribute (IP address is varchar(15)
>>type) to the radaact table and add the field and value to the query (so
>>it's definitely different.
>>
>>Ivan Kalik
>>Kalik Informatika ISP
>
>Here is more debug output with accounting request:
>
>Finished request 100
>Going to the next request
>Waking up in 5 seconds...
>rad_recv: Accounting-Request packet from host n.a.s.1:1646, id=239,
>length=531
>Acct-Session-Id = "0024F8FF"
>Calling-Station-Id = "442098765432"
>Called-Station-Id = "0002561234567"
>h323-setup-time = "h323-setup-time=16:53:14.471 GMT+3 Mon Aug 6 2007"
>h323-gw-id = "h323-gw-id=Rotelkom_Gateway.www.nas.co.ug"
>h323-conf-id = "h323-conf-id=B4550CDC FAA011D6 887DF94C E05F1EEE"
>h323-call-origin = "h323-call-origin=answer"
>h323-call-type = "h323-call-type=VoIP"
>Cisco-AVPair = "h323-incoming-conf-id=B4550CDC FAA011D6 887DF94C
>E05F1EEE"
>Cisco-AVPair = "subscriber=Unknown"
>Cisco-AVPair = "session-protocol=cisco"
>Cisco-AVPair = "gw-rxd-cdn=ton:0,npi:1,#:0002561234567"
>User-Name = "rem.ote.add.ress"
>Cisco-AVPair = "connect-progress=Call Up"
>Acct-Authentic = 0
>Acct-Status-Type = Start
>Service-Type = Login-User
>NAS-IP-Address = n.a.s.1
>Acct-Delay-Time = 10
>  Processing the preacct section of radiusd.conf
>modcall: entering group preacct for request 101
>  modcall[preacct]: module "preprocess" returns noop for request 101
>rlm_acct_unique: WARNING: Attribute NAS-Port was not found in request, unique
>ID MAY be inconsistent
>rlm_acct_unique: Hashing ',Client-IP-Address = n.a.s.1,NAS-IP-Address =
>n.a.s.1,Acct-Session-Id = "0024F8FF",User-Name = "rem.ote.add.ress"'
>rlm_acct_unique: Acct-Unique-Session-ID = "ecaef4ac9b6cbafc".
>  modcall[preacct]: module "acct_unique" returns ok for request 101
>rlm_realm: No '@' in User-Name = "rem.ote.add.ress", looking up realm
>NULL
>rlm_realm: No such realm "NULL"
>  modcall[preacct]: module "suffix" returns noop for request 101
>  modcall[preacct]: module "files" returns noop for request 101
>modcall: leaving group preacct (returns ok) for request 101
>  Processing the accounting section of radiusd.conf
>modcall: entering group accounting for request 101
>radius_xlat:  '/var/log/radius/radacct/n.a.s.1/detail-20070806'
>rlm_detail: /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d
>expands to /var/log/radius/radacct/n.a.s.1/detail-20070806
>  modcall[accounting]: module "detail" returns ok for request 101
>  modcall[accounting]: module "unix" returns noop for request 101
>radius_xlat:  '/var/log/radius/radutmp'
>radius_xlat:  'rem.ote.add.ress'
>  rlm_radutmp: No NAS-Port seen.  Cannot do anything.
>  rlm_radumtp: WARNING: checkrad will probably not work!
>  modcall[accounting]: module "radutmp" returns noop for request 101
>radius_xlat:  'rem.ote.add.ress'
>rlm_sql (sql): sql_set_user escaped user --> 'rem.ote.add.ress'
>radius_xlat:  'INSERT into radacct (AcctSessionId, AcctUniqueId, UserName,
>Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime,
>AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop,
>AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId,
>AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress,
>AcctStartDelay, AcctStopDelay) values('0024F8FF', 'ecaef4ac9b6cbafc',
>'rem.ote.add.ress', '', 'n.a.s.1', '', '', '2007-08-06 16:53:36', '0', '0',
>'0', '', '', '0', '0', '0002561234567', '442098765432', '', '', '', '', '10',
>'0')'
>rlm_sql (sql): Reserving sql socket id: 8
>rlm_sql (sql): Released sql socket id: 8
>  modcall[accounting]: module "sql" returns ok for request 101
>modcall: leaving group accounting (returns ok) for request 101
>Sending Accounting-Response of id 239 to n.a.s.1 port 1646
>Finished request 101
>Going to the next request
>Waking up in 5 seconds...
>rad_recv: Accounting-Request packet from host n.a.s.1:1646, id=240,
>length=542
>Acct-Session-Id = "0024F901"
>Calling-Station-Id = "442098765432"
>Called-Station-Id = "0002561234567"
>h323-setup-time = "h323-setup-time=16:53:14.519 GMT+3 Mon Aug 6 2007"
>h323-gw-id = "h323-gw-id=Rotelkom_Gateway.www.nas.co.ug"
>h323-conf-id = "h323-conf-id=B4550CDC FAA011D6 887DF94C E05F1EEE"
>h323-call-origin = "h323-call-origin=originate"
>h323-call-type = "h323-call-type=Telephony"
>Cisco-AVPair = "h323-incoming-conf-id=B4550CDC FAA011D6 887DF94C
>E05F1EEE"
>Cisco-AVPair = "subscriber=Unknown"
>Cisco-AVPair = "gw-rxd-cdn=ton:0,npi:1,#:00025612345

RE: Freeradius - MySQL Update problem

2007-08-06 Thread tnt
>rlm_acct_unique: WARNING: Attribute NAS-Port was not found in request, unique 
>ID MAY be inconsistent

This is the source of the errors in log entries.

These are accounting start (VoIP and telephony) and stop requests. They
will use accounting_start_query and accounting_stop_query. In your
previous post you showed what you have done to
accounting_update_query_alt:

accounting_update_query_alt = "INSERT into ${acct_table1} (AcctSessionId,
AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType,
AcctSt
artTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start,
AcctInputOctets,
AcctOutputOctets, CalledStationId, CallingStationId,
ServiceType,FramedProtocol, FramedIPAddress, AcctStartDelay)
values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',
'%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}',
'%{Cisco-NAS-Port}',
'%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} +
%{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}',
'%{Acct-Authentic}','', '%{Acct-Input-Octets}',
'%{Acct-Output-Octets}',
'%{Called-Station-Id}', '%{Calling-Station-Id}',
'%{h323-remote-address}',
'%{Framed-Protocol}', '%{h323-remote-address}', '0')"

That query is not getting executed. You need to alter
accounting_start_query and expand it with those attributes.

Ivan Kalik
Kalik Informatika ISP


Dana 6/8/2007, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> piše:

>
>Hello Ivan,
>
>Mon, 06 Aug 2007 12:52:20 +0100, you wrote:
>From: <[EMAIL PROTECTED]>
>
>>1. Send debug with the Accounting-Request
>>2. Create an extra field for that attribute (IP address is varchar(15)
>>type) to the radaact table and add the field and value to the query (so
>>it's definitely different.
>>
>>Ivan Kalik
>>Kalik Informatika ISP
>
>Here is more debug output with accounting request:
>
>Finished request 100
>Going to the next request
>Waking up in 5 seconds...
>rad_recv: Accounting-Request packet from host n.a.s.1:1646, id=239,
>length=531
>Acct-Session-Id = "0024F8FF"
>Calling-Station-Id = "442098765432"
>Called-Station-Id = "0002561234567"
>h323-setup-time = "h323-setup-time=16:53:14.471 GMT+3 Mon Aug 6 2007"
>h323-gw-id = "h323-gw-id=Rotelkom_Gateway.www.nas.co.ug"
>h323-conf-id = "h323-conf-id=B4550CDC FAA011D6 887DF94C E05F1EEE"
>h323-call-origin = "h323-call-origin=answer"
>h323-call-type = "h323-call-type=VoIP"
>Cisco-AVPair = "h323-incoming-conf-id=B4550CDC FAA011D6 887DF94C
>E05F1EEE"
>Cisco-AVPair = "subscriber=Unknown"
>Cisco-AVPair = "session-protocol=cisco"
>Cisco-AVPair = "gw-rxd-cdn=ton:0,npi:1,#:0002561234567"
>User-Name = "rem.ote.add.ress"
>Cisco-AVPair = "connect-progress=Call Up"
>Acct-Authentic = 0
>Acct-Status-Type = Start
>Service-Type = Login-User
>NAS-IP-Address = n.a.s.1
>Acct-Delay-Time = 10
>  Processing the preacct section of radiusd.conf
>modcall: entering group preacct for request 101
>  modcall[preacct]: module "preprocess" returns noop for request 101
>rlm_acct_unique: WARNING: Attribute NAS-Port was not found in request, unique
>ID MAY be inconsistent
>rlm_acct_unique: Hashing ',Client-IP-Address = n.a.s.1,NAS-IP-Address =
>n.a.s.1,Acct-Session-Id = "0024F8FF",User-Name = "rem.ote.add.ress"'
>rlm_acct_unique: Acct-Unique-Session-ID = "ecaef4ac9b6cbafc".
>  modcall[preacct]: module "acct_unique" returns ok for request 101
>rlm_realm: No '@' in User-Name = "rem.ote.add.ress", looking up realm
>NULL
>rlm_realm: No such realm "NULL"
>  modcall[preacct]: module "suffix" returns noop for request 101
>  modcall[preacct]: module "files" returns noop for request 101
>modcall: leaving group preacct (returns ok) for request 101
>  Processing the accounting section of radiusd.conf
>modcall: entering group accounting for request 101
>radius_xlat:  '/var/log/radius/radacct/n.a.s.1/detail-20070806'
>rlm_detail: /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d
>expands to /var/log/radius/radacct/n.a.s.1/detail-20070806
>  modcall[accounting]: module "detail" returns ok for request 101
>  modcall[accounting]: module "unix" returns noop for request 101
>radius_xlat:  '/var/log/radius/radutmp'
>radius_xlat:  'rem.ote.add.ress'
>  rlm_radutmp: No NAS-Port seen.  Cannot do anything.
>  rlm_radumtp: WARNING: checkrad will probably not work!
>  modcall[accounting]: module "radutmp" returns noop for request 101
>radius_xlat:  'rem.ote.add.ress'
>rlm_sql (sql): sql_set_user escaped user --> 'rem.ote.add.ress'
>radius_xlat:  'INSERT into radacct (AcctSessionId, AcctUniqueId, UserName,
>Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime,
>AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop,
>AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId,
>AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress,
>AcctStartDelay, AcctStopDelay) values('0024F8FF', 'ecaef4ac9b6cbafc',
>'rem.ote.add.ress', '',

RE: Freeradius - MySQL Update problem

2007-08-06 Thread musoket

Hello Ivan,

Mon, 06 Aug 2007 12:52:20 +0100, you wrote:
From: <[EMAIL PROTECTED]>

>1. Send debug with the Accounting-Request
>2. Create an extra field for that attribute (IP address is varchar(15)
>type) to the radaact table and add the field and value to the query (so
>it's definitely different.
>
>Ivan Kalik
>Kalik Informatika ISP

Here is more debug output with accounting request:

Finished request 100
Going to the next request
Waking up in 5 seconds...
rad_recv: Accounting-Request packet from host n.a.s.1:1646, id=239,
length=531
Acct-Session-Id = "0024F8FF"
Calling-Station-Id = "442098765432"
Called-Station-Id = "0002561234567"
h323-setup-time = "h323-setup-time=16:53:14.471 GMT+3 Mon Aug 6 2007"
h323-gw-id = "h323-gw-id=Rotelkom_Gateway.www.nas.co.ug"
h323-conf-id = "h323-conf-id=B4550CDC FAA011D6 887DF94C E05F1EEE"
h323-call-origin = "h323-call-origin=answer"
h323-call-type = "h323-call-type=VoIP"
Cisco-AVPair = "h323-incoming-conf-id=B4550CDC FAA011D6 887DF94C
E05F1EEE"
Cisco-AVPair = "subscriber=Unknown"
Cisco-AVPair = "session-protocol=cisco"
Cisco-AVPair = "gw-rxd-cdn=ton:0,npi:1,#:0002561234567"
User-Name = "rem.ote.add.ress"
Cisco-AVPair = "connect-progress=Call Up"
Acct-Authentic = 0
Acct-Status-Type = Start
Service-Type = Login-User
NAS-IP-Address = n.a.s.1
Acct-Delay-Time = 10
  Processing the preacct section of radiusd.conf
modcall: entering group preacct for request 101
  modcall[preacct]: module "preprocess" returns noop for request 101
rlm_acct_unique: WARNING: Attribute NAS-Port was not found in request, unique
ID MAY be inconsistent
rlm_acct_unique: Hashing ',Client-IP-Address = n.a.s.1,NAS-IP-Address =
n.a.s.1,Acct-Session-Id = "0024F8FF",User-Name = "rem.ote.add.ress"'
rlm_acct_unique: Acct-Unique-Session-ID = "ecaef4ac9b6cbafc".
  modcall[preacct]: module "acct_unique" returns ok for request 101
rlm_realm: No '@' in User-Name = "rem.ote.add.ress", looking up realm
NULL
rlm_realm: No such realm "NULL"
  modcall[preacct]: module "suffix" returns noop for request 101
  modcall[preacct]: module "files" returns noop for request 101
modcall: leaving group preacct (returns ok) for request 101
  Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 101
radius_xlat:  '/var/log/radius/radacct/n.a.s.1/detail-20070806'
rlm_detail: /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d
expands to /var/log/radius/radacct/n.a.s.1/detail-20070806
  modcall[accounting]: module "detail" returns ok for request 101
  modcall[accounting]: module "unix" returns noop for request 101
radius_xlat:  '/var/log/radius/radutmp'
radius_xlat:  'rem.ote.add.ress'
  rlm_radutmp: No NAS-Port seen.  Cannot do anything.
  rlm_radumtp: WARNING: checkrad will probably not work!
  modcall[accounting]: module "radutmp" returns noop for request 101
radius_xlat:  'rem.ote.add.ress'
rlm_sql (sql): sql_set_user escaped user --> 'rem.ote.add.ress'
radius_xlat:  'INSERT into radacct (AcctSessionId, AcctUniqueId, UserName,
Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime,
AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop,
AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId,
AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress,
AcctStartDelay, AcctStopDelay) values('0024F8FF', 'ecaef4ac9b6cbafc',
'rem.ote.add.ress', '', 'n.a.s.1', '', '', '2007-08-06 16:53:36', '0', '0',
'0', '', '', '0', '0', '0002561234567', '442098765432', '', '', '', '', '10',
'0')'
rlm_sql (sql): Reserving sql socket id: 8
rlm_sql (sql): Released sql socket id: 8
  modcall[accounting]: module "sql" returns ok for request 101
modcall: leaving group accounting (returns ok) for request 101
Sending Accounting-Response of id 239 to n.a.s.1 port 1646
Finished request 101
Going to the next request
Waking up in 5 seconds...
rad_recv: Accounting-Request packet from host n.a.s.1:1646, id=240,
length=542
Acct-Session-Id = "0024F901"
Calling-Station-Id = "442098765432"
Called-Station-Id = "0002561234567"
h323-setup-time = "h323-setup-time=16:53:14.519 GMT+3 Mon Aug 6 2007"
h323-gw-id = "h323-gw-id=Rotelkom_Gateway.www.nas.co.ug"
h323-conf-id = "h323-conf-id=B4550CDC FAA011D6 887DF94C E05F1EEE"
h323-call-origin = "h323-call-origin=originate"
h323-call-type = "h323-call-type=Telephony"
Cisco-AVPair = "h323-incoming-conf-id=B4550CDC FAA011D6 887DF94C
E05F1EEE"
Cisco-AVPair = "subscriber=Unknown"
Cisco-AVPair = "gw-rxd-cdn=ton:0,npi:1,#:0002561234567"
User-Name = "rem.ote.add.ress"
Cisco-AVPair = "connect-progress=Call Up"
Acct-Authentic = 0
Acct-Status-Type = Start
NAS-Port-Type = Async
Cisco-NAS-Port = "ISDN 1/5:D:28"
NAS-Port = 0
Service-Type = 

RE: Freeradius - MySQL Update problem

2007-08-06 Thread tnt
1. Send debug with the Accounting-Request
2. Create an extra field for that attribute (IP address is varchar(15)
type) to the radaact table and add the field and value to the query (so
it's definitely different.

Ivan Kalik
Kalik Informatika ISP


Dana 6/8/2007, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> piše:

>
>Hello Ivan,
>Mon, 06 Aug 2007 09:07:22 +0100, you wrote:
>>You need to stop the server (killall radiusd) and restart in debug mode
>>(radiusd -X).
>>
>>Ivan Kalik
>>Kalik Informatika ISP
>
>This is some of the debug output indicating an INSERT statement:
>
>modcall: entering group preacct for request 37
>  modcall[preacct]: module "preprocess" returns noop for request 37
>rlm_acct_unique: Hashing 'NAS-Port = 0,Client-IP-Address =
>x.x.x.x,NAS-IP-Address = x.x.x.x,Acct-Session-Id = "0024B3B4",User-Name =
>"y.y.y.y"'
>rlm_acct_unique: Acct-Unique-Session-ID = "eb0fbc15b1bd7bca".
>  modcall[preacct]: module "acct_unique" returns ok for request 37
>rlm_realm: No '@' in User-Name = "y.y.y.y", looking up realm NULL
>rlm_realm: No such realm "NULL"
>  modcall[preacct]: module "suffix" returns noop for request 37
>  modcall[preacct]: module "files" returns noop for request 37
>modcall: leaving group preacct (returns ok) for request 37
>  Processing the accounting section of radiusd.conf
>modcall: entering group accounting for request 37
>radius_xlat:  '/var/log/radius/radacct/x.x.x.x/detail-20070806'
>rlm_detail: /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d
>expands to /var/log/radius/radacct/x.x.x.x/detail-20070806
>  modcall[accounting]: module "detail" returns ok for request 37
>  modcall[accounting]: module "unix" returns ok for request 37
>radius_xlat:  '/var/log/radius/radutmp'
>radius_xlat:  'y.y.y.y'
>  modcall[accounting]: module "radutmp" returns ok for request 37
>radius_xlat:  'y.y.y.y'
>rlm_sql (sql): sql_set_user escaped user --> 'y.y.y.y'
>radius_xlat:  'INSERT into radacct (AcctSessionId, AcctUniqueId, UserName,
>Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime,
>AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop,
>AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId,
>AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress,
>AcctStartDelay, AcctStopDelay) values('0024B3B4', 'eb0fbc15b1bd7bca',
>'y.y.y.y', '', 'x.x.x.x', 'ISDN 0/-1:D:0', 'Async', '2007-08-06 13:29:27',
>'0', '0', '0', '', '', '0', '0', '25612345678', '', '', '', '', '', '10',
>'0')'
>rlm_sql (sql): Reserving sql socket id: 2
>rlm_sql (sql): Released sql socket id: 2
>  modcall[accounting]: module "sql" returns ok for request 37
>modcall: leaving group accounting (returns ok) for request 37
>Sending Accounting-Response of id 46 to x.x.x.x port 1646
>Finished request 37
>
>I hope this helps. The h323-remote-address value should be entered under
>ServiceType and FramedIPAddress as per my setup in sql.conf. As you can see,
>a blank is being entered instead. I have changed the IP addresses to x.x.x.x
>and y.y.y.y.
>
>Regards
>
>Timothy
>
>-
>List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Freeradius - MySQL Update problem

2007-08-06 Thread tnt
Chack if your NAS is keeping fields used to create acct_unique constant.
It seems that one or more of them are changing for the same session.

Ivan Kalik
Kalik Informatika ISP


Dana 6/8/2007, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> piše:

>Hi Ivan,
>
>Mon, 06 Aug 2007 09:07:22 +0100, you wrote:
>
>>You need to stop the server (killall radiusd) and restart in debug mode
>>(radiusd -X).
>>
>>Ivan Kalik
>>Kalik Informatika ISP
>
>I don't know if this is related to this problem but I get a lot of this in my
>radius log files:
>
>Mon Aug  6 13:19:34 2007 : Error: rlm_radutmp: Logout entry for NAS
>rotelkom_gateway port 0 has wrong ID
>Mon Aug  6 13:19:38 2007 : Error: rlm_radutmp: Logout entry for NAS
>rotelkom_gateway port 0 has wrong ID
>Mon Aug  6 13:19:41 2007 : Error: rlm_radutmp: Logout for NAS
>rotelkom_gateway port 0, but no Login record
>Mon Aug  6 13:19:57 2007 : Error: rlm_radutmp: Logout for NAS
>rotelkom_gateway port 0, but no Login record
>Mon Aug  6 13:20:05 2007 : Error: rlm_radutmp: Logout for NAS
>rotelkom_gateway port 0, but no Login record
>Mon Aug  6 13:20:08 2007 : Error: rlm_sql (sql) in sql_accounting: stop
>packet with zero session length. [user '85.31.48.5', nas '81.199.63.74']
>Mon Aug  6 13:20:17 2007 : Error: rlm_radutmp: Logout for NAS
>rotelkom_gateway port 0, but no Login record
>Mon Aug  6 13:20:20 2007 : Error: rlm_radutmp: Logout for NAS
>rotelkom_gateway port 0, but no Login record
>Mon Aug  6 13:20:33 2007 : Error: rlm_radutmp: Logout entry for NAS
>rotelkom_gateway port 0 has wrong ID
>Mon Aug  6 13:20:38 2007 : Error: rlm_radutmp: Logout entry for NAS
>rotelkom_gateway port 0 has wrong ID
>Mon Aug  6 13:20:44 2007 : Error: rlm_radutmp: Logout for NAS
>rotelkom_gateway port 0, but no Login record
>Mon Aug  6 13:20:46 2007 : Error: rlm_radutmp: Logout entry for NAS
>rotelkom_gateway port 0 has wrong ID
>Mon Aug  6 13:20:52 2007 : Error: rlm_radutmp: Logout entry for NAS
>rotelkom_gateway port 0 has wrong ID
>Mon Aug  6 13:20:55 2007 : Error: rlm_radutmp: Logout entry for NAS
>rotelkom_gateway port 0 has wrong ID
>
>Timothy
>
>
>
>-
>List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Freeradius - MySQL Update problem

2007-08-06 Thread musoket

Hello Ivan,
Mon, 06 Aug 2007 09:07:22 +0100, you wrote:
>You need to stop the server (killall radiusd) and restart in debug mode
>(radiusd -X).
>
>Ivan Kalik
>Kalik Informatika ISP

This is some of the debug output indicating an INSERT statement:

modcall: entering group preacct for request 37
  modcall[preacct]: module "preprocess" returns noop for request 37
rlm_acct_unique: Hashing 'NAS-Port = 0,Client-IP-Address =
x.x.x.x,NAS-IP-Address = x.x.x.x,Acct-Session-Id = "0024B3B4",User-Name =
"y.y.y.y"'
rlm_acct_unique: Acct-Unique-Session-ID = "eb0fbc15b1bd7bca".
  modcall[preacct]: module "acct_unique" returns ok for request 37
rlm_realm: No '@' in User-Name = "y.y.y.y", looking up realm NULL
rlm_realm: No such realm "NULL"
  modcall[preacct]: module "suffix" returns noop for request 37
  modcall[preacct]: module "files" returns noop for request 37
modcall: leaving group preacct (returns ok) for request 37
  Processing the accounting section of radiusd.conf
modcall: entering group accounting for request 37
radius_xlat:  '/var/log/radius/radacct/x.x.x.x/detail-20070806'
rlm_detail: /var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d
expands to /var/log/radius/radacct/x.x.x.x/detail-20070806
  modcall[accounting]: module "detail" returns ok for request 37
  modcall[accounting]: module "unix" returns ok for request 37
radius_xlat:  '/var/log/radius/radutmp'
radius_xlat:  'y.y.y.y'
  modcall[accounting]: module "radutmp" returns ok for request 37
radius_xlat:  'y.y.y.y'
rlm_sql (sql): sql_set_user escaped user --> 'y.y.y.y'
radius_xlat:  'INSERT into radacct (AcctSessionId, AcctUniqueId, UserName,
Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctStopTime,
AcctSessionTime, AcctAuthentic, ConnectInfo_start, ConnectInfo_stop,
AcctInputOctets, AcctOutputOctets, CalledStationId, CallingStationId,
AcctTerminateCause, ServiceType, FramedProtocol, FramedIPAddress,
AcctStartDelay, AcctStopDelay) values('0024B3B4', 'eb0fbc15b1bd7bca',
'y.y.y.y', '', 'x.x.x.x', 'ISDN 0/-1:D:0', 'Async', '2007-08-06 13:29:27',
'0', '0', '0', '', '', '0', '0', '25612345678', '', '', '', '', '', '10',
'0')'
rlm_sql (sql): Reserving sql socket id: 2
rlm_sql (sql): Released sql socket id: 2
  modcall[accounting]: module "sql" returns ok for request 37
modcall: leaving group accounting (returns ok) for request 37
Sending Accounting-Response of id 46 to x.x.x.x port 1646
Finished request 37

I hope this helps. The h323-remote-address value should be entered under
ServiceType and FramedIPAddress as per my setup in sql.conf. As you can see,
a blank is being entered instead. I have changed the IP addresses to x.x.x.x
and y.y.y.y.

Regards

Timothy

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Freeradius - MySQL Update problem

2007-08-06 Thread musoket
Hi Ivan,

Mon, 06 Aug 2007 09:07:22 +0100, you wrote:

>You need to stop the server (killall radiusd) and restart in debug mode
>(radiusd -X).
>
>Ivan Kalik
>Kalik Informatika ISP

I don't know if this is related to this problem but I get a lot of this in my
radius log files:

Mon Aug  6 13:19:34 2007 : Error: rlm_radutmp: Logout entry for NAS
rotelkom_gateway port 0 has wrong ID
Mon Aug  6 13:19:38 2007 : Error: rlm_radutmp: Logout entry for NAS
rotelkom_gateway port 0 has wrong ID
Mon Aug  6 13:19:41 2007 : Error: rlm_radutmp: Logout for NAS
rotelkom_gateway port 0, but no Login record
Mon Aug  6 13:19:57 2007 : Error: rlm_radutmp: Logout for NAS
rotelkom_gateway port 0, but no Login record
Mon Aug  6 13:20:05 2007 : Error: rlm_radutmp: Logout for NAS
rotelkom_gateway port 0, but no Login record
Mon Aug  6 13:20:08 2007 : Error: rlm_sql (sql) in sql_accounting: stop
packet with zero session length. [user '85.31.48.5', nas '81.199.63.74']
Mon Aug  6 13:20:17 2007 : Error: rlm_radutmp: Logout for NAS
rotelkom_gateway port 0, but no Login record
Mon Aug  6 13:20:20 2007 : Error: rlm_radutmp: Logout for NAS
rotelkom_gateway port 0, but no Login record
Mon Aug  6 13:20:33 2007 : Error: rlm_radutmp: Logout entry for NAS
rotelkom_gateway port 0 has wrong ID
Mon Aug  6 13:20:38 2007 : Error: rlm_radutmp: Logout entry for NAS
rotelkom_gateway port 0 has wrong ID
Mon Aug  6 13:20:44 2007 : Error: rlm_radutmp: Logout for NAS
rotelkom_gateway port 0, but no Login record
Mon Aug  6 13:20:46 2007 : Error: rlm_radutmp: Logout entry for NAS
rotelkom_gateway port 0 has wrong ID
Mon Aug  6 13:20:52 2007 : Error: rlm_radutmp: Logout entry for NAS
rotelkom_gateway port 0 has wrong ID
Mon Aug  6 13:20:55 2007 : Error: rlm_radutmp: Logout entry for NAS
rotelkom_gateway port 0 has wrong ID

Timothy



- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Freeradius - MySQL Update problem

2007-08-06 Thread tnt
You need to stop the server (killall radiusd) and restart in debug mode
(radiusd -X).

Ivan Kalik
Kalik Informatika ISP

Dana 6/8/2007, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> piše:

>
>
>Hello Ivan,
>
>Thu, 02 Aug 2007 12:21:02 +0100, you wrote:
>
>>Send us the log (radiusd -X) with your accounting request. Lets see if
>>this query gets executed.
>>
>>Ivan Kalik
>>Kalik Informatika ISP
>
>The output of radiusd  -X is thus:
>
>mail:~ # radiusd -X
>Starting - reading configuration files ...
>reread_config:  reading radiusd.conf
>Config:   including file: /etc/raddb/proxy.conf
>Config:   including file: /etc/raddb/clients.conf
>Config:   including file: /etc/raddb/snmp.conf
>Config:   including file: /etc/raddb/eap.conf
>Config:   including file: /etc/raddb/sql.conf
> main: prefix = "/usr"
> main: localstatedir = "/var"
> main: logdir = "/var/log/radius"
> main: libdir = "/usr/lib/freeradius"
> main: radacctdir = "/var/log/radius/radacct"
> main: hostname_lookups = no
> main: max_request_time = 30
> main: cleanup_delay = 5
> main: max_requests = 1024
> main: delete_blocked_requests = 0
> main: port = 1645
> main: allow_core_dumps = no
> main: log_stripped_names = no
> main: log_file = "/var/log/radius/radius.log"
> main: log_auth = no
> main: log_auth_badpass = no
> main: log_auth_goodpass = no
> main: pidfile = "/var/run/radiusd/radiusd.pid"
> main: bind_address = 192.168.2.2 IP address [192.168.2.2]
> main: user = "radiusd"
> main: group = "radiusd"
> main: usercollide = no
> main: lower_user = "no"
> main: lower_pass = "no"
> main: nospace_user = "no"
> main: nospace_pass = "no"
> main: checkrad = "/usr/sbin/checkrad"
> main: proxy_requests = yes
> proxy: retry_delay = 5
> proxy: retry_count = 3
> proxy: synchronous = no
> proxy: default_fallback = yes
> proxy: dead_time = 120
> proxy: post_proxy_authorize = no
> proxy: wake_all_if_all_dead = no
> security: max_attributes = 200
> security: reject_delay = 1
> security: status_server = no
> main: debug_level = 0
>read_config_files:  reading dictionary
>read_config_files:  reading naslist
>read_config_files:  reading clients
>read_config_files:  reading realms
>There appears to be another RADIUS server running on the authentication port
>1645
>
>This however doesn't seem to give information as to whether the query is
>actually executed. What command would give me this kind of debug information?
>
>Thanks and regards
>
>Timothy.
>
>-
>List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Freeradius - MySQL Update problem

2007-08-06 Thread musoket


Hello Ivan,

Thu, 02 Aug 2007 12:21:02 +0100, you wrote:

>Send us the log (radiusd -X) with your accounting request. Lets see if
>this query gets executed.
>
>Ivan Kalik
>Kalik Informatika ISP

The output of radiusd  -X is thus:

mail:~ # radiusd -X
Starting - reading configuration files ...
reread_config:  reading radiusd.conf
Config:   including file: /etc/raddb/proxy.conf
Config:   including file: /etc/raddb/clients.conf
Config:   including file: /etc/raddb/snmp.conf
Config:   including file: /etc/raddb/eap.conf
Config:   including file: /etc/raddb/sql.conf
 main: prefix = "/usr"
 main: localstatedir = "/var"
 main: logdir = "/var/log/radius"
 main: libdir = "/usr/lib/freeradius"
 main: radacctdir = "/var/log/radius/radacct"
 main: hostname_lookups = no
 main: max_request_time = 30
 main: cleanup_delay = 5
 main: max_requests = 1024
 main: delete_blocked_requests = 0
 main: port = 1645
 main: allow_core_dumps = no
 main: log_stripped_names = no
 main: log_file = "/var/log/radius/radius.log"
 main: log_auth = no
 main: log_auth_badpass = no
 main: log_auth_goodpass = no
 main: pidfile = "/var/run/radiusd/radiusd.pid"
 main: bind_address = 192.168.2.2 IP address [192.168.2.2]
 main: user = "radiusd"
 main: group = "radiusd"
 main: usercollide = no
 main: lower_user = "no"
 main: lower_pass = "no"
 main: nospace_user = "no"
 main: nospace_pass = "no"
 main: checkrad = "/usr/sbin/checkrad"
 main: proxy_requests = yes
 proxy: retry_delay = 5
 proxy: retry_count = 3
 proxy: synchronous = no
 proxy: default_fallback = yes
 proxy: dead_time = 120
 proxy: post_proxy_authorize = no
 proxy: wake_all_if_all_dead = no
 security: max_attributes = 200
 security: reject_delay = 1
 security: status_server = no
 main: debug_level = 0
read_config_files:  reading dictionary
read_config_files:  reading naslist
read_config_files:  reading clients
read_config_files:  reading realms
There appears to be another RADIUS server running on the authentication port
1645

This however doesn't seem to give information as to whether the query is
actually executed. What command would give me this kind of debug information?

Thanks and regards

Timothy.

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re[2]: Freeradius - MySQL Update problem

2007-08-02 Thread Claudiu Filip
Hi musoket,

>>You should use the %{h323-remote-address} variable
> That is in fact the variable that I am using in my insert and update

Dont forget that you have (at least) 2 call legs for each call.
With as5350, I guess you will have one voip call leg and one PSTN call
leg. The PSTN call leg wont have any h323-remote-address, because it's
not VoIP.
The AS will notify the radius for each call leg, so you should have
two STOPs for each call.

I dont see anything wrong with your insert query. It should work.
Be sure to have in the dictionary the ATTRIBUTE h323-remote-address
for vendor cisco (but if your logs contain h323-remote-address, then
you probably have that).



Best regards,


Claudiu Filip

sorry, I ran out
of business cards




- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Freeradius - MySQL Update problem

2007-08-02 Thread tnt
Send us the log (radiusd -X) with your accounting request. Lets see if
this query gets executed.

Ivan Kalik
Kalik Informatika ISP


Dana 2/8/2007, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> piše:

>
>
>Hi Claudiu,
>Thanks for your response.
>
>Thu, 2 Aug 2007 03:10:24 +0300, you wrote:
>>How does your INSERT look like?
>>AFAIK, in logs you get something like
>>   h323-remote-address = "h323-remote-address=re.mo.te.ip"
>>You should use the %{h323-remote-address} variable
>
>
>That is in fact the variable that I am using in my insert and update
>statements but it still doesn't work. See below:
>
>
>accounting_update_query_alt = "INSERT into ${acct_table1} (AcctSessionId,
>AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctSt
>artTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets,
>AcctOutputOctets, CalledStationId, CallingStationId,
>ServiceType,FramedProtocol, FramedIPAddress, AcctStartDelay)
>values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',
>'%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{Cisco-NAS-Port}',
>'%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} +
>%{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}',
>'%{Acct-Authentic}','', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}',
>'%{Called-Station-Id}', '%{Calling-Station-Id}', '%{h323-remote-address}',
>'%{Framed-Protocol}', '%{h323-remote-address}', '0')"
>
>It appears twice here because I tried putting it in two different columns.
>
>Regards
>
>Timothy.
>
>-
>List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


RE: Freeradius - MySQL Update problem

2007-08-02 Thread musoket


Hi Claudiu,
Thanks for your response.

Thu, 2 Aug 2007 03:10:24 +0300, you wrote:
>How does your INSERT look like?
>AFAIK, in logs you get something like
>   h323-remote-address = "h323-remote-address=re.mo.te.ip"
>You should use the %{h323-remote-address} variable


That is in fact the variable that I am using in my insert and update
statements but it still doesn't work. See below:


accounting_update_query_alt = "INSERT into ${acct_table1} (AcctSessionId,
AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctSt
artTime, AcctSessionTime, AcctAuthentic, ConnectInfo_start, AcctInputOctets,
AcctOutputOctets, CalledStationId, CallingStationId,
ServiceType,FramedProtocol, FramedIPAddress, AcctStartDelay) 
values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', 
'%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', '%{Cisco-NAS-Port}',
'%{NAS-Port-Type}', DATE_SUB('%S',INTERVAL (%{Acct-Session-Time:-0} +
%{Acct-Delay-Time:-0}) SECOND), '%{Acct-Session-Time}', 
'%{Acct-Authentic}','', '%{Acct-Input-Octets}', '%{Acct-Output-Octets}',
'%{Called-Station-Id}', '%{Calling-Station-Id}', '%{h323-remote-address}',
'%{Framed-Protocol}', '%{h323-remote-address}', '0')"

It appears twice here because I tried putting it in two different columns.

Regards

Timothy.

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Freeradius - MySQL Update problem

2007-08-01 Thread Claudiu Filip
Hi musoket,

Wednesday, August 1, 2007, 3:17:15 PM, you wrote:
> I am having trouble populating the MySQL database with a certain
> attribute ‘h323-remote-address’. A tail of the radius logs shows me
> that this attribute is being received by radius. It however does not

How does your INSERT look like?
AFAIK, in logs you get something like
   h323-remote-address = "h323-remote-address=re.mo.te.ip"
You should use the %{h323-remote-address} variable


Regards,

Claudiu Filip
@: [EMAIL PROTECTED]
Http://www.globtel.ro
T:+40344880100
F:+40344880113




- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Freeradius - MySQL Update problem

2007-08-01 Thread Peter Nixon
On Wed 01 Aug 2007, [EMAIL PROTECTED] wrote:
> Hello,
>
> Let me start off by saying I am new to this list and not very accomplished
> in freeradius administration.
>
> I am running a freeradius-1.1.0-19.6 setup to gather VoIP accounting
> information from a Cisco AS5350 router and insert this information into a
> mysql-5.0.18-16 database. The OS is SuSE Linux 10.1.
>
> I am having trouble populating the MySQL database with a certain attribute
> 'h323-remote-address'. 

Add a field to the radacct table, and add modify the sql query to add the 
attribute you wish into the field you added. It will just work..

-- 

Peter Nixon
http://peternixon.net/
- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Freeradius - MySQL Update problem

2007-08-01 Thread musoket
Hello,

Let me start off by saying I am new to this list and not very accomplished in
freeradius administration.

I am running a freeradius-1.1.0-19.6 setup to gather VoIP accounting
information from a Cisco AS5350 router and insert this information into a
mysql-5.0.18-16 database. The OS is SuSE Linux 10.1.

I am having trouble populating the MySQL database with a certain attribute
'h323-remote-address'. A tail of the radius logs shows me that this attribute
is being received by radius. It however does not appear in the database. I
have tried altering the mysql statements in sql.conf to insert the value of
this attribute in a field that was previously being populated with something
else - to ensure that the sql statement is correct - (of the same type - i.e.
varchar(32)) but that field stops being populated after the changes. I have
also tried it with a field that was previously not being populated, with no
success. The value is supposed to be an IP address.

 

Could someone please help me?

 

Thanks and regards,

 

Timothy

- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html