Hi Freeradius-Users May be some of you facing with this problem, but I haven't a proper solution yet. I have a freeradius 2.2.0 and mysql 5.5.28. I would like to write (and of course aggregate) accounting records into mysql db. I 'v tried to modify the dialup.conf to extract the 3GPP radius attributes as well as the standard attributes (appended extra fields, db schema modified as well). accounting_start_query = " \ INSERT INTO ${acct_table1} \ (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, test,fullpacket) \ 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}', '%{Framed-IP-Address}', \ '%{%{Acct-Delay-Time}:-0}', '0', '0','%{request:3GPP-IMSI}','%Z')" But the '%{request:3GPP-IMSI}' does not work, it is empty, however the '%Z' countains the full accounting packet. It seems the 3GPP-* runtime variable does not get value or may be the format is wrong. I'v made a not so elegant solution with mysql-udf-preg and regexped the necessary attribs from full packet , but i think it could be too slow with more attribs/inserts. Do you have any idea how to solve this issue? Dohány Tibor mailto:bit1@freemail.hu