3GPP data in mysql radacct table

liran kessel lirankessel at gmail.com
Sun May 22 22:22:46 CEST 2016


Here you go, but for some reason I don’t see the whole update command.


Ready to process requests.




rad_recv: Accounting-Request packet from host 172.28.42.136 port 58599, id=100, length=402
	Acct-Status-Type = Stop
	Event-Timestamp = "May 22 2016 23:21:02 IDT"
	Acct-Input-Octets = 9475106
	Acct-Input-Gigawords = 0
	Acct-Output-Octets = 72231702
	Acct-Output-Gigawords = 0
	Acct-Input-Packets = 74888
	Acct-Output-Packets = 75139
	Acct-Session-Time = 35815
	Acct-Terminate-Cause = User-Request
	Framed-IP-Address = 10.236.64.190
	Called-Station-Id = "sphone"
	Calling-Station-Id = "972526786885"
	NAS-IP-Address = 172.28.42.136
	NAS-Identifier = "172.28.42.136"
	Framed-Protocol = GPRS-PDP-Context
	Service-Type = Framed-User
	NAS-Port-Type = Virtual
	Acct-Session-Id = "3E5A4441738239e7"
	3GPP-IMSI = "425020173204974"
	3GPP-IMSI-MCC-MNC = "42502"
	3GPP-SGSN-Address = 62.90.68.102
	3GPP-NSAPI = "5"
	3GPP-GGSN-Address = 62.90.68.65
	3GPP-GGSN-MCC-MNC = "42502"
	3GPP-Charging-Characteristics = "0500"
	3GPP-IMEISV = "3586350507743300"
	3GPP-RAT-Type = UTRAN
	3GPP-Location-Info = 0x0024f5205943a020
	3GPP-Charging-ID = 1937914343
	3GPP-PDP-Type = 0
	3GPP-Charging-Gateway-Address = 172.28.230.13
	3GPP-Session-Stop-Indicator = 255
	3GPP-Selection-Mode = "1"
	3GPP-Negotiated-DSCP = 20
	3GPP-GPRS-Negotiated-QoS-profile = "08-0207000021C000003E80"
# Executing section preacct from file /etc/raddb/sites-enabled/default
+group preacct {
++[preprocess] = ok
[acct_unique] WARNING: Attribute NAS-Port was not found in request, unique ID MAY be inconsistent
[acct_unique] WARNING: Attribute User-Name was not found in request, unique ID MAY be inconsistent
[acct_unique] Hashing ',NAS-Identifier = "172.28.42.136",NAS-IP-Address = 172.28.42.136,Acct-Session-Id = "3E5A4441738239e7",'
[acct_unique] Acct-Unique-Session-ID = "49c7f864c2f3216d".
++[acct_unique] = ok
[suffix] Proxy reply, or no User-Name.  Ignoring.
++[suffix] = ok
++[files] = noop
+} # group preacct = ok
# Executing section accounting from file /etc/raddb/sites-enabled/default
+group accounting {
[detail] 	expand: %{Packet-Src-IP-Address} -> 172.28.42.136
[detail] 	expand: /var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d -> /var/log/radius/radacct/172.28.42.136/detail-20160522
[detail] /var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d expands to /var/log/radius/radacct/172.28.42.136/detail-20160522
[detail] 	expand: %t -> Sun May 22 23:20:58 2016
++[detail] = ok
++update request {
	expand: %{3GPP-Location-Info} -> 0x0024f5205943a020
++} # update request = noop
[sql] 	expand: %{User-Name} ->
[sql] sql_set_user escaped user --> ''
[sql] 	expand: %{Acct-Session-Time} -> 35815
[sql] 	expand: %{Acct-Input-Gigawords} -> 0
[sql] 	expand: %{Acct-Input-Octets} -> 9475106
[sql] 	expand: %{Acct-Output-Gigawords} -> 0
[sql] 	expand: %{Acct-Output-Octets} -> 72231702
[sql] 	expand: %{Acct-Delay-Time} ->
[sql] 	... expanding second conditional
[sql] 	expand:            UPDATE radacct SET              acctstoptime       = '%S',              acctsessiontime    = '%{%{Acct-Session-Time}:-0}',              acctinputoctets    = '%{%{Acct-Input-Gigawords}:-0}' << 32 |                                   '%{%{Acct-Input-Octets}:-0}',              acctoutputoctets   = '%{%{Acct-Output-Gigawords}:-0}' << 32 |                                   '%{%{Acct-Output-Octets}:-0}',              acctterminatecause = '%{Acct-Terminate-Cause}',              acctstopdelay      = '%{%{Acct-Delay-Time}:-0}',              connectinfo_stop   = '%{Connect-Info}'           WHERE acctsessionid   = '%{Acct-Session-Id}'           AND username          = '%{SQL-User-Name}'           AND nasipaddress      = '%{NAS-IP-Address}' ->            UPDATE radacct SET              acctstoptime       = '2016-05-22 23:20:58',              acctsessiontime    = '35815',              acctinputoctets    = '0' << 32 |                                   '9475106',              acctoutputoctets   = '
rlm_sql (sql): Reserving sql socket id: 31
rlm_sql (sql): Released sql socket id: 31
++[sql] = ok
++[exec] = noop
[attr_filter.accounting_response] 	expand: %{User-Name} ->
++[attr_filter.accounting_response] = noop
+} # group accounting = ok
Sending Accounting-Response of id 100 to 172.28.42.136 port 58599
Finished request 0.
Cleaning up request 0 ID 100 with timestamp +16
Going to the next request
Ready to process requests.




	Acct-Status-Type = Start
	Event-Timestamp = "May 22 2016 23:21:48 IDT"
	Framed-IP-Address = 10.236.64.134
	Called-Station-Id = "sphone"
	Calling-Station-Id = "972526786885"
	NAS-IP-Address = 172.28.42.136
	NAS-Identifier = "172.28.42.136"
	Framed-Protocol = GPRS-PDP-Context
	Service-Type = Framed-User
	NAS-Port-Type = Virtual
	Acct-Session-Id = "3E5A44417351a5f0"
	3GPP-IMSI = "425020173204974"
	3GPP-IMSI-MCC-MNC = "42502"
	3GPP-SGSN-Address = 62.90.68.102
	3GPP-NSAPI = "5"
	3GPP-GGSN-Address = 62.90.68.65
	3GPP-GGSN-MCC-MNC = "42502"
	3GPP-Charging-Characteristics = "0500"
	3GPP-IMEISV = "3586350507743300"
	3GPP-RAT-Type = UTRAN
	3GPP-Location-Info = 0x0024f520834bf9bf
	3GPP-Charging-ID = 1934730736
	3GPP-PDP-Type = 0
	3GPP-Charging-Gateway-Address = 172.28.230.13
	3GPP-Selection-Mode = "1"
	3GPP-Negotiated-DSCP = 20
	3GPP-GPRS-Negotiated-QoS-profile = "08-0207000021C000003E80"
# Executing section preacct from file /etc/raddb/sites-enabled/default
+group preacct {
++[preprocess] = ok
[acct_unique] WARNING: Attribute NAS-Port was not found in request, unique ID MAY be inconsistent
[acct_unique] WARNING: Attribute User-Name was not found in request, unique ID MAY be inconsistent
[acct_unique] Hashing ',NAS-Identifier = "172.28.42.136",NAS-IP-Address = 172.28.42.136,Acct-Session-Id = "3E5A44417351a5f0",'
[acct_unique] Acct-Unique-Session-ID = "76377b6d63f9b985".
++[acct_unique] = ok
[suffix] Proxy reply, or no User-Name.  Ignoring.
++[suffix] = ok
++[files] = noop
+} # group preacct = ok
# Executing section accounting from file /etc/raddb/sites-enabled/default
+group accounting {
[detail] 	expand: %{Packet-Src-IP-Address} -> 172.28.42.136
[detail] 	expand: /var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d -> /var/log/radius/radacct/172.28.42.136/detail-20160522
[detail] /var/log/radius/radacct/%{%{Packet-Src-IP-Address}:-%{Packet-Src-IPv6-Address}}/detail-%Y%m%d expands to /var/log/radius/radacct/172.28.42.136/detail-20160522
[detail] 	expand: %t -> Sun May 22 23:21:45 2016
++[detail] = ok
++update request {
	expand: %{3GPP-Location-Info} -> 0x0024f520834bf9bf
++} # update request = noop
[sql] 	expand: %{User-Name} ->
[sql] sql_set_user escaped user --> ''
[sql] 	expand: %{Acct-Delay-Time} ->
[sql] 	... expanding second conditional
[sql] 	expand:            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,    xascendsessionsvrkey, mccmnc, locationinfo)           VALUES             ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}',              '%{SQL-User-Name}',              '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}',              '%{NAS-Port-Type}', '%S', NULL,              '0', '%{Acct-Authentic}', '%{Connect-Info}',              '', '0', '0',              '%{Called-Station-Id}', '%{Calling-Station-Id}', '',              '%{Service-Type}', '%{Framed-Protocol}', '%{Fram
rlm_sql (sql): Reserving sql socket id: 30
rlm_sql (sql): Released sql socket id: 30
++[sql] = ok
++[exec] = noop
[attr_filter.accounting_response] 	expand: %{User-Name} ->
++[attr_filter.accounting_response] = noop
+} # group accounting = ok
Sending Accounting-Response of id 101 to 172.28.42.136 port 58599
Finished request 1.
Cleaning up request 1 ID 101 with timestamp +63
Going to the next request
Ready to process requests.




> On 22 May 2016, at 6:48 PM, Matthew Newton <mcn4 at leicester.ac.uk> wrote:
> 
> On Sun, May 22, 2016 at 09:24:46AM +0300, liran kessel wrote:
>> I have done as you suggested, and still I get only 0 in the locationinfo field in the DB. 
> 
> What does the full debug output show? (Start with "radiusd -X",
> capture all the output, send a test packet, post debug back here.)
> 
> Matthew
> 
> 
> -- 
> Matthew Newton, Ph.D. <mcn4 at le.ac.uk>
> 
> Systems Specialist, Infrastructure Services,
> I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom
> 
> For IT help contact helpdesk extn. 2253, <ithelp at le.ac.uk>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html




More information about the Freeradius-Users mailing list