Hi,

Yes I've tried using append_to_reply() in several routes (tm:branch-failure, sl:local-response, tm:local-response, onreply_route, failure_route) but it was not applied.
It works fine if a response is received or if it is generated by the configuration script but not if this response is locally generated by a kamailio module.

Regards,
Frédéric Gaisnon

> Custom headers to the reply can be added using append_to_reply() function from textops module. Have you tried that?
>
> Regards,
>
> Fred Posner
> p: +1 (352) 664-3733

> > On Jan 18, 2024, at 2:07 AM, frédéric Gaisnon via sr-users <sr-users@lists.kamailio.org> wrote:
> >
> > Hello,
> >  I want to add a SIP custom header on a SIP response generated locally (on the 408 generated when fr_inv_timeout is expired for example)
> > I've tried functions append_hf and append_to_reply in event_route[tm:branch-failure:XXX] or event_route [tm:local-response] without any success.
> > Do you have any suggestions to accomplish this ?
> >  Regards,
> > Frédéric Gaisnon