Andrew, I use smth like this for adding header to any response


if (is_method("INVITE")){
        t_relay("mysip", "5060");


failure_route[INV_FAIL] {
        xlog("L_INFO", "failure_route code: $T_reply_code; reason: $T_reply_reason;");
        append_to_reply("MyField: my_field_content\r\n");


2015-12-22 18:33 GMT+03:00 Andrew Pogrebennyk <>:
Hello Efelin,
I stumbled upon the issue you described here. Have you been able to find
a solution? I've tried to play with t_reply(), but no luck so far.


On 11/18/2013 10:00 AM, Efelin Novak wrote:
> Hi,
> I would like to append a header to a 'winning' negative reply in
> failure_route and let the Kamailio do the default action (state fully
> forward the winning reply).
> When I use append_to_reply("Foo: bar\r\n"); and then call exit; in
> failure_route nothing is appended.
> When I use same append_to_reply then t_relay("505","Error"); and exit;
> the header is appended.
> When I use append and t_reply with dialog modul turned on I got a bug
> I'm solving here '[SR-Users] t_reply in failure route with dialog module'.
> So my question is how to put a header into a reply when I don't want to
> alter its code or text?
> I'm using Kamilio 4.0.4 on Debian 7.1
> Thanks for an answer
> Efelin

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

Savolainen Dmitri