[SR-Users] Problem adding json module

Joao Alves Jalves at amdocs.com
Fri Aug 7 16:35:47 CEST 2015


Hi,

Updating... So I just reinstalled the kamailio's debian package (apt-get install kamailio, but not the "kamailio-json-modules" one) and the problem was solved (!).

Could not really understood why -  when I recheck the  libjson-c.so.2 it is still only available on /usr/local/lib.

So maybe there was another linked obj that was only installed by doing this debian package installation.

Thanks,
Joao

From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Joao Alves
Sent: sexta-feira, 7 de Agosto de 2015 14:23
To: miconda at gmail.com; Kamailio (SER) - Users Mailing List; matthew at flowroute.com
Subject: Re: [SR-Users] Problem adding json module

Hi Matthew&Daniel

I've installed json-c 0.11 instead and I don't get any more the initial link problems. However when I start the config file I have now this error:

ERROR: <core> [sr_module.c:574]: load_module(): could not open module </usr/local/lib64/kamailio/modules/json.so>: libjson-c.so.2: cannot open shared object file: No such file or directory 0(25993)

I've double checked and the libjson-c.so.2 file is there (/usr/local/lib).

Any hints of what could be going wrong here? Do I need to copy it to any other directory?

Thanks!
Joao

From: Daniel-Constantin Mierla [mailto:miconda at gmail.com]
Sent: sexta-feira, 7 de Agosto de 2015 07:58
To: Joao Alves; Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Problem adding json module

Hello,

I haven't written the json module, so I don't know the limits of the versions.

Anyhow, what you can do is to look at debian/rpm specs in source tree at pkg/kamailio/..., there should list the dependencies of the json libs with versions.

jansson is using another underlying library, one of its features being support for json-path.

Cheers,
Daniel
On 06/08/15 14:57, Joao Alves wrote:
Hi Daniel,

I've installed the latest release (0.12), but can downgrade if needed.   which version have you integrated with?

About jansson, I was not really aware of it. is it providing improved functionalities compared with json?

Thanks,
Joao

From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla
Sent: quarta-feira, 5 de Agosto de 2015 15:26
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Problem adding json module

Hello,

what is the version of the json library? Maybe they changed the api in a new version.

We have to fix the one for json, but note that you may use jansson module for json handling in config file.

Cheers,
Daniel
On 29/07/15 19:17, Joao Alves wrote:
Hi,

Have just installed the kamailio 4.3 (from github) and was trying to include the additional modules that I require. I've edited the modules.lst and changed the extra modules to  compile "include_modules= db_mysql utils json".

During compilation (using "make all") getting the following warnings in relation with the json module.

CC (gcc) [M json.so]                json_funcs.o
json_funcs.c: In function 'json_get_field':
json_funcs.c:58:2: warning: implicit declaration of function 'is_error' [-Wimplicit-function-declaration]
json_funcs.c:64:2: warning: 'json_object_object_get' is deprecated (declared at /usr/local/include/json-c/json_object.h:303) [-Wdeprecated-declarations]
And later, when running the config file:

ERROR: <core> [sr_module.c:574]: load_module(): could not open module </usr/local/lib64/kamailio/modules/json.so>: libjson-c.so.3: cannot open shared object file: No such file or directory 0(2344) : <core> [cfg.y:3432]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 195, column 12-20: failed to load module ERROR: bad config file (1 errors)

I have already installed json-c modules and confirmed this installation by doing:

root at ID14337:/usr/local/kamailio-4.3/kamailio#<mailto:root at ID14337:/usr/local/kamailio-4.3/kamailio> pkg-config --cflags json-c
-I/usr/local/include/json-c
root at ID14337:/usr/local/kamailio-4.3/kamailio#<mailto:root at ID14337:/usr/local/kamailio-4.3/kamailio> pkg-config --libs json-c
-L/usr/local/lib -ljson-c

root at ID14337:/usr/local/include/json-c# ls
arraylist.h  json.h                    json_inttypes.h                json_object_private.h  linkhash.h
bits.h          json_c_version.h  json_object.h                 json_tokener.h               printbuf.h
debug.h      json_config.h     json_object_iterator.h  json_util.h        random_seed.h
root at ID14337:/usr/local/include/json-c# cd ../../lib
root at ID14337:/usr/local/lib# ls
libjson-c.a  libjson-c.la  libjson-c.so  libjson-c.so.3  libjson-c.so.3.0.0  pkgconfig    python2.6  python2.7
root at ID14337:/usr/local/lib#

So any ideas of what could be causing this to fail?

Thanks
Joao Alves

This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement, you may review at http://www.amdocs.com/email_disclaimer.asp



_______________________________________________

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>

http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



--

Daniel-Constantin Mierla

http://twitter.com/#!/miconda<http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda

Book: SIP Routing With Kamailio - http://www.asipto.com


--

Daniel-Constantin Mierla

http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

Book: SIP Routing With Kamailio - http://www.asipto.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150807/c486dcee/attachment.html>


More information about the sr-users mailing list