[Devel] [ openser-Feature Requests-1703003 ] allow INTEGER radius avp for acc module

SourceForge.net noreply at sourceforge.net
Wed Apr 18 16:23:56 CEST 2007


Feature Requests item #1703003, was opened at 2007-04-18 10:23
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=1703003&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Nobody/Anonymous (nobody)
Summary: allow INTEGER radius avp for acc module

Initial Comment:
This is an offshot of:
http://openser.org/pipermail/devel/2007-April/006990.html
http://openser.org/pipermail/devel/2007-April/007134.html

==

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);

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743023&aid=1703003&group_id=139143



More information about the Devel mailing list