[SR-Users] Problem adding json module

Joao Alves Jalves at amdocs.com
Thu Aug 6 14:57:47 CEST 2015


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://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/20150806/8680d7cd/attachment.html>


More information about the sr-users mailing list