Skip to content

Commit

Permalink
cnxcc: update docs [skip ci]
Browse files Browse the repository at this point in the history
* new error return values
* delete return value from set_max_credit not in code

(cherry picked from commit bc0264f)
(cherry picked from commit d14c251)
  • Loading branch information
Pepelux authored and miconda committed Jul 16, 2020
1 parent c32f795 commit 4a82f43
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions src/modules/cnxcc/doc/cnxcc_admin.xml
Expand Up @@ -161,10 +161,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>
Expand Down Expand Up @@ -214,6 +213,11 @@ cnxcc_set_max_credit("$var(customer)", "$var(credit)", "$var(cps)",
<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>
Expand Down Expand Up @@ -325,6 +329,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>
Expand Down Expand Up @@ -522,13 +531,20 @@ 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(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]
Expand Down

0 comments on commit 4a82f43

Please sign in to comment.