How freeradius mapping the attributes when save records into radacct table?

Zhang Shukun bitzsk at gmail.com
Fri Dec 25 10:13:23 CET 2009


hi, all
   Merry Christmas!
   i want to how freeradius map the attributes between vendor specific
attributes and radius usuall attributes. for example.

i have attributes from asterisk send to radius, attributes and data as follows:

Acct-Status-Type = Stop
Asterisk-Src = "5678"
Asterisk-Dst = "4321"
Asterisk-Dst-Ctx = "tutorial"
Asterisk-Clid = "\"Jane Smith\" <5678>"
Asterisk-Chan = "SIP/ivan-00000004"
Asterisk-Dst-Chan = "SIP/test-00000005"
Asterisk-Last-App = "Dial"
Asterisk-Last-Data = "SIP/test"
Asterisk-Start-Time = "2009-12-23 16:00:48 +0000"
Asterisk-Answer-Time = "2009-12-23 16:00:53 +0000"
Asterisk-End-Time = "2009-12-23 16:02:49 +0000"
Asterisk-Duration = 121
Asterisk-Bill-Sec = 116
Asterisk-Disposition = "ANSWERED"
Asterisk-AMA-Flags = "DOCUMENTATION"
Asterisk-Unique-ID = "1261584048.4"
User-Name = "SIP/ivan-00000004"
Acct-Session-Id = "1261584048.4"
NAS-Port = 0
Acct-Delay-Time = 0
NAS-IP-Address = 127.0.0.1

but when sended to freeradius and saved to mysql table radacct, record
shows as follow,

|        15 | 1261584048.4  | acb68819c2f8e979 | SIP/ivan-00000004 |
|       | 127.0.0.1     | 0         |             | 2009-12-24
00:02:49 | 2009-12-24 00:02:49 |               0 |               |
              |             |               0 |                0 |
            |         |                    |             |
   | |              0 |             0 | NULL                 |

as you see, many attributes not saved to the table radacct, there are
lost. My question is how freeradius know the mapping between them(the
attributes)?

if i want to change the attributes(add or remove ) for the mapping?
what should i do? modify the src codes of freeradius ? or do others
-- 
Thanks,
Sucan




More information about the Freeradius-Users mailing list