On 10 Oct 2023, at 10:17, Barry Flanagan via sr-users sr-users@lists.kamailio.org wrote:
On 10/10/2023 15:09, Ben Kaufman wrote:
Would this work: use append_branch() in the request_route, then in your failure route:
$var(temp_ru) = $ru; t_next_contacts(); $du = $ru; $ru = $var(temp_ru);
Unfortunately not, because the $du next hop can be different for each branch, but $ru can be the same.
Gives me an idea though - perhaps when I call append_branch I can add a tag to the $ru like ';nexthop=XXX.XXX.XXX.XXX:PPPP' and then extract that in my failure route.
This is good if $du is the _only_ branch-specific attribute you need to change besides R-URI, but would be poor solution if you need support for arbitrary, shifting parameters. Most call routing systems eventually evolve such.
-- Alex