sip-serverkamailioopenser

Load new module in Kamailio


I would like to ask, how can I load new module in Kamailio 4.1.2? Actually, I have an issue, when I tried to compile my kamaiio.cfg I've got error:

root@kamailio:/usr/local/# kamailio -c kamailio.cfg
loading modules under /usr/local/lib64/kamailio/modules/
 0(25392) ERROR: <core> [sr_module.c:587]: load_module(): ERROR: load_module: could not find module <websocket> in </usr/local/lib64/kamailio/modules/>
 0(25392) : <core> [cfg.y:3408]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 323, column 12-25: failed to load module
 0(25392) ERROR: <core> [cfg.y:3272]: yyparse(): cfg. parser: failed to find command ws_handle_handshake
 0(25392) : <core> [cfg.y:3411]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 1083, column 27: unknown command, missing loadmodule?

ERROR: bad config file (2 errors)

when I look physically to the /usr/local/lib64/kamailio/modules/ there is some modules, but websocket.so is missing. So, how can I get and load module in Kamailio?

Thank you for help!


Solution

  • You haven't installed the module websocket. Edit modules.lst file in the source code directory and add websocket to include_modules variable. If you don't have modules.lst, just do:

    make cfg
    

    Alternative is to do:

    make cfg include_modules="websocket"
    

    By default, the build system for kamailio compiles and install only the modules that have the same dependencies as the core of the application. For websocket you need to install libunistring and openssl (libssl) devel packages.