How to parse the "value" in an accounting message andprintthecontents In "detail-..." file?

tnt at kalik.net tnt at kalik.net
Tue Dec 9 00:31:02 CET 2008


>Sat Aug 16 19:02:04 2008
>
>        NAS-IP-Address = 101.101.101.3
>
>        Acct-Status-Type = Interim-Update
>
>        Acct-Session-Id = "I=2        20+000000\000\000\000\t"
>
>        CableLabs-Event-Message =
>0x0004493d32202020202020202032302b30303030303000000009000100012020202020202032302b3030303030300000004032303038313230383134343133362e3030300000000880000600
>
>        CableLabs-Direction-indicator = 0x0001
>
>        CableLabs-MTA-Endpoint-Name = "MTA Endpoint"
>
>        CableLabs-Calling-Party-Number = "                sipp"
>
>        CableLabs-Called-Party-Number = "             service"
>
>        CableLabs-Routing-Number = "             service"
>
>        CableLabs-Attr-87 = 0x0003
>
>        CableLabs-Event-Message =
>0x0004493d32202020202020202032302b3030303030300000000a000100012020202020202032302b3030303030300000004132303038313230383134343133362e3030300000000880000600
>
>        CableLabs-Direction-indicator = 0x0002
>
>        CableLabs-MTA-Endpoint-Name = "MTA Endpoint"
>
>        CableLabs-Calling-Party-Number = "                sipp"
>
>        CableLabs-Called-Party-Number = "             service"
>
>        CableLabs-Routing-Number = "             service"
>
>        CableLabs-Attr-87 = 0x0003
>
>        Client-IP-Address = 101.101.101.3
>
>        Acct-Unique-Session-Id = "b9e905ab4cefd846"
>
>        Timestamp = 1218927724
>
>

OK I get it. So your attribute *is* an octet string.

>Both the instances of "Cablelabs-Event-Message" should translate to things
>like
>
>Version-ID (4 bytes), BCID (24 bytes), Signaling_Start, ...
>

You will have to do the translation yourself. You can use perl module and
store the result in a self defined attribute (have a look at
raddb/dictionary) and use linelog to print it out.

Ivan Kalik
Kalik Informatika ISP




More information about the Freeradius-Users mailing list