[OpenSIPS-Users] radius accounting: multi-leg, zero session time

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Jun 21 11:37:21 CEST 2010

Hi Andrew,

Andrew Pogrebennyk wrote:
> Hello Bogdan,
> On 18.06.2010 00:36, Bogdan-Andrei Iancu wrote:
>>> ERROR:acc:acc_aaa_request: failed to add RAD_LEG_SRC, 23
>>> What id and type should the RAD_LEG_SRC, RAD_LEG_DST attributes have?
>>> In config they are defined as:
>>> modparam("acc", "multi_leg_info", 
>>> "RAD_LEG_SRC=$avp(i:901);RAD_LEG_DST=$avp(i:902)"
>> Have you defined the  RAD_LEG_SRC and RAD_LEG_DST RADIUS AVPs in the 
>> RADIUS dictionary?
> No. Basically I am asking what id and type should those AVPs have in the 
> RADIUS dictionary.

You can add this AVPs with whatever ID but string type. Also take care 
to correlate the IDs in radius client and server. Also be careful not to 
overlap with any already existing ID.

>>> 2) How to make opensips pass session-time attribute to radius?
>>> Sun Jun 3 08:10:12 2010 : Error: [sql] stop packet with zero session
>>> length. [user '000100 at', nas '']
>>> In config I'm doing just acc_aaa_request(). I'm using OpenSIPS 1.6.2 and 
>>> want to do rating with cdrool. Since these are basic things, perhaps 
>>> that's me doing something stupid?
>> OpenSIPS does not explicitly add the session-time AVP - is this an extra 
>> accounting val or ?
> Well, I was thinking that OpenSIPS should supply session-time so that 
> cdrtool would know real call duration, shouldn't it? Or cdrtool can 
> deduct call duration based on the difference of timestamps of Start and 
> Stop packets? I'm not sure how this works.

I'm not sure how cdrtool works or if yon need to do some extra 
configuration in opensips to make it work. The Accouting and Radius part 
in opensips allows you to configure extra fields to be sent to the 
radius server, but such customization depends on the requirements of the 
radius server application....

See :


Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany

More information about the Users mailing list