Module: kamailio
Branch: master
Commit: eb3a09fb92af939372ac292f14850c13f8232df6
URL: https://github.com/kamailio/kamailio/commit/eb3a09fb92af939372ac292f14850c1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-04-10T10:18:38+02:00
siptrace: docs for trace_db_mode parameter
---
Modified: src/modules/siptrace/doc/siptrace_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/eb3a09fb92af939372ac292f14850c1…
Patch: https://github.com/kamailio/kamailio/commit/eb3a09fb92af939372ac292f14850c1…
---
diff --git a/src/modules/siptrace/doc/siptrace_admin.xml b/src/modules/siptrace/doc/siptrace_admin.xml
index cc6ead1132..56d69cb95b 100644
--- a/src/modules/siptrace/doc/siptrace_admin.xml
+++ b/src/modules/siptrace/doc/siptrace_admin.xml
@@ -427,17 +427,45 @@ modparam("siptrace", "hep_version", 3)
...
modparam("siptrace", "hep_capture_id", 234)
...
+</programlisting>
+ </example>
+ </section>
+ <section id="siptrace.p.trace_db_mode">
+ <title><varname>trace_db_mode</varname> (integer)</title>
+ <para>
+ If set to 1, the module uses <quote>INSERT DELAYED</quote> to
+ store to database (when it is available, otherwise falls back
+ to <quote>INSERT</quote>).
+ </para>
+ <para>
+ If set to 2, the module uses <quote>ASYNC-INSERT</quote> to
+ store to database (when it is available, otherwise falls back
+ to <quote>INSERT</quote>).
+ </para>
+ <para>
+ Default value is <emphasis>0 (use <quote>INSERT</quote>)</emphasis>.
+ </para>
+ <example>
+ <title>Set <varname>trace_db_mode</varname>
+ parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("siptrace", "trace_db_mode", 1)
+...
</programlisting>
</example>
</section>
<section id="siptrace.p.trace_delayed">
<title><varname>trace_delayed</varname> (integer)</title>
+ <para>
+ Kept for backward compatibily, use trace_db_mode instead.
+ </para>
<para>
- Use <quote>INSERT DELAYED</quote> to store to database when it is available,
- instead of <quote>INSERT</quote>.
+ If set to non-zero, ot sets trace_db_mode paremter to 1
+ when the module is initialized.
</para>
<para>
- Default value is <emphasis>0 (off)</emphasis>.
+ Default value is <emphasis>0</emphasis>.
</para>
<example>
<title>Set <varname>trace_delayed</varname>
Hi,
We're getting periodically core dumps when stopping Kamailio:
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /var/lib/ums/sbin/kamailio...done.
[New LWP 9832]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/var/lib/ums/sbin/kamailio -m 2048 -M 12 -P
/var/run/kamailio/kamailio.pid -f /'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007f79c24e842a in __GI_abort () at abort.c:89
#2 0x000000000043f92a in sig_alarm_abort (signo=14) at main.c:679
#3 <signal handler called>
#4 0x00007f79c258f910 in __read_nocancel () at
../sysdeps/unix/syscall-template.S:84
#5 0x00007f793cbd7421 in vio_read_buff () from
/var/lib/ums/lib/mysql/libmysqlclient.so.16
#6 0x00007f793cbd8aa0 in my_real_read () from
/var/lib/ums/lib/mysql/libmysqlclient.so.16
#7 0x00007f793cbd87d6 in my_net_read () from
/var/lib/ums/lib/mysql/libmysqlclient.so.16
#8 0x00007f793cbd085d in cli_safe_read () from
/var/lib/ums/lib/mysql/libmysqlclient.so.16
#9 0x00007f793cbd539a in cli_read_query_result () from
/var/lib/ums/lib/mysql/libmysqlclient.so.16
#10 0x00007f793cbd436d in mysql_real_query () from
/var/lib/ums/lib/mysql/libmysqlclient.so.16
#11 0x00007f793ce80c13 in db_mysql_submit_query (_h=0x7f79c1786890,
_s=0x7f793f379250 <sql_str>) at km_dbase.c:111
#12 0x00007f793f16baba in db_do_submit_query (_h=0x7f79c1786890,
_query=0x7f793f379250 <sql_str>, submit_query=0x7f793ce801a0
<db_mysql_submit_query>) at db_query.c:58
#13 0x00007f793f16e114 in db_do_delete (_h=0x7f79c1786890,
_k=0x7ffeb3ca8df8, _o=0x0, _v=0x7ffeb3ca8dd0, _n=1, val2str=0x7f793cea8990
<db_mysql_val2str>, submit_query=0x7f793ce801a0 <db_mysql_submit_query>) at
db_query.c:300
#14 0x00007f793ce86c17 in db_mysql_delete (_h=0x7f79c1786890,
_k=0x7ffeb3ca8df8, _o=0x0, _v=0x7ffeb3ca8dd0, _n=1) at km_dbase.c:510
#15 0x00007f793f3cb841 in db_delete_ucontact_ruid (_c=0x7f794186b3c0) at
ucontact.c:1552
#16 0x00007f793f3cd096 in db_delete_ucontact (_c=0x7f794186b3c0) at
ucontact.c:1570
#17 0x00007f793f3ad0c0 in wb_timer (_r=0x7f79411d7330) at urecord.c:401
#18 0x00007f793f3ab451 in timer_urecord (_r=0x7f79411d7330) at urecord.c:463
#19 0x00007f793f3978aa in mem_timer_udomain (_d=0x7f7940d9baa0, istart=0,
istep=1) at udomain.c:1224
#20 0x00007f793f3d4608 in synchronize_all_udomains (istart=0, istep=1) at
dlist.c:756
#21 0x00007f793f3a2768 in destroy () at usrloc_mod.c:464
#22 0x0000000000637e2c in destroy_modules () at core/sr_module.c:746
#23 0x000000000041c4d8 in cleanup (show_status=1) at main.c:555
#24 0x0000000000423af7 in shutdown_children (sig=15, show_status=1) at
main.c:696
#25 0x000000000041f081 in handle_sigs () at main.c:727
#26 0x0000000000432a01 in main_loop () at main.c:1806
#27 0x000000000043df6f in main (argc=9, argv=0x7ffeb3cac348) at main.c:2802
Looks like libmysql stucks at __read_nocancel() syscall. The exit_timeout
parameter is set by default (60 sec), Kamailio version 5.3.1.
Any ideas?
Thanks,
Andrey
Module: kamailio
Branch: master
Commit: 430e00a208c9ae4c2cdc39d628fc0a1d23f30f81
URL: https://github.com/kamailio/kamailio/commit/430e00a208c9ae4c2cdc39d628fc0a1…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2020-04-09T09:46:16+02:00
modules: readme files regenerated - dialog ... [skip ci]
---
Modified: src/modules/dialog/README
---
Diff: https://github.com/kamailio/kamailio/commit/430e00a208c9ae4c2cdc39d628fc0a1…
Patch: https://github.com/kamailio/kamailio/commit/430e00a208c9ae4c2cdc39d628fc0a1…
---
diff --git a/src/modules/dialog/README b/src/modules/dialog/README
index cfae6ac338..cb6413f981 100644
--- a/src/modules/dialog/README
+++ b/src/modules/dialog/README
@@ -2237,17 +2237,33 @@ kamcmd dlg.is_alive callid123 fromtag123 totag123
9.16. dlg.briefing
- Lists fewer attributes for dialog records in memory.
+ Lists fewer attributes for dialog records in memory. The dialog hash
+ entry and id are added always, the rest of them are a matter of 'attrs'
+ parameter.
Name: dlg.briefing
Parameters:
- * none - no parameter
+ * attrs - (optional) a list of characters (flags) representing the
+ fields to be added to the response. If is missing, its default
+ value is 'ftcFT' (note the characters are case sensitive).
+ The characters can be:
+ + f - From URI
+ + t - To URI
+ + c - Call-ID
+ + F - From tag
+ + T - To tag
+ + I - Init time
+ + S - Start time
+ + E - End time
+ + s - State
RPC Command Example:
...
kamctl rpc dlg.briefing
...
+kamctl rpc dlg.briefing "ft"
+...
10. Exported Variables
Module: kamailio
Branch: master
Commit: 661fc0193da9e559e22b83b006db3e23345c092c
URL: https://github.com/kamailio/kamailio/commit/661fc0193da9e559e22b83b006db3e2…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2020-04-09T13:48:06+02:00
misc: examples kemi, don't fail if optional modules are not loaded
kamailio-basic-kemi.cfg has some define instructions that can be
removed ( WITH_MYSQL, WITH_AUTH, ...)
So lets make sure that modules are there in the lua script before
using the defined routes.
---
Modified: misc/examples/kemi/kamailio-basic-kemi-lua.lua
---
Diff: https://github.com/kamailio/kamailio/commit/661fc0193da9e559e22b83b006db3e2…
Patch: https://github.com/kamailio/kamailio/commit/661fc0193da9e559e22b83b006db3e2…
---
diff --git a/misc/examples/kemi/kamailio-basic-kemi-lua.lua b/misc/examples/kemi/kamailio-basic-kemi-lua.lua
index 44a09186fd..b28eea0ff1 100644
--- a/misc/examples/kemi/kamailio-basic-kemi-lua.lua
+++ b/misc/examples/kemi/kamailio-basic-kemi-lua.lua
@@ -240,8 +240,11 @@ end
-- IP authorization and user uthentication
function ksr_route_auth()
+ if not KSR.auth then
+ return 1;
+ end
- if not KSR.is_REGISTER() then
+ if KSR.permissions and not KSR.is_REGISTER() then
if KSR.permissions.allow_source_address(1)>0 then
-- source IP allowed
return 1;
@@ -273,6 +276,9 @@ end
-- Caller NAT detection
function ksr_route_natdetect()
+ if not KSR.nathelper then
+ return 1;
+ end
KSR.force_rport();
if KSR.nathelper.nat_uac_test(19)>0 then
if KSR.is_REGISTER() then
@@ -287,6 +293,9 @@ end
-- RTPProxy control
function ksr_route_natmanage()
+ if not KSR.rtpproxy then
+ return 1;
+ end
if KSR.siputils.is_request()>0 then
if KSR.siputils.has_totag()>0 then
if KSR.rr.check_route_param("nat=yes")>0 then
@@ -317,6 +326,9 @@ end
-- URI update for dialog requests
function ksr_route_dlguri()
+ if not KSR.nathelper then
+ return 1;
+ end
if not KSR.isdsturiset() then
KSR.nathelper.handle_ruri_alias();
end