[sr-dev] Custom kamailio modules

Tyler Moore tmoore at goflyball.com
Fri Apr 24 22:14:18 CEST 2020


Hey devs got a question about loading custom modules.

This is my first kamailio module so if I am missing some gotchas please
refer me to the proper documentation.
I created a shared lib and included the module version info like so:

#define NAME "kamailio"
#define VERSION "5.3"
#define ARCH "x86_64"
#define OS_QUOTED "GNU/Linux"

...


MODULE_VERSION


I tried loading the module in a vanilla kamailio 5.3 install on debian 9
(stretch) and it seems sr_module.c can't find the module version info:

ERROR: <core> [core/sr_module.c:325]: version_control(): no version info in
module </usr/lib/x86_64-linux-gnu/kamailio/modules/dsiprouter.so>:
/usr/lib/x86_64-linux-gnu/kamailio/modules/dsiprouter.so: undefined symbol:
module_version

But MODULE_VERSION should be defining this variable..
Running string on the shared lib shows it is being defined:

> strings lib/dsiprouter.so | grep module_version
module_version
MODULE_VERSION char *module_version=SER_FULL_VERSION; char
*module_flags=SER_COMPILE_FLAGS; unsigned int
module_interface_ver=MODULE_INTERFACE_VER;
module_version


Is this a linking issue? Why does is seem that module_versino is referenced
before being defined when i'm following the example from
https://github.com/kamailio/kamailio/blob/5.1/src/modules/print/print.c ?

Regards,

*Tyler Moore* <https://devopsec.net/>
Full Stack Software Engineer
<http://www.google.com/search?q=full+stack+software+engineer+job+description>
Flyball Labs <http://goflyball.com/>
Office: 888-907-2085, ext: 34 <8889072085;ext=34>
Cell: 248-909-2769 <2489092769>
Email: tmoore at goflyball.com

[image: FLYBALL TECHNICAL SOLUTIONS, LLC]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200424/944d03b8/attachment-0001.html>


More information about the sr-dev mailing list