Module: kamailio
Branch: master
Commit: cea7fa14b0aefc647d28eb1bf56faaec89d90d67
URL: 
https://github.com/kamailio/kamailio/commit/cea7fa14b0aefc647d28eb1bf56faaec89d90d67

Author: Jose Luis Verdeguer <[email protected]>
Committer: Jose Luis Verdeguer <[email protected]>
Date: 2019-12-19T18:22:59+01:00

cnxcc: updated readme file [skip ci]

---

Modified: src/modules/cnxcc/doc/cnxcc_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/cea7fa14b0aefc647d28eb1bf56faaec89d90d67.diff
Patch: 
https://github.com/kamailio/kamailio/commit/cea7fa14b0aefc647d28eb1bf56faaec89d90d67.patch

---

diff --git a/src/modules/cnxcc/doc/cnxcc_admin.xml 
b/src/modules/cnxcc/doc/cnxcc_admin.xml
index 4284437a8b..0c26cb0a58 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)
                        <para>
                                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.
                        </para>
                        <para>
                                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.
+                       </para>
+                       <para>
+                               The maxcredit (float) value is the maximum 
credit available for the current call.
+                       </para>
+                       <para>
+                               The connect (float) value is the connect cost 
for the current call.
+                       </para>
+                       <para>
+                               The cps (float) value is the cost per second 
for the current call.
+                       </para>
+                       <para>
+                               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.
                        </para>
                        <para>
-                               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.
                        </para>
                        <para>
-                               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.
                        </para>
                        <para>
                                <emphasis>Return code:</emphasis>
@@ -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)");
 ...


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to