hnimminh / libresbc

An open source Session Border Controller šŸŒŸ The SBC you dream about šŸ—½ LibreSBC will help you save thousands of dollars.
https://github.com/hnimminh/libresbc
MIT License
357 stars 80 forks source link

build app_lua #22

Closed khorsmann closed 2 years ago

khorsmann commented 2 years ago

i use the ansible deployment and i follow the docu to configure the sbc via json requests. after setting the access stuff it breaks trying to start kamailio.

/usr/local/etc/kamailio/access_srv09.cfg, error=ERROR: bad config file (4 errors) (parsing code: 1)

root@srv09:~# kamailio -c -f /usr/local/etc/kamailio/access_srv09.cfg
loading modules under config path: /usr/local/lib64/kamailio/modules
 0(12737) ERROR: <core> [core/sr_module.c:504]: ksr_locate_module(): could not find module <app_lua> in </usr/local/lib64/kamailio/modules>
 0(12737) CRITICAL: <core> [core/cfg.y:3683]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/access_srv09.cfg, line 136, column 12-23: failed to load module
 0(12737) ERROR: <core> [core/modparam.c:178]: set_mod_param_regex(): No module matching <app_lua> found
 0(12737) CRITICAL: <core> [core/cfg.y:3686]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/access_srv09.cfg, line 137, column 71: Can't set module parameter
 0(12737) ERROR: <core> [core/modparam.c:178]: set_mod_param_regex(): No module matching <app_lua> found
 0(12737) CRITICAL: <core> [core/cfg.y:3686]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/access_srv09.cfg, line 138, column 71: Can't set module parameter
 0(12737) CRITICAL: <core> [core/cfg.y:3683]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/access_srv09.cfg, line 139, column 11-15: Can't set config routing engine

i build the app_lua.so (it is not there - and why it is build from source?!) - anyhow - here is the fix.

hnimminh commented 2 years ago

thanks @khorsmann, I think that I made a mistake when missing include module, let me take a time to review whole these steps.

khorsmann commented 2 years ago

Hi @hnimminh your Kamailio didn't seem to need compiled if target is Debian x86. Then you can took also the Kamailio Debian repos with latest Kamailio packages.

hnimminh commented 2 years ago

Thank @khorsmann for your suggestion, compiled option provide me the power that not in debian pkg, eg: version, small footprint, debug flag... and as I did not make any test libresbc with debian pkg, so not feel safe to switch. :)