Hi everybody,

I'm using freeradius/mysql with a daily & nightly hours based billing, i mean users on off-peak hours are billed partially.

To do that, I have a radacct mysql table holding my accounting data, and another customized acct table that i use for billing, then a script periodically imports and calculates the billed duration from new freeradius accounting records.

The system is far from being perfect because online data for users are not exactly in real time, as the importation is asynchronyous.

So, what I want is to *add a BilledSessionTime column* in the radacct table, and to *set this column when receiving the accounting stop* packet. Unfortunately, I could not formulate it into the sql accounting_stop_query as the calculation is quite complicated.

Then I'd like to ask if it would be possible for me to have an *executed external program on each acct stop* (similar as exec-program and exec-program-wait) ? in sql.conf ?

or value like '`script %{Acct-Start-Time} %{Acct-Stop-Time} %{Acct-Session-Time}`' in the accounting_stop_query ?

Else will I need to pull the code ?

another idea ?

Any help would be appreciated,

Thanks in advance,


--
DouRiX



- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to