How to use the sql transformation? https://www.kamailio.org/wiki/cookbooks/4.4.x/transformations#sql_transforma... has the following example:
xlog("$$rm = $rm = $(rm{s.sql})");
But adding this to the request_route and starting kamailio will fail:
ERROR: pv [pv_trans.c:2351]: tr_parse_string(): unknown transformation: sql}/sql/3! ERROR: <core> [pvapi.c:1629]: tr_lookup(): error parsing [{s.sql}] ERROR: <core> [pvapi.c:1010]: pv_parse_spec2(): bad tr in pvar name "rm" ERROR: <core> [pvapi.c:1036]: pv_parse_spec2(): invalid parsing in [$(rm{s.sql})] at (4) ERROR: xlog [xlog.c:512]: xdbg_fixup_helper(): wrong format[$$rm = $rm = $(rm{s.sql})] ERROR: <core> [route.c:1154]: fix_actions(): fixing failed (code=-1) at cfg:/etc/kamailio/kamailio.cfg:372
line 372 is the above xlog and sqlops.so is loaded (and works). Anybody got a working example of this? Or an other hint to prevent sql injections when using user supplied variables in sql queries?