<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
These situations are often in the VoIP billing world. If the rate
changes during a call there is little<br>
you can do in a prepaid billing system (in a postpaid situation this is
not a problem). You have to choose<br>
either to bill your customer with the rate that is valid at the
beginning of the call or at the end of it. Most of the <br>
implemantations choose to bill the customer with the rate that is valid
at the end of the call. I know<br>
this is somewhat inconsistent because if you calculate the remaining
time with a low rate and the rate changes <br>
during the call then you might end up with a negative credit on your
prepaid customer's balance. There is little <br>
you can do to about that. You just have to choose one of the options
above and notify your customers <br>
about your decision. The thing is that all this - although scary at
first sight - is somewhat balanced in the end<br>
(fair-wise) because the probabilities that your customer can make a
call during a low-to-high rate change are<br>
equal with the probabilities that the call follows a high-to-low rate
change. So in the end nobody really loses or wins.<br>
<br>
You don't have to be a perl expert to use the rlm_perl module. But I
can tell you from my experience that it<br>
gives you control of all different scenarios that may arise. Your
back-end could (usually a DB in these situations)<br>
be as complex as you like (pricelists per customer, per time-slice, per
type, per u-name-it), and your code could<br>
be as complex as you like (and as dynamic as you like) using a 3rd
generation language that gives the flexibility to<br>
do whatever you want.<br>
<br>
<br>
Alan DeKok wrote:
<blockquote cite="mid:49364045.8060801@deployingradius.com" type="cite">
  <pre wrap="">Saeed Akhtar wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Yes I know that freeradius doesn't know whether we are charging $ 1 or
2. But the purpose of asking question was that If a user has 3 hrs left
@ $1/hr and after an hour the rate changes to 0.5/hr then technically
freeradius should reply Session-Timeout = 5hrs as (1hr @ $1/hr + 4hrs @
$0.5/hr). So may be we can create some condition to do so. 
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  See the "expr" module.  It has limited support for some math expressions.

  Alan DeKok.
-
List info/subscribe/unsubscribe? See <a class="moz-txt-link-freetext" href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a>
  </pre>
</blockquote>
<br>
</body>
</html>