Module: kamailio
Branch: master
Commit: bc0264f4802c266901a1eb7a296f80f1dbfcc828
URL:
https://github.com/kamailio/kamailio/commit/bc0264f4802c266901a1eb7a296f80f…
Author: Jose Luis Verdeguer <pepeluxx(a)gmail.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-07-02T16:30:23+02:00
cnxcc: update docs [skip ci]
* new error return values
* delete return value from set_max_credit not in code
---
Modified: src/modules/cnxcc/doc/cnxcc.xml
Modified: src/modules/cnxcc/doc/cnxcc_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/bc0264f4802c266901a1eb7a296f80f…
Patch:
https://github.com/kamailio/kamailio/commit/bc0264f4802c266901a1eb7a296f80f…
---
diff --git a/src/modules/cnxcc/doc/cnxcc.xml b/src/modules/cnxcc/doc/cnxcc.xml
index 686583f471..3fc10feb8d 100644
--- a/src/modules/cnxcc/doc/cnxcc.xml
+++ b/src/modules/cnxcc/doc/cnxcc.xml
@@ -23,15 +23,6 @@
<email>carlos.ruizdiaz(a)gmail.com</email>
</address>
</author>
- <editor>
- <firstname>Jose Luis</firstname>
- <surname>Verdeguer</surname>
- <email>verdeguer(a)zoonsuite.com</email>
- <affiliation><orgname>Zoon Suite</orgname></affiliation>
- <address>
- <email>verdeguer(a)zoonsuite.com</email>
- </address>
- </editor>
</authorgroup>
<copyright>
<year>2013</year>
@@ -41,10 +32,6 @@
<year>2014</year>
<holder>Carlos Ruiz Díaz, carlos(a)latamvoices.com</holder>
</copyright>
- <copyright>
- <year>2018</year>
- <holder>Jose Luis Verdeguer</holder>
- </copyright>
</bookinfo>
diff --git a/src/modules/cnxcc/doc/cnxcc_admin.xml
b/src/modules/cnxcc/doc/cnxcc_admin.xml
index 0c26cb0a58..322a227bfb 100644
--- a/src/modules/cnxcc/doc/cnxcc_admin.xml
+++ b/src/modules/cnxcc/doc/cnxcc_admin.xml
@@ -177,10 +177,9 @@ modparam("cnxcc", "credit_check_period", 1)
<listitem>
<para>
- <emphasis>-2 - failed, credit value is less than initial pulse
value</emphasis>
+ <emphasis>-4 - call-id already present for this client</emphasis>
</para>
</listitem>
-
</itemizedlist>
</para>
<example>
@@ -234,6 +233,11 @@ cnxcc_set_max_credit("$var(customer)",
"$var(credit)", "$var(connect)",
<emphasis>-1 - failed, error logged</emphasis>
</para>
</listitem>
+ <listitem>
+ <para>
+ <emphasis>-4 - call-id already present for this client</emphasis>
+ </para>
+ </listitem>
</itemizedlist>
</para>
<example>
@@ -345,6 +349,11 @@ if (!cnxcc_update_max_time("$var(client)",
"$var(update_time)")) {
</para>
</listitem>
+ <listitem>
+ <para>
+ <emphasis>-4 - call-id already present for this client</emphasis>
+ </para>
+ </listitem>
</itemizedlist>
</para>
<example>
@@ -543,14 +552,21 @@ route[CNXCC]
$var(i_pulse) = 30;
$var(f_pulse) = 6;
- if (!cnxcc_set_max_credit("$var(client)",
+
+ cnxcc_set_max_credit("$var(client)",
"$var(credit)",
"$var(connect_cost)",
"$var(cost_per_sec)",
"$var(i_pulse)",
- "$var(f_pulse)")) {
- xlog("Error setting up credit control");
- }
+ "$var(f_pulse)");
+
+ switch ($?) {
+ case -1:
+ xerr("Error setting up credit control");
+ sl_send_reply("503", "Internal Server Error");
+ case -4:
+ xwarn("$ci already present for client $var(client)");
+ };
}
event_route[cnxcc:call-shutdown]