diff --git a/src/modules/cnxcc/doc/cnxcc_admin.xml b/src/modules/cnxcc/doc/cnxcc_admin.xml index 4284437a8bc..0c26cb0a581 100644 --- a/src/modules/cnxcc/doc/cnxcc_admin.xml +++ b/src/modules/cnxcc/doc/cnxcc_admin.xml @@ -128,21 +128,37 @@ modparam("cnxcc", "credit_check_period", 1) Associates the call with a customer id and sets the max credit, connect cost, cost per second, initial pulse and final pulse. The discount - is calculated in pulses (30/6, 1/1, etc) and subtracted from the pool + is calculated in pulses (1/1, 60/1, etc) and subtracted from the pool of credit. The customer value can be provided as a string or a variable holding - a string. + a string. This value identifies all calls from the same customer. + + + The maxcredit (float) value is the maximum credit available for the current call. + + + The connect (float) value is the connect cost for the current call. + + + The cps (float) value is the cost per second for the current call. + + + The ipuse (integer) value is the initial pulse and establishes the minimum + time to be charged. For example, value 1 establishes a charge per second + and value 60 sets a charge per minute. If it is taken as value 60, even + if the duration is 5 seconds, 1 minute will be charged. - The maxcredit, connect and cps can be double (float) or integer values, they - have to be provided as static string values of variables holding string - values. + The fpulse (integer) value is the final pulse and establishes, from the initial + pulse, the time range to be charged. For example, the value 1 establishes a charge + per second, 5 sets a charge in blocks of 5 seconds, 60 sets a full minute charge. - The ipulse and fpulse values are integer values, they can be also - given via variables holding integers. + 1/1 will make a charge per seconds for the entire call. 60/1 will make a + charge per seconds with the first full minute. 60/60 always perform + a full minute charge. Return code: @@ -173,12 +189,15 @@ modparam("cnxcc", "credit_check_period", 1) ... cnxcc_set_max_credit("john-doe", "100", "3.0", "0.5", 60, 1); ... -$var(customer) = "john-doe-premium"; # customer id -$var(credit) = "100"; # max credit -$var(connect) = "3.0"; # connect const -$var(cps) = "0.5"; # cost per second -$var(initial_p) = 60; # initial pulse -$var(final_p) = 1; # final pulse +$var(customer) = "john-doe"; # customer id +$var(credit) = "100"; # max credit for all calls with the same + # customer id +$var(connect) = "3.0"; # connect cost or initial cost for the call +$var(cps) = "0.5"; # cost per second +$var(initial_p) = 60; # initial pulse (60 = the first minute will be + # charged even if the call is shorter) +$var(final_p) = 1; # final pulse (after the first minute, it will + # be charge in ranges of 1 second) cnxcc_set_max_credit("$var(customer)", "$var(credit)", "$var(connect)", "$var(cps)", "$var(initial_p)", "$var(final_p)"); ...