Thanks Alan D<div><br></div><div>understood. I will use unlang in accounting.</div><div>Thanks<span></span></div><div><br>On Wednesday, October 9, 2013, Alan DeKok  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Russell Mike wrote:<br>
>> So if you want to do something when the users traffic is over the quota,<br>
>> you have to do it in the accounting section.<br>
><br>
> Could you please kindly indicate what should i do there ? i tried to<br>
> perform the check again when user is online by adding counter entry in<br>
> *session* section. but did not work either.<br>
<br>
  Uh... you do know that "session" is not the same as "accounting", right?<br>
<br>
  Why are you doing something wrong?<br>
<br>
> I am not very clear how to update mysql db & perform the check on<br>
> frequent basis. base on the output from the counter module<br>
> (ok,noop,etc..), i understand how to update the reply from un-lang to<br>
> log off user.<br>
<br>
  Do you understand what the server does when it receives an accounting<br>
packet?<br>
<br>
  Have you tried running the server in debugging mode, and seeing what<br>
happens when it receives an accounting packet?<br>
<br>
  Do that before asking more questions.  Watch the server go update SQL.<br>
<br>
  Now... how do you query SQL (independent of RADIUS) to see if the<br>
users session is over quota?<br>
<br>
  Then... put that query into the "accounting" section, via "unlang".<br>
Check if the user is over quota.  If so, send a disconnect message.<br>
<br>
  See raddb/sites-available/originate-coa for examples of originating a<br>
disconnect message.<br>
<br>
  Alan DeKok.<br>
-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
</blockquote></div>