[OpenSIPS-Devel] OPENSIP code Contribution- Add callid to RADIUS authentication message

Peter Nixon listuser at peternixon.net
Mon Aug 11 15:22:12 CEST 2008


Hello Dror

I am one of the FreeRADIUS developers. I would like to see both the patch you 
are proposing and and example Auth and Acct packet. The behavior you propose 
is supported by RFC2866 so I would support including it:

5.5.  Acct-Session-Id

   Description

      This attribute is a unique Accounting ID to make it easy to match
      start and stop records in a log file.  The start and stop records
      for a given session MUST have the same Acct-Session-Id.  An
      Accounting-Request packet MUST have an Acct-Session-Id.  An
      Access-Request packet MAY have an Acct-Session-Id; if it does,
      then the NAS MUST use the same Acct-Session-Id in the Accounting-
      Request packets for that session.

If you need to create a relationship between an auth and acct request, 
another way (that is under the controll of the RADIUS server instead of the 
NAS) would be to set a Class value in your auth accept and then the NAS (in 
this case OpenSIPS) should automatically add this attribute to any 
accounting records it sends you. (I don't know whether it does currently, 
but thats what is SHOULD dot). See:

5.25.  Class

   Description

      This Attribute is available to be sent by the server to the client
      in an Access-Accept and SHOULD be sent unmodified by the client to
      the accounting server as part of the Accounting-Request packet if
      accounting is supported.  The client MUST NOT interpret the
      attribute locally.

Regards

Peter

On Mon 11 Aug 2008, Dror Wald wrote:
> Hello,
>
> We needed to add callid value to the authentication requests that OpenSIPS
> sends to RADIUS server.
>
> We need it because when we get the authentication message we start an
> object of the specific call in our billing application. Without getting
> the callid in the authentication phase, we can't later connect between the
> call object and the accounting information about the call.
>
> We also need it because users use the same user name but different
> authentication usernames, so it's difficult later for accounting to
> distinguish between users.
>
> We made a patch to auth_radius module and added the callid value in the
> Acct-Session-Id attribute (maybe you can suggest a better name for the
> attribute, but this one is good because it's the same one latter in
> accounting).
>
> The patch is good for us, and we'd like to contribute it to the project.
>
> Comments are welcome.
>
>
>
> Dror Wald
>
> A developer, VoIP team, Jajah Inc
>
> E-mail: dror at jajah.com



-- 

Peter Nixon
http://peternixon.net/



More information about the Devel mailing list