How to parse the "value" in an accounting message and print the contents In "detail-..." file?
Hello, I am trying to decode accounting message from a device which sends PacketCable Event Messages. These are VSAs and the payload has a custom format. Freeradius dumps the octet string of the length of the message which it cannot decode (due to custom format) I want to dump these specific attributes in the message. How do I go about doing that? I want to dump the output in the "detail-..." file along with the other attributes. I am using freeradius version 1.1.7 (built March 10, 2008) on ubuntu with linux kernel 2.6.26-19 Thank You. -a
Freeradius has cablelabs VSA dictionary. If it needs updating ask the vendor for the latest dictionary. Post it also to this list so that it can be included in the distribution. Ivan Kalik Kalik Informatika ISP Dana 8/12/2008, "al pat" <alps.oss@gmail.com> piše:
Hello, I am trying to decode accounting message from a device which sends PacketCable Event Messages.
These are VSAs and the payload has a custom format.
Freeradius dumps the octet string of the length of the message which it cannot decode (due to custom format)
I want to dump these specific attributes in the message. How do I go about doing that? I want to dump the output in the "detail-..." file along with the other attributes.
I am using freeradius version 1.1.7 (built March 10, 2008) on ubuntu with linux kernel 2.6.26-19
Thank You. -a
Ivan, Yes, there is a cablelabs dictionary. The problem is that one of the attributes has a complex structure that is embedded in the value part. The value part here is just printed as a hex string - but from the packetcable standard it is to be interpreted in a certain way. Since this payload itself has specific meaning in the context of packetcable, some intervention will be needed to print that - just don't know yet how to go about doing it. -a 2008/12/8 <tnt@kalik.net>
Freeradius has cablelabs VSA dictionary. If it needs updating ask the vendor for the latest dictionary. Post it also to this list so that it can be included in the distribution.
Ivan Kalik Kalik Informatika ISP
Dana 8/12/2008, "al pat" <alps.oss@gmail.com> piše:
Hello, I am trying to decode accounting message from a device which sends PacketCable Event Messages.
These are VSAs and the payload has a custom format.
Freeradius dumps the octet string of the length of the message which it cannot decode (due to custom format)
I want to dump these specific attributes in the message. How do I go about doing that? I want to dump the output in the "detail-..." file along with the other attributes.
I am using freeradius version 1.1.7 (built March 10, 2008) on ubuntu with linux kernel 2.6.26-19
Thank You. -a
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
What is the name that attribute? Can you post the debug of the accounting packet. Ivan Kalik Kalik Informatika ISP Dana 8/12/2008, "al pat" <alps.oss@gmail.com> piše:
Ivan, Yes, there is a cablelabs dictionary. The problem is that one of the attributes has a complex structure that is embedded in the value part. The value part here is just printed as a hex string - but from the packetcable standard it is to be interpreted in a certain way. Since this payload itself has specific meaning in the context of packetcable, some intervention will be needed to print that - just don't know yet how to go about doing it.
-a
2008/12/8 <tnt@kalik.net>
Freeradius has cablelabs VSA dictionary. If it needs updating ask the vendor for the latest dictionary. Post it also to this list so that it can be included in the distribution.
Ivan Kalik Kalik Informatika ISP
Dana 8/12/2008, "al pat" <alps.oss@gmail.com> piše:
Hello, I am trying to decode accounting message from a device which sends PacketCable Event Messages.
These are VSAs and the payload has a custom format.
Freeradius dumps the octet string of the length of the message which it cannot decode (due to custom format)
I want to dump these specific attributes in the message. How do I go about doing that? I want to dump the output in the "detail-..." file along with the other attributes.
I am using freeradius version 1.1.7 (built March 10, 2008) on ubuntu with linux kernel 2.6.26-19
Thank You. -a
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
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 Both the instances of "Cablelabs-Event-Message" should translate to things like Version-ID (4 bytes), BCID (24 bytes), Signaling_Start, ... The above is just a single packet that I have attached, a call has 7 such events in my case. -a 2008/12/8 <tnt@kalik.net>
What is the name that attribute? Can you post the debug of the accounting packet.
Ivan Kalik Kalik Informatika ISP
Dana 8/12/2008, "al pat" <alps.oss@gmail.com> piše:
Ivan, Yes, there is a cablelabs dictionary. The problem is that one of the attributes has a complex structure that is embedded in the value part. The value part here is just printed as a hex string - but from the packetcable standard it is to be interpreted in a certain way. Since this payload itself has specific meaning in the context of packetcable, some intervention will be needed to print that - just don't know yet how to go about doing it.
-a
2008/12/8 <tnt@kalik.net>
Freeradius has cablelabs VSA dictionary. If it needs updating ask the vendor for the latest dictionary. Post it also to this list so that it can be included in the distribution.
Ivan Kalik Kalik Informatika ISP
Dana 8/12/2008, "al pat" <alps.oss@gmail.com> piše:
Hello, I am trying to decode accounting message from a device which sends PacketCable Event Messages.
These are VSAs and the payload has a custom format.
Freeradius dumps the octet string of the length of the message which it cannot decode (due to custom format)
I want to dump these specific attributes in the message. How do I go about doing that? I want to dump the output in the "detail-..." file along with the other attributes.
I am using freeradius version 1.1.7 (built March 10, 2008) on ubuntu with linux kernel 2.6.26-19
Thank You. -a
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
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
Hi Ivan, Hmm, on my ubuntu system - I am not able to execute a basic perl module from freeradius. It is freeradius version 1.1.7 (installed using apt-get install freeradius) When i start freeradius with -X option, I am not seeing any indication of rlm_perl being loaded. (I have included a perl {} section under modules in radiusd.conf, as well as tried including the experimental.conf file which has perl module definition). Any inputs with this? Thanks -a On Mon, Dec 8, 2008 at 6:31 PM, <tnt@kalik.net> wrote:
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
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
al pat wrote:
Hi Ivan,
Hmm, on my ubuntu system - I am not able to execute a basic perl module from freeradius. It is freeradius version 1.1.7 (installed using apt-get install freeradius)
Build 2.1.3 from source. Or build a debian package. Ensure that you install libperl-dev, too. Alan DeKok.
participants (3)
-
al pat -
Alan DeKok -
tnt@kalik.net