The documentation indicates that the function: KSR.hdr.append(...) applies to request and reply. https://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/core/#ksrh... KSR.hdr.append(...) int KSR.hdr.append(str "hdrval") Append header to current SIP message (**request or reply**). It will be added after the last header.
And in the trace, the function was processed. 4(260) DEBUG: app_lua [app_lua_api.c:1023]: sr_kemi_lua_exec_func_ex(): param[0] for: append is str: X-My-Hdr: testhdrappend 4(260) DEBUG: <core> [core/kemi.c:2224]: **sr_kemi_hdr_append(): append hf: X-My-Hdr: testhdrappend**