I need to set a custom header in Kamailio 3.3.1 from a Lua script. I can theoretically set one in the config script like this -
append_hf("X-MyHeader: myvalue\r\n");
but I cannot work out how to call it from a Lua script, which is my preferred place to do this from. I have the following in my CFG file -
modparam("app_lua", "load", "/usr/local/etc/kamailio/lua/kamailio.lua")
modparam("app_lua", "register", "sl")
modparam("app_lua", "register", "rr")
modparam("app_lua", "register", "tm")
and my Lua script works fine as far as it goes. Documentation seems to suggest that append_hf() is part of the textops module, but I can see no way to expose that to the Lua script.
Please can anyone help me understand this or maybe suggest an alternative way to achieve my goal?