If I understand your scenario correctly, this is expected and documented behaviour: "Note that whenever failure_route is entered, uri is reset to value which it had on relaying." https://www.kamailio.org/docs/modules/devel/modules/tm.html#tm.f.t_on_failur...