[Devel] issues with int extra attributes in radius accounting
Ovidiu Sas
sip.nslu at gmail.com
Wed Apr 11 21:15:58 CEST 2007
Hi all,
I was trying to add an extra attribute to radius accounting packets,
specifically the "Acct-Session-Time" attribute. The type for this
attribute is integer:
ATTRIBUTE Acct-Session-Time 46 integer
By inspecting the radius accounting packets that are sent by openser
to the radius server, it looks like the value passed inside is a
string:
for a call duration of 813s the attribute looks like:
2e 06 00 33 31 38
2e -> 46:Acct-Session-Time
06 -> length
00
33 -> ascii: 3
31 -> ascii: 1
38 -> ascii: 8
Is it possible to insert integer attributes as an avp from the acc module?
Is this a bug (the module should be able to insert integer attributes)?
Or the design is to pass _only_ string attributes?
Snippets from the config file:
modparam("acc", "radius_config",
"/usr/local/etc/radiusclient-ng/radiusclient.conf")
modparam("acc", "radius_flag", 1)
modparam("acc", "radius_extra", "Acct-Session-Time=$avp(i:921)")
#the accounting section:
if (is_method("BYE")) {
xlog("L_INFO", "dialog_status:$DLG_status
duration=$DLG_lifetime\n");
$avp(i:921) = $DLG_lifetime{s.int};
} else {
$avp(i:921) = 0;
}
setflag(1);
Regards,
Ovidiu Sas
More information about the Devel
mailing list