Module: kamailio
Branch: master
Commit: 3b1f5b9c89846d6ffc67acb9eca376d0f424b5ca
URL: https://github.com/kamailio/kamailio/commit/3b1f5b9c89846d6ffc67acb9eca376d…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-06-05T18:54:04+02:00
pv_headers: migrate to $xavi
* $x_hdr(HEADER) is case insensitive now as it should be
* rework pvh_set_header():
use core pv_get_spec_*
use PV_IDX_NONE to detect no index case
remove values instead of adding NULL if PV_IDX_ALL
---
Modified: src/modules/pv_headers/doc/params.xml
Modified: src/modules/pv_headers/doc/pv_headers_admin.xml
Modified: src/modules/pv_headers/pv_headers.c
Modified: src/modules/pv_headers/pv_headers.h
Modified: src/modules/pv_headers/pvh_func.c
Modified: src/modules/pv_headers/pvh_hash.c
Modified: src/modules/pv_headers/pvh_xavp.c
Modified: src/modules/pv_headers/pvh_xavp.h
---
Diff: https://github.com/kamailio/kamailio/commit/3b1f5b9c89846d6ffc67acb9eca376d…
Patch: https://github.com/kamailio/kamailio/commit/3b1f5b9c89846d6ffc67acb9eca376d…
Hi I want to add a new culomn to acc table. I named it ring_time and in every call i put the ring time to it like this:
`$dlg_var(ringtime) = $Ts;`
then I add a extra column in config like this:
`modparam("acc", "log_extra",
"src_user=$fU;src_domain=$fd;src_ip=$si;"
"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;ring_time=$dlg_var(ringtime)")`
but when I try to test it always i get:
`db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Incorrect datetime value: '1591361996' for column `kamailio`.`acc`.`ring_time` at row 1 (1292)
Jun 5 17:29:59 kamailio /usr/sbin/kamailio[22901]: ERROR: {2 102 INVITE 105a0f4a3d99a0a5558355e54b43f4e1@192.168.1.121:5060} <core> [db_query.c:244]: db_do_insert_cmd(): error while submitting query
Jun 5 17:29:59 kamailio /usr/sbin/kamailio[22901]: ERROR: {2 102 INVITE 105a0f4a3d99a0a5558355e54b43f4e1@192.168.1.121:5060} acc [acc.c:477]: acc_db_request(): failed to insert into database`
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2349
Module: kamailio
Branch: 5.3
Commit: 16a94677a5aeaa499eaf09eab4cd057a720b3200
URL: https://github.com/kamailio/kamailio/commit/16a94677a5aeaa499eaf09eab4cd057…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-06-05T14:31:20+02:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/cnxcc/README
---
Diff: https://github.com/kamailio/kamailio/commit/16a94677a5aeaa499eaf09eab4cd057…
Patch: https://github.com/kamailio/kamailio/commit/16a94677a5aeaa499eaf09eab4cd057…
---
diff --git a/src/modules/cnxcc/README b/src/modules/cnxcc/README
index d2e317de72..425a473f16 100644
--- a/src/modules/cnxcc/README
+++ b/src/modules/cnxcc/README
@@ -188,18 +188,32 @@ 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 of
+ 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.
+ 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:
* 1 - successful
@@ -210,12 +224,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)");
...
Module: kamailio
Branch: 5.3
Commit: fca18567f458fd3860a63ab37a9e7e2fe89f0019
URL: https://github.com/kamailio/kamailio/commit/fca18567f458fd3860a63ab37a9e7e2…
Author: Jose Luis Verdeguer <pepeluxx(a)gmail.com>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-06-05T14:19:48+02:00
cnxcc: updated readme file [skip ci]
(cherry picked from commit cea7fa14b0aefc647d28eb1bf56faaec89d90d67)
---
Modified: src/modules/cnxcc/doc/cnxcc_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/fca18567f458fd3860a63ab37a9e7e2…
Patch: https://github.com/kamailio/kamailio/commit/fca18567f458fd3860a63ab37a9e7e2…
---
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)");
...
Module: kamailio
Branch: 5.3
Commit: a41dcf3259d72dfecf4cd34638d885734dc7a5ea
URL: https://github.com/kamailio/kamailio/commit/a41dcf3259d72dfecf4cd34638d8857…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-06-05T12:31:49+02:00
modules: readme files regenerated - modules ... [skip ci]
---
Modified: src/modules/siptrace/README
---
Diff: https://github.com/kamailio/kamailio/commit/a41dcf3259d72dfecf4cd34638d8857…
Patch: https://github.com/kamailio/kamailio/commit/a41dcf3259d72dfecf4cd34638d8857…
---
diff --git a/src/modules/siptrace/README b/src/modules/siptrace/README
index 5eab39eb23..df5b99f7cc 100644
--- a/src/modules/siptrace/README
+++ b/src/modules/siptrace/README
@@ -472,8 +472,10 @@ modparam("siptrace", "auth_key", "spoihepuirthpeuia")
Store or forward the current processed SIP message/transaction/dialog
in database. It is stored in the form prior applying changes made to
- it. Based on mode, one can trace the current message('m' - default),
- the current transaction('t') or the current dialog('d').
+ it. Based on mode, one can trace the current message('m'), the current
+ transaction('t') or the current dialog('d'). If no mode is given, it
+ falls back to the default mode - transaction tracking when trace_flag
+ is set, otherwise only the current message.
Meaning of the parameters is as follows:
* address - The address in form of SIP URI where to send a duplicate
@@ -564,13 +566,13 @@ kamcmd siptrace.status check
6. Database setup
- Before running Kamailio with siptrace, you have to setup the database
- tables where the module will store the data. For that, if the table
- were not created by the installation script or you choose to install
- everything by yourself you can use the siptrace-create.sql SQL script
- in the database directories in the kamailio/scripts folder as template.
- You can also find the complete database documentation on the project
- webpage,
+ Before running Kamailio with siptrace and activated trace_to_database
+ parameter, you have to setup the database tables where the module will
+ store the data. For that, if the table were not created by the
+ installation script or you choose to install everything by yourself you
+ can use the siptrace-create.sql SQL script in the database directories
+ in the kamailio/scripts folder as template. You can also find the
+ complete database documentation on the project webpage,
https://www.kamailio.org/docs/db-tables/kamailio-db-devel.html.
7. Known issues