how mediaproxy integrates with radius

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

how mediaproxy integrates with radius

Gabriel Bermudez
Hi all,

I was wondering how the radius accounting works in mediaproxy.  I
understand that it uses the radiusclient-ng library to send RADIUS
requests to the Freeradius server.  If the freeradius server has a mysql
backend and this backend structure is based on the cdrtool's scripts;  
what information gets logged (what columns get inserted or updated) on
the database.  I can see that the /etc/freeradius/sql.conf file calls
several mysql procedures, I guess that "accounting_stop_query" comes
after "accounting_start_query"; does "accounting_update_query" comes in
between or after "accounting_stop_query"?
Thanks for your help.

Regards,

Gabriel Bermudez

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: how mediaproxy integrates with radius

Dan Pascu
On Friday 30 January 2009, Gabriel Bermudez wrote:

> Hi all,
>
> I was wondering how the radius accounting works in mediaproxy.  I
> understand that it uses the radiusclient-ng library to send RADIUS
> requests to the Freeradius server.  If the freeradius server has a
> mysql backend and this backend structure is based on the cdrtool's
> scripts; what information gets logged (what columns get inserted or
> updated) on the database.  I can see that the /etc/freeradius/sql.conf
> file calls several mysql procedures, I guess that
> "accounting_stop_query" comes after "accounting_start_query"; does
> "accounting_update_query" comes in between or after
> "accounting_stop_query"?

It can come in between or after, depending on many factors. However the
mediaproxy update query is made in such a way that it doesn't care about
the order.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: how mediaproxy integrates with radius

Gabriel Bermudez
Hello Dan,

Dan Pascu escribió:

> On Friday 30 January 2009, Gabriel Bermudez wrote:
>  
>> Hi all,
>>
>> I was wondering how the radius accounting works in mediaproxy.  I
>> understand that it uses the radiusclient-ng library to send RADIUS
>> requests to the Freeradius server.  If the freeradius server has a
>> mysql backend and this backend structure is based on the cdrtool's
>> scripts; what information gets logged (what columns get inserted or
>> updated) on the database.  I can see that the /etc/freeradius/sql.conf
>> file calls several mysql procedures, I guess that
>> "accounting_stop_query" comes after "accounting_start_query"; does
>> "accounting_update_query" comes in between or after
>> "accounting_stop_query"?
>>    
>
> It can come in between or after, depending on many factors. However the
> mediaproxy update query is made in such a way that it doesn't care about
> the order.
>
>  
Thanks for your answer.  So "accounting_start_query" should be called
when a INVITE gets processed by opensips, "accounting_stop_query" when a
BYE gets proccesed by opensips (using the opensip's setflag function I
guess), and "accounting_update_query" gets called by mediaproxy when the
RTP flow stops.  The start and stop procedures set values on
AcctSessionTime column, does the update procedure does the same thing?
Thanks for your reply.

Regards,

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: how mediaproxy integrates with radius

Dan Pascu
On Friday 30 January 2009, Gabriel Bermudez wrote:

> Hello Dan,
>
> Dan Pascu escribió:
> > On Friday 30 January 2009, Gabriel Bermudez wrote:
> >> Hi all,
> >>
> >> I was wondering how the radius accounting works in mediaproxy.  I
> >> understand that it uses the radiusclient-ng library to send RADIUS
> >> requests to the Freeradius server.  If the freeradius server has a
> >> mysql backend and this backend structure is based on the cdrtool's
> >> scripts; what information gets logged (what columns get inserted or
> >> updated) on the database.  I can see that the
> >> /etc/freeradius/sql.conf file calls several mysql procedures, I
> >> guess that
> >> "accounting_stop_query" comes after "accounting_start_query"; does
> >> "accounting_update_query" comes in between or after
> >> "accounting_stop_query"?
> >
> > It can come in between or after, depending on many factors. However
> > the mediaproxy update query is made in such a way that it doesn't
> > care about the order.
>
> Thanks for your answer.  So "accounting_start_query" should be called
> when a INVITE gets processed by opensips, "accounting_stop_query" when
> a BYE gets proccesed by opensips (using the opensip's setflag function
> I guess), and "accounting_update_query" gets called by mediaproxy when
> the RTP flow stops.  The start and stop procedures set values on
> AcctSessionTime column, does the update procedure does the same thing?

Only if the stop record didn't already set a stop time and a duration.
Check the sql queries (from cdrtool) to better understand how it's done.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users