Browse code

modules: readme files regenerated - cnxcc ... [skip ci]

Kamailio Dev authored on 07/01/2019 13:16:36
Showing 1 changed files
... ...
@@ -4,9 +4,18 @@ Carlos Ruiz Díaz
4 4
 
5 5
    ConexionGroup S.A.
6 6
 
7
+Edited by
8
+
9
+Jose Luis Verdeguer
10
+
11
+   Zoon Suite
12
+   <verdeguer@zoonsuite.com>
13
+
7 14
    Copyright © 2013 Carlos Ruiz Díaz, carlos.ruizdiaz@gmail.com
8 15
 
9 16
    Copyright © 2014 Carlos Ruiz Díaz, carlos@latamvoices.com
17
+
18
+   Copyright © 2018 Jose Luis Verdeguer
10 19
      __________________________________________________________________
11 20
 
12 21
    Table of Contents
... ...
@@ -26,8 +35,8 @@ Carlos Ruiz Díaz
26 26
 
27 27
         4. Functions
28 28
 
29
-              4.1. cnxcc_set_max_credit(customer, maxcredit, cps, ipulse,
30
-                      fpulse)
29
+              4.1. cnxcc_set_max_credit(customer, maxcredit, connect, cps,
30
+                      ipulse, fpulse)
31 31
 
32 32
               4.2. cnxcc_set_max_time(customer, maxtime)
33 33
               4.3. cnxcc_update_max_time(customer, maxtime)
... ...
@@ -73,8 +82,8 @@ Chapter 1. Admin Guide
73 73
 
74 74
    4. Functions
75 75
 
76
-        4.1. cnxcc_set_max_credit(customer, maxcredit, cps, ipulse,
77
-                fpulse)
76
+        4.1. cnxcc_set_max_credit(customer, maxcredit, connect, cps,
77
+                ipulse, fpulse)
78 78
 
79 79
         4.2. cnxcc_set_max_time(customer, maxtime)
80 80
         4.3. cnxcc_update_max_time(customer, maxtime)
... ...
@@ -167,24 +176,27 @@ modparam("cnxcc", "credit_check_period", 1)
167 167
 
168 168
 4. Functions
169 169
 
170
-   4.1. cnxcc_set_max_credit(customer, maxcredit, cps, ipulse, fpulse)
170
+   4.1. cnxcc_set_max_credit(customer, maxcredit, connect, cps, ipulse,
171
+          fpulse)
172
+
171 173
    4.2. cnxcc_set_max_time(customer, maxtime)
172 174
    4.3. cnxcc_update_max_time(customer, maxtime)
173 175
    4.4. cnxcc_set_max_channel(customer, maxchan)
174 176
    4.5. cnxcc_terminate_all(customer)
175 177
 
176
-4.1.  cnxcc_set_max_credit(customer, maxcredit, cps, ipulse, fpulse)
178
+4.1.  cnxcc_set_max_credit(customer, maxcredit, connect, cps, ipulse, fpulse)
177 179
 
178
-   Associates the call with a customer id and sets the max credit, cost
179
-   per second, initial pulse and final pulse. The discount is calculated
180
-   in pulses (30/6, 1/1, etc) and subtracted from the pool of credit.
180
+   Associates the call with a customer id and sets the max credit, connect
181
+   cost, cost per second, initial pulse and final pulse. The discount is
182
+   calculated in pulses (30/6, 1/1, etc) and subtracted from the pool of
183
+   credit.
181 184
 
182 185
    The customer value can be provided as a string or a variable holding a
183 186
    string.
184 187
 
185
-   The maxcredit and cps can be double (float) or integer values, they
186
-   have to be provided as static string values of variables holding string
187
-   values.
188
+   The maxcredit, connect and cps can be double (float) or integer values,
189
+   they have to be provided as static string values of variables holding
190
+   string values.
188 191
 
189 192
    The ipulse and fpulse values are integer values, they can be also given
190 193
    via variables holding integers.
... ...
@@ -196,15 +208,16 @@ modparam("cnxcc", "credit_check_period", 1)
196 196
 
197 197
    Example 1.3. cnxcc_set_max_credit()
198 198
 ...
199
-cnxcc_set_max_credit("john-doe", "100.5", "0.5", "20", "10");
199
+cnxcc_set_max_credit("john-doe", "100", "3.0", "0.5", 60, 1);
200 200
 ...
201
-$var(customer) = "john-doe-premium"; # customer id
202
-$var(credit) = "100";       # max credit
203
-$var(cps)   = "2.00";       # cost per second
204
-$var(initial_p)   = 30;     # initial pulse
205
-$var(final_p)     = 6;      # final pulse
206
-cnxcc_set_max_credit("$var(customer)", "$var(credit)", "$var(cps)",
207
-        "$var(initial_p)", "$var(final_p)");
201
+$var(customer)  = "john-doe-premium"; # customer id
202
+$var(credit)    = "100";  # max credit
203
+$var(connect)   = "3.0";  # connect const
204
+$var(cps)       = "0.5";  # cost per second
205
+$var(initial_p) = 60;     # initial pulse
206
+$var(final_p)   = 1;      # final pulse
207
+cnxcc_set_max_credit("$var(customer)", "$var(credit)", "$var(connect)",
208
+        "$var(cps)", "$var(initial_p)", "$var(final_p)");
208 209
 ...
209 210
 
210 211
 4.2.  cnxcc_set_max_time(customer, maxtime)