Can you give here the parameters you set for app_lua module?
Cheers,
Daniel
On 09.01.18 22:27, jenus(a)cyberchaos.nl wrote:
> Daniel,
>
> Here is the backtrace.
>
> (gdb) backtrace
> #0 0x00007fe41140e067 in __GI_raise (sig=sig@entry=6) at
> ../nptl/sysdeps/unix/sysv/linux/raise.c:56
> #1 0x00007fe41140f448 in __GI_abort () at abort.c:89
> #2 0x00007fe41144c1b4 in __libc_message (do_abort=do_abort@entry=1,
> fmt=fmt@entry=0x7fe411541210 "*** Error in `%s': %s: 0x%s ***\n") at
> ../sysdeps/posix/libc_fatal.c:175
> #3 0x00007fe41145198e in malloc_printerr (action=1,
> str=0x7fe41153d42a "realloc(): invalid next size", ptr=<optimized
> out>) at malloc.c:4996
> #4 0x00007fe41145476b in _int_realloc (av=av@entry=0x7fe41177e620
> <main_arena>, oldp=oldp@entry=0x21789c0, oldsize=oldsize@entry=736,
> nb=nb@entry=1552) at malloc.c:4234
> #5 0x00007fe411455769 in __GI___libc_realloc (oldmem=0x21789d0,
> bytes=1536) at malloc.c:3029
> #6 0x00007fe40c460cae in ?? () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #7 0x00007fe40c45c9aa in ?? () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #8 0x00007fe40c46166d in ?? () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #9 0x00007fe40c4640b3 in ?? () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #10 0x00007fe40c45ccd1 in ?? () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #11 0x00007fe40c45c92e in ?? () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #12 0x00007fe40c45d7bb in ?? () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #13 0x00007fe40c45d8c2 in ?? () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #14 0x00007fe40c459528 in lua_load () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #15 0x00007fe40c469d8c in luaL_loadbuffer () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #16 0x00007fe40c6fe7d7 in lua_sr_init_probe () at app_lua_api.c:228
> #17 0x00007fe40c68a97d in child_init (rank=-127) at app_lua_mod.c:197
> #18 0x0000000000549944 in init_mod_child (m=0x7fe410c3b998, rank=-127)
> at core/sr_module.c:938
> #19 0x0000000000549662 in init_mod_child (m=0x7fe410c3bec0, rank=-127)
> at core/sr_module.c:935
> #20 0x0000000000549662 in init_mod_child (m=0x7fe410c3c708, rank=-127)
> at core/sr_module.c:935
> #21 0x0000000000549662 in init_mod_child (m=0x7fe410c3cd78, rank=-127)
> at core/sr_module.c:935
> #22 0x0000000000549662 in init_mod_child (m=0x7fe410c3d360, rank=-127)
> at core/sr_module.c:935
> #23 0x0000000000549662 in init_mod_child (m=0x7fe410c3e1e8, rank=-127)
> at core/sr_module.c:935
> #24 0x0000000000549662 in init_mod_child (m=0x7fe410c3e938, rank=-127)
> at core/sr_module.c:935
> #25 0x0000000000549662 in init_mod_child (m=0x7fe410c3f4c8, rank=-127)
> at core/sr_module.c:935
> #26 0x0000000000549662 in init_mod_child (m=0x7fe410c3fca0, rank=-127)
> at core/sr_module.c:935
> #27 0x0000000000549662 in init_mod_child (m=0x7fe410c40118, rank=-127)
> at core/sr_module.c:935
> #28 0x0000000000549662 in init_mod_child (m=0x7fe410c40780, rank=-127)
> at core/sr_module.c:935
> #29 0x0000000000549662 in init_mod_child (m=0x7fe410c422f8, rank=-127)
> at core/sr_module.c:935
> #30 0x0000000000549662 in init_mod_child (m=0x7fe410c42968, rank=-127)
> at core/sr_module.c:935
> #31 0x0000000000549662 in init_mod_child (m=0x7fe410c42e50, rank=-127)
> at core/sr_module.c:935
> #32 0x0000000000549662 in init_mod_child (m=0x7fe410c43b48, rank=-127)
> at core/sr_module.c:935
> #33 0x0000000000549662 in init_mod_child (m=0x7fe410c43f20, rank=-127)
> at core/sr_module.c:935
> #34 0x0000000000549662 in init_mod_child (m=0x7fe410c446e0, rank=-127)
> at core/sr_module.c:935
> #35 0x0000000000549662 in init_mod_child (m=0x7fe410c44bd0, rank=-127)
> at core/sr_module.c:935
> #36 0x0000000000549662 in init_mod_child (m=0x7fe410c44ec8, rank=-127)
> at core/sr_module.c:935
> #37 0x0000000000549662 in init_mod_child (m=0x7fe410c45378, rank=-127)
> at core/sr_module.c:935
> #38 0x0000000000549662 in init_mod_child (m=0x7fe410c458f0, rank=-127)
> at core/sr_module.c:935
> #39 0x0000000000549662 in init_mod_child (m=0x7fe410c45e48, rank=-127)
> at core/sr_module.c:935
> #40 0x0000000000549662 in init_mod_child (m=0x7fe410c464e8, rank=-127)
> at core/sr_module.c:935
> #41 0x0000000000549662 in init_mod_child (m=0x7fe410c47278, rank=-127)
> at core/sr_module.c:935
> #42 0x0000000000549662 in init_mod_child (m=0x7fe410c476f0, rank=-127)
> at core/sr_module.c:935
> #43 0x0000000000549662 in init_mod_child (m=0x7fe410c47b68, rank=-127)
> at core/sr_module.c:935
> #44 0x0000000000549c72 in init_child (rank=-127) at core/sr_module.c:964
> #45 0x0000000000422c1c in main_loop () at main.c:1576
> #46 0x000000000042aab9 in main (argc=3, argv=0x7ffe17f0e788) at
> main.c:2646
>
>
> Jan
>
> Daniel-Constantin Mierla schreef op 2018-01-09 22:21:
>> Can you install the debug symbols for kamailio as well? There should be
>> a kamailio-dbg package or so ...
>>
>> Then take again the backtrace, it should provide more information --
>> file and line for each frame, ...
>>
>> Cheers,
>> Daniel
>>
>>
>> On 09.01.18 21:21, jenus(a)cyberchaos.nl wrote:
>>> Daniel,
>>>
>>> Just upgraded to 5.1 but kamailio now generates a core file. I'm
>>> running debian 8.10. It seems to crash on liblua5.1.so.0 :
>>>
>>> Using host libthread_db library
>>> "/lib/x86_64-linux-gnu/libthread_db.so.1".
>>> Core was generated by `kamailio -m 1500'.
>>> Program terminated with signal SIGSEGV, Segmentation fault.
>>> #0 0x00007f30c17f25a0 in ?? () from
>>> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
>>> (gdb) backtrace
>>> #0 0x00007f30c17f25a0 in ?? () from
>>> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
>>> #1 0x00007f30c17f3b62 in ?? () from
>>> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
>>> #2 0x00007f30c17e6040 in lua_settable () from
>>> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
>>> #3 0x00007f30c17f6412 in luaL_findtable () from
>>> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
>>> #4 0x00007f30c17f6581 in luaL_openlib () from
>>> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
>>> #5 0x00007f30c1a40870 in lua_sr_kemi_register_libs () from
>>> /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so
>>> #6 0x00007f30c1a8b107 in lua_sr_openlibs () from
>>> /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so
>>> #7 0x00007f30c1a8b7c1 in lua_sr_init_probe () from
>>> /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so
>>> #8 0x00007f30c1a1797d in ?? () from
>>> /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so
>>> #9 0x0000000000549944 in ?? ()
>>> #10 0x0000000000549c72 in init_child ()
>>> #11 0x0000000000421498 in main_loop ()
>>> #12 0x000000000042aab9 in main ()
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Jan
>>>
>>> jenus(a)cyberchaos.nl schreef op 2018-01-09 20:53:
>>>> Daniel,
>>>>
>>>> Currently running kamailio 5.0.5.
>>>>
>>>> Jan
>>>>
>>>> Daniel-Constantin Mierla schreef op 2018-01-09 13:27:
>>>>> Hello,
>>>>>
>>>>> what version of kamailio are you using?
>>>>>
>>>>> Cheers,
>>>>> Daniel
>>>>>
>>>>>
>>>>> On 07.01.18 22:14, jenus(a)cyberchaos.nl wrote:
>>>>>> Hello,
>>>>>>
>>>>>> I'm doing some tests with a lua script and app_lua. I'm using
>>>>>> sr.sqlops.query to insert records into the database but would
>>>>>> like to
>>>>>> test the exit status of the sql query. In kamailio i can do:
>>>>>>
>>>>>> if(!sql_query("kamailio", "INSERT INTO subscriber ..."))
>>>>>>
>>>>>> Is there some kind of exit status for the lua function
>>>>>> sr.sqlops.query
>>>>>> in order to do the same check in lua? In other words, is it possible
>>>>>> to check if a sql query was successful in lua? The result seems
>>>>>> to be
>>>>>> nill in all cases for a INSERT in lua using sr.sqlops.query.
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Jan Hazenberg
>>>>>>
>>>>>> _______________________________________________
>>>>>> Kamailio (SER) - Users Mailing List
>>>>>> sr-users(a)lists.kamailio.org
>>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>>
>>>> _______________________________________________
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users(a)lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
Can you install the debug symbols for kamailio as well? There should be
a kamailio-dbg package or so ...
Then take again the backtrace, it should provide more information --
file and line for each frame, ...
Cheers,
Daniel
On 09.01.18 21:21, jenus(a)cyberchaos.nl wrote:
> Daniel,
>
> Just upgraded to 5.1 but kamailio now generates a core file. I'm
> running debian 8.10. It seems to crash on liblua5.1.so.0 :
>
> Using host libthread_db library
> "/lib/x86_64-linux-gnu/libthread_db.so.1".
> Core was generated by `kamailio -m 1500'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0 0x00007f30c17f25a0 in ?? () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> (gdb) backtrace
> #0 0x00007f30c17f25a0 in ?? () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #1 0x00007f30c17f3b62 in ?? () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #2 0x00007f30c17e6040 in lua_settable () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #3 0x00007f30c17f6412 in luaL_findtable () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #4 0x00007f30c17f6581 in luaL_openlib () from
> /usr/lib/x86_64-linux-gnu/liblua5.1.so.0
> #5 0x00007f30c1a40870 in lua_sr_kemi_register_libs () from
> /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so
> #6 0x00007f30c1a8b107 in lua_sr_openlibs () from
> /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so
> #7 0x00007f30c1a8b7c1 in lua_sr_init_probe () from
> /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so
> #8 0x00007f30c1a1797d in ?? () from
> /usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so
> #9 0x0000000000549944 in ?? ()
> #10 0x0000000000549c72 in init_child ()
> #11 0x0000000000421498 in main_loop ()
> #12 0x000000000042aab9 in main ()
>
>
>
> Thanks,
>
> Jan
>
> jenus(a)cyberchaos.nl schreef op 2018-01-09 20:53:
>> Daniel,
>>
>> Currently running kamailio 5.0.5.
>>
>> Jan
>>
>> Daniel-Constantin Mierla schreef op 2018-01-09 13:27:
>>> Hello,
>>>
>>> what version of kamailio are you using?
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 07.01.18 22:14, jenus(a)cyberchaos.nl wrote:
>>>> Hello,
>>>>
>>>> I'm doing some tests with a lua script and app_lua. I'm using
>>>> sr.sqlops.query to insert records into the database but would like to
>>>> test the exit status of the sql query. In kamailio i can do:
>>>>
>>>> if(!sql_query("kamailio", "INSERT INTO subscriber ..."))
>>>>
>>>> Is there some kind of exit status for the lua function sr.sqlops.query
>>>> in order to do the same check in lua? In other words, is it possible
>>>> to check if a sql query was successful in lua? The result seems to be
>>>> nill in all cases for a INSERT in lua using sr.sqlops.query.
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Jan Hazenberg
>>>>
>>>> _______________________________________________
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users(a)lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users(a)lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
Hello,
I needed to know in order to suggest use of "KSR" package or not,
instead of "sr". The "sr" package likely to be obsoleted soon, as KSR
has lot more exported functions and it is part of the kemi framework. See:
http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/modules/#s…
However, 5.0 doesn't have so many KSR exports as 5.1, and not sure if
KSR has the sqlops exports in that version -- too late to check more in
the code now...
Looking at the code, sr.sqlops.query() should return -1 in case of error
and 0 if ok.
Cheers,
Daniel
On 09.01.18 20:53, jenus(a)cyberchaos.nl wrote:
> Daniel,
>
> Currently running kamailio 5.0.5.
>
> Jan
>
> Daniel-Constantin Mierla schreef op 2018-01-09 13:27:
>> Hello,
>>
>> what version of kamailio are you using?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 07.01.18 22:14, jenus(a)cyberchaos.nl wrote:
>>> Hello,
>>>
>>> I'm doing some tests with a lua script and app_lua. I'm using
>>> sr.sqlops.query to insert records into the database but would like to
>>> test the exit status of the sql query. In kamailio i can do:
>>>
>>> if(!sql_query("kamailio", "INSERT INTO subscriber ..."))
>>>
>>> Is there some kind of exit status for the lua function sr.sqlops.query
>>> in order to do the same check in lua? In other words, is it possible
>>> to check if a sql query was successful in lua? The result seems to be
>>> nill in all cases for a INSERT in lua using sr.sqlops.query.
>>>
>>>
>>> Thanks,
>>>
>>> Jan Hazenberg
>>>
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users(a)lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
Hello,
I'm doing some tests with a lua script and app_lua. I'm using
sr.sqlops.query to insert records into the database but would like to
test the exit status of the sql query. In kamailio i can do:
if(!sql_query("kamailio", "INSERT INTO subscriber ..."))
Is there some kind of exit status for the lua function sr.sqlops.query
in order to do the same check in lua? In other words, is it possible to
check if a sql query was successful in lua? The result seems to be nill
in all cases for a INSERT in lua using sr.sqlops.query.
Thanks,
Jan Hazenberg
Hello
I am using kamailio 5.0.2, on a debian 9 system.
Everything was running fine, until one of our voip provider changed his
switch. Our kamailio is relaying between several voip providers and several
asterisk (only the signalisation, no rtp).
When we get an invite from this new switch, we select an asterisk and relay
it correctly to this box. However, the OK is relayed back. But when the
voip providers sends an ACK for this OK, the t_relay function does not
return at all, it just dies with no action and no error.
Here is the snippet from route(relay)
xlog("L_INFO","route(relay) @@ $rm - Source: $si:$sp, fu:$fu,
tu:$tu\n" );
$var(restrelay)=t_relay();
xlog("L_INFO","route(relay) @@ $rm - t_relay result:
$var(restrelay)" );
if (!$var(restrelay)) {
When processing the initial invite, I do get both INFO messages. When the
ACK is processed, I only get one INFO message, and no ACK is relayed - so
it seems execution dies in the t_relay
What could be wrong ???
J.
Details of the ACK:
ACK sip:dialednumber@kamailioIP:5060 SIP/2.0
Via: SIP/2.0/UDP VOIPPROVIDERIP:5060;branch=z9hG4bKjq16fi00d85uee181ic0.1
To: <sip:kamailioIP:5060>;tag=as7f10ed48
From: <sip:sourcenumber@orange-multimedia.fr
>;tag=SD8u3ob01-7dd8efde-0002-00d5-0000-0000
Call-ID: SD8u3ob01-688d41f5e2164ceeafe76f40b82b3f97-v300g00030
CSeq: 1 ACK
Max-Forwards: 66
Content-Length: 0
Route:
<sip:kamailioIP;lr=on;ftag=SD8u3ob01-7dd8efde-0002-00d5-0000-0000;did=a0b.49d>
(should you have enough width; the diagram will look ok)
VOIP PROVIDER KAMAILIO
ASTERISK
21:38:54.685149 │ ──────────────────────────> │
│
▒ +0.000451 │ 100 trying -- your call is │
│
▒ 21:38:54.685600 │ <────────────────────────── │
│
▒ +0.000084 │ │ INVITE (SDP)
│
▒ 21:38:54.685684 │ │
──────────────────────────> │
▒ +0.000831 │ │ 100 Trying
│
▒ 21:38:54.686515 │ │
<────────────────────────── │
▒ +0.000471 │ │ 200 OK (SDP)
│
▒ 21:38:54.686986 │ │
<────────────────────────── │
▒ +0.000394 │ 200 OK (SDP) │
│
▒ 21:38:54.687380 │ <────────────────────────── │
│
▒ +0.038694 │ ACK │
│
▒ 21:38:54.726074 │ ──────────────────────────> │
│
▒ +0.060155 │ │ 200 OK (SDP)
│
▒ 21:38:54.786229 │ │
<<<──────────────────────── │
▒ +0.000138 │ 200 OK (SDP) │
│
▒ 21:38:54.786367 │ <<<──────────────────────── │
│
▒ +0.005721 │ ACK │
│
Hi,
I'm looking to use kamailio as a webrtc proxy for legacy sip system that
doesnt have this capability, is there a example or blueprint i can
follow to get started with this? I'm RTFMing the docs but still
need a while to understand kamailio internals :-)
Hi Daniel & K-Team,
I setup kamailio 5.0.5 from git on vanilla Debian GNU/Linux 8.3 (jessie)
# kamailio -v
version: kamailio 5.0.5 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC,
TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT,
USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST,
HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 16:53:42 Jan 5 2018 with gcc 4.9.2
Installed mongodb from debian repo
# dpkg -l | grep mongodb
ii mongodb 1:3.2.17-1 amd64
object/document-oriented database (metapackage)
ii mongodb-clients 1:3.2.17-1 amd64
object/document-oriented database (client apps)
ii mongodb-dev 1:2.4.10-5+deb8u1 amd64
object/document-oriented database (development)
ii mongodb-server 1:3.2.17-1 amd64
object/document-oriented database (server package)
# mongo --version
MongoDB shell version: 3.2.17
Will try sometime with mongodb latest version 3.6 as well as I will get
time.
Installed libmongoc driver through sid repo "deb
http://ftp.de.debian.org/debian sid main"
# dpkg -l | grep libmongoc
ii libmongoc-1.0-0 1.9.0+dfsg-1
amd64 MongoDB C client library - runtime files
ii libmongoc-dev 1.9.0+dfsg-1
amd64 MongoDB C client library - dev files
Kamailio compiled with
# make cfg include_modules="utils app_lua json evapi db_mongodb ndb_mongodb"
Created version collection in mongodb
# cat /usr/local/src/kamailio/utils/kamctl/mongodb/kamailio/version-create.mongo
| mongo
Setup kamailio.cfg as per https://telerain.com/kamailio
This time kamailio started successfully without any crash :)
---------
Now its time to use mongodb for kamailio backend database.
Used default kamailio configuration and defined mongodb connection as
#!define DBURL "mongodb://localhost/kamailio"
I enabled WITH_USRLOCDB [#!define WITH_USRLOCDB], kamailio refuse to start
with errors.
Jan 5 19:16:05 kmaongo kamailio: CRITICAL: <core> [core/cfg.y:3411]:
yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg,
line 365, column 30-34: syntax error
Jan 5 19:16:05 kmaongo kamailio: CRITICAL: <core> [core/cfg.y:3411]:
yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg,
line 365, column 30-34: Invalid arguments
Jan 5 19:16:05 kmaongo kamailio: CRITICAL: <core> [core/cfg.y:3414]:
yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg,
line 365, column 35:
Jan 5 19:16:05 kmaongo kamailio[28067]: ERROR: bad config file (3 errors)
Jan 5 19:16:05 kmaongo kamailio: WARNING: <core> [core/ppcfg.c:221]:
pp_ifdef_level_check(): different number of preprocessor directives:
N(#!IF[N]DEF) - N(#!ENDIF) = 1
Jan 5 19:16:05 kmaongo kamailio: INFO: <core> [core/sctp_core.c:53]:
sctp_core_destroy(): SCTP API not initialized
Jan 5 19:16:05 kmaongo systemd[1]: kamailio.service: control process
exited, code=exited status=255
[FAILJan 5 19:16:05 kmaongo systemd[1]: Failed to start Kamailio (OpenSER)
- the Open Source SIP Server.
Jan 5 19:16:05 kmaongo systemd[1]: Unit kamailio.service entered failed
state.
failed!
Default userloc params in kamailio.cfg states line 365 as
# ----- usrloc params -----
/* enable DB persistency for location entries */
#!ifdef WITH_USRLOCDB
modparam("usrloc", "db_url", DBURL) [ << line 365 ]
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "use_domain", MULTIDOMAIN)
modparam("usrloc", "db_insert_null", 1)
#!endif
I created location collection as well but it didn't help.
I experienced same error when I enable WITH_ACCDB or any other section that
use DBURL.
1. Whats the syntax error here?
2. Is there any special configuration required to work with mongodb?
3. How can we create collections using 'kamdbctl create' ?
What else should I share for resolving the issue?
--
regards,
abdul basit
On 4 January 2018 at 12:50, Abdul Basit <basit.engg(a)gmail.com> wrote:
> Hi Daniel,
>
> Thank you for your reply.
>
> I tested libmongoc with debian package available with repo. Then I moved
> to compile from source. result was same.
>
> But i will try it again with fresh installation and will post here.
>
> --
> regards,
>
> abdul basit
>
> On 2 January 2018 at 16:38, Daniel-Constantin Mierla <miconda(a)gmail.com>
> wrote:
>
>> Hello,
>>
>> the issue happens inside mongoc library. Have you tried with the default
>> one from Debian, without compiling it from sources?
>>
>> Cheers,
>> Daniel
>>
>> On 01.01.18 16:51, Abdul Basit wrote:
>>
>> Hi,
>>
>> My last email was help for admin review.
>>
>> Sharing logs through pastebin https://pastebin.com/6HhdYLJK
>>
>> Interesting part will start from line 983 where it start initializing
>> ndb_mongodb.
>>
>>
>>
>> On 1 January 2018 at 20:32, Abdul Basit <basit.engg(a)gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I enabled but kamailio didn't generate any dump file
>>> To enable code dump followed https://www.kamailio.org/dokuw
>>> iki/doku.php/troubleshooting:corefiles
>>>
>>> I also un-commented lines in /etc/init.d/kamailio script
>>>
>>> if test "$DUMP_CORE" = "yes" ; then
>>> # set proper ulimit
>>> ulimit -c unlimited
>>>
>>> # directory for the core dump files
>>> COREDIR=/tmp/corefiles
>>> [ -d $COREDIR ] || mkdir -p $COREDIR
>>> chmod 777 $COREDIR
>>> echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern
>>> fi
>>>
>>>
>>> I think reason is that kamailio process didn't exit after crash and keep
>>> on restarting. each time with new PID.
>>>
>>> However, debug file is attached. I hope this will help.
>>> --
>>> regards,
>>>
>>> abdul basit
>>>
>>> On 29 December 2017 at 20:11, M S <shaheryarkh(a)gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> Enable core dump and provide backtrace of sigfault. See this for more
>>>> info,
>>>>
>>>> https://sourceware.org/gdb/onlinedocs/gdb/Backtrace.html
>>>>
>>>> Thank you.
>>>>
>>>> On Fri, Dec 29, 2017 at 12:25 PM, Abdul Basit <basit.engg(a)gmail.com>
>>>> wrote:
>>>>
>>>>> Adding further from https://stackoverflow.com/ques
>>>>> tions/2549214/interpreting-segfault-messages
>>>>>
>>>>> error 6 means, fault is
>>>>>
>>>>> * bit 2 == 1 means kernel, 1 means user-mode
>>>>> * bit 4 == 1 means fault was an instruction fetch
>>>>>
>>>>>
>>>>> That looks like kamailio is trying to invoke for db connection where
>>>>> libmongo-c don't like to be.
>>>>> --
>>>>> regards,
>>>>>
>>>>> abdul basit
>>>>>
>>>>> On 29 December 2017 at 15:39, Abdul Basit <basit.engg(a)gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am trying to setup mongo db as database engine for kamailio as
>>>>>> described at
>>>>>> <http://www.kamailio.org/wiki/tutorials/kamailio-and-mongodb>
>>>>>> http://www.kamailio.org/wiki/tutorials/kamailio-and-mongodb
>>>>>> and
>>>>>> https://telerain.com/kamailio
>>>>>>
>>>>>> OS: Debian GNU/Linux 8.10 (jessie)
>>>>>> MongoDB server version: 3.4.10
>>>>>> mongo-c-driver-1.9.0.tar.gz compiled with
>>>>>> ./configure --disable-static --disable-silent-rules
>>>>>> --enable-debug-symbols --enable-ssl=no --enable-sasl=yes
>>>>>> --with-libbson=bundled --enable-optimizations --disable-automatic-init-and-c
>>>>>> leanup
>>>>>>
>>>>>> version: kamailio 5.0.4 (x86_64/linux)
>>>>>> flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
>>>>>> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
>>>>>> Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
>>>>>> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
>>>>>> USE_DST_BLACKLIST, HAVE_RESOLV_RES
>>>>>> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
>>>>>> MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
>>>>>> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>>>>>> id: unknown
>>>>>> compiled on 20:45:44 Dec 27 2017 with gcc 4.9.2
>>>>>>
>>>>>> include_modules= utils app_lua db_postgres json evapi db_mongodb
>>>>>> ndb_mongodb
>>>>>>
>>>>>> Kamailio is crashing with segfault as soon as it try to load
>>>>>> libmongo-c
>>>>>>
>>>>>> Dec 28 04:44:14 sipserver systemd[1]: Starting Kamailio (OpenSER) -
>>>>>> the Open Source SIP Server...
>>>>>> Dec 28 04:44:14 sipserver kamailio: INFO: <core>
>>>>>> [core/sctp_core.c:75]: sctp_core_check_support(): SCTP API not enabled - if
>>>>>> you want to use it, load sctp module
>>>>>> Dec 28 04:44:14 sipserver kamailio: INFO: <core>
>>>>>> [core/tcp_main.c:4671]: init_tcp(): using epoll_lt as the io watch method
>>>>>> (auto detected)
>>>>>> Dec 28 04:44:14 sipserver kamailio[11685]: Listening on
>>>>>> Dec 28 04:44:14 sipserver kamailio[11685]: udp: 127.0.0.1:5060
>>>>>> Dec 28 04:44:14 sipserver kamailio[11685]: udp: 192.168.10.20:5060
>>>>>> Dec 28 04:44:14 sipserver kamailio[11685]: tcp: 127.0.0.1:5060
>>>>>> Dec 28 04:44:14 sipserver kamailio[11685]: tcp: 192.168.10.20:5060
>>>>>> Dec 28 04:44:14 sipserver kamailio[11685]: Aliases:
>>>>>> Dec 28 04:44:14 sipserver kamailio[11685]: tcp: localhost:5060
>>>>>> Dec 28 04:44:14 sipserver kamailio[11685]: udp: localhost:5060
>>>>>> Dec 28 04:44:14 sipserver /usr/local/sbin/kamailio[11687]: INFO: rr
>>>>>> [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe
>>>>>> module is not loaded
>>>>>> .....
>>>>>> Dec 28 04:44:14 sipserver /usr/local/sbin/kamailio[11687]: INFO:
>>>>>> <core> [core/udp_server.c:203]: probe_max_receive_buffer(): SO_RCVBUF is
>>>>>> finally 425984
>>>>>> Dec 28 04:44:14 sipserver systemd[1]: Started Kamailio (OpenSER) -
>>>>>> the Open Source SIP Server.
>>>>>> Dec 28 04:44:14 sipserver kernel: [53109.390171] show_signal_msg: 20
>>>>>> callbacks suppressed
>>>>>> Dec 28 04:44:14 sipserver kernel: [53109.390176] kamailio[11696]
>>>>>> segfault at 78 ip 00007f690c0e6e98 sp 00007ffcde1a4770 error 6 in
>>>>>> libmongoc-1.0.so.0.0.0[7f690c0ca000+6e000]
>>>>>> Dec 28 04:44:14 sipserver kernel: [53109.390753] kamailio[11694]
>>>>>> segfault at 78 ip 00007f690c0e6e98 sp 00007ffcde1a4770 error 6 in
>>>>>> libmongoc-1.0.so.0.0.0[7f690c0ca000+6e000]
>>>>>> Dec 28 04:44:14 sipserver kernel: [53109.393147] kamailio[11699]
>>>>>> segfault at 38 ip 00007f690c0e6e98 sp 00007ffcde1a4770 error 6 in
>>>>>> libmongoc-1.0.so.0.0.0[7f690c0ca000+6e000]
>>>>>> Dec 28 04:44:14 sipserver /usr/local/sbin/kamailio[11687]: ALERT:
>>>>>> <core> [main.c:743]: handle_sigs(): child process 11689 exited by a signal
>>>>>> 11
>>>>>> Dec 28 04:44:14 sipserver /usr/local/sbin/kamailio[11687]: ALERT:
>>>>>> <core> [main.c:746]: handle_sigs(): core was not generated
>>>>>> Dec 28 04:44:14 sipserver /usr/local/sbin/kamailio[11687]: ALERT:
>>>>>> <core> [main.c:743]: handle_sigs(): child process 11688 exited by a signal
>>>>>> 11
>>>>>> .......
>>>>>> Dec 28 04:44:14 sipserver systemd[1]: kamailio.service: main process
>>>>>> exited, code=exited, status=1/FAILURE
>>>>>> Dec 28 04:44:14 sipserver systemd[1]: Unit kamailio.service entered
>>>>>> failed state.
>>>>>>
>>>>>>
>>>>>> As I tried googling the issue and found few issues with tls
>>>>>> connection.
>>>>>> I set in default kamailio.cfg but still facing the saem issue.
>>>>>>
>>>>>> enable_tls=no
>>>>>> ...
>>>>>> loadmodule "ndb_mongodb.so"
>>>>>> modparam("ndb_mongodb", "server", "name=cgr91rc8;uri='mongodb://
>>>>>> localhost/kamailio'")
>>>>>>
>>>>>> Its mongodb default installation and its accessible without any auth
>>>>>> yet.
>>>>>>
>>>>>> Please suggest the way farward.
>>>>>>
>>>>>> --
>>>>>> regards,
>>>>>>
>>>>>> abdul basit
>>>>>>
>>>>>
A few question;
Firstly
With mod acc and acc_cdr i see the default fields logged is only start_time, end_time, duration.
This is an actual entry logged.
start_time, end_time, duration
1515353126, 1515353135, 9.660000
Why is the duration 9.660000?
It seems wrong because it is more then the difference in time
1515353135 - 1515353126 = 9
Secondly
What is a reliable way to capture and log start time, answer time, and end time.
How do I get the duration info. a) start time to end time. b) answer to end time.
Is there an built in variable that store this info?
Thirdly
dialog events listed as:
event_route[dialog:start]
event_route[dialog:end]
event_route[dialog:failed]
There does not seems to be a event for answer so then how to be notified when a dialog is answered?
Regards
Hi,
*I consistently receive the following 3 errors (see below) over and over
when a call is being collected.*
ERROR: <core> [core/parser/parse_fline.c:257]: parse_first_line():
parse_first_line: bad message (offset: 22)
ERROR: <core> [core/parser/msg_parser.c:671]: parse_msg(): ERROR:
parse_msg: message=<HTTP/1.1 101 Switching Protocols#015#012Sia:
SIP/2.0/TLS x.x.x.x:42173#015#012Sec-WebSocket-Protocol:
sip#015#012Upgrade: websocket#015#012Connection:
upgrade#015#012Sec-WebSocket-Accept:
qrLTSNMA7oAO8YXGaUhf3Ru26X0=#015#012Content-Length: 0#015#012#015#012>
Any assistance would be appreciated.
Thank you.
--
Regards,
Suresh Talasaniya.
Contact : +91-9724264776
Skype : suresh.talsaniya
Hello,
anyone here familiar with codetriage service? We got a pull request to
refer to it from Kamailio readme.md file:
- https://github.com/kamailio/kamailio/pull/1389
The link is to:
- https://www.codetriage.com/kamailio/kamailio
Which I guess is created by the one who did the pull request.
The pull request comments has few references to other projects,
including Rails, but as I am not familiar with the service, I thought of
asking here and see if others had to deal with and what's the experience.
Cheers,
Daniel
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - March 5-7, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com