0

I have a problem starting Kamailio Version 4.3. I installed Kamailio from source, and the modules are stored in the default directory /usr/local/lib64/kamailio/modules. I am using the json module that Kamailio provides but it fails to load.

Kamailio's documentation on the json module is found here: http://www.kamailio.org/docs/modules/3.4.x/modules/json.html

The documentation states that before the module is loaded you need the required library libjson, which I installed. When I start kamailio and cat the log file via kamailio start; cat /var/log/kamailio.log | grep error I am getting the following error:

Jan  8 12:43:53 localhost kamailio: ERROR: <core> [sr_module.c:576]: load_module(): could not open module </usr/local/lib64/kamailio/modules/json.so>:    /usr/local/lib64/kamailio/modules/json.so: undefined symbol: is_error
Jan  8 12:43:53 localhost kamailio: : <core> [cfg.y:3432]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 109, column 12-20: failed to load module

Line 109 is obviously correct:

loadmodule "json.so"

More information:

ldd json.so
linux-vdso.so.1 =>  (0x00007ffc33e97000)
libjson-c.so.2 => /lib64/libjson-c.so.2 (0x00007f24d8110000)
libc.so.6 => /lib64/libc.so.6 (0x00007f24d7d7c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f24d8527000)

Has anyone else experienced a similar issue, or does anyone know a solution? It is also worth mentioning I am running kamailio on CentOS 6.7.

btald1331
  • 537
  • 3
  • 8
  • 23

1 Answers1

0

is_error(p) should be a macro, look inside your json.h file (perhaps at /usr/include/json-c/json.h) and see if it includes "bits.h" from the same folder. Inside bits.h should be defined the macro is_error().

If you don't have that, maybe it is a customized library.

As a side note, an alternative for json operations in kamailio.cfg is using jansson module.

miconda
  • 1,754
  • 11
  • 14