yes this module I developed for kamailio 1.5.0 but now I'm migrating to kamailio 3.1.2... why I have include in my Makefile "DEFS+=-DOPENSER_MOD_INTERFACE" and not "DEFS+= -DKAMAILIO_MOD_INTERFACE"? I want compile the kamailio, not ser.
Regards.
2011/5/24 Daniel-Constantin Mierla <miconda@gmail.com>
Hello,starting with v3.0, there are internal libraries that you have to link your module against.
On 5/24/11 8:41 PM, Bruno Bresciani wrote:
Hi,
Someone know tell me why kamailio generate the following error when I try load the route.so module:
May 24 10:21:43 sswpst00 kamailio: ERROR: <core> [sr_module.c:523]: ERROR: load_module: could not open module </home2/local/kamailio/lib/kamailio/modules/route.so>: /home2/local/kamailio/lib/kamailio/modules/route.so: undefined symbol: db_use_table
I don't know why this error have been generate. I'm porting this module to use with kamailio 3.1.2.
Since your module uses connection to database, you need to link against lib srdb1. Probably you need also lib kcore if your module was developed for kamailio 1.x.
What you need to do is to list the libraries in Makefile of the module, in SER_LIBS variable. See modules_k/msilo/Makefile for some example that might fit your module dependencies as well.
Very likely you should have in Makefile the line:
DEFS+=-DOPENSER_MOD_INTERFACE
Be careful if you export MI commands and statistics, even if the attributes are in module exports structure, you have to register them in mod_init function (see msilo and dispatcher modules for some examples).
Cheers,
Daniel
--
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda
-- Daniel-Constantin Mierla -- http://www.asipto.com http://linkedin.com/in/miconda -- http://twitter.com/miconda