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 [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
