Hi
https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#branch_name_-_...
Assigning $null to uri attribute will drop the branch, for the rest of attributes will just set the value to null.
I fear this does not work within branch_route
if ($var(socket) == 0) { if ($avp(debug) > 0) { xlog("L_INFO", "$cfg(route): $(branch(uri)[$T_branch_idx]) via Socket: $var(socket) is NOT LOCAL to this Registrar - dropping!\n"); } $(branch(uri)[$T_branch_idx]) = $null; }
Result:
* Call is still branched to CPE * $(branch(uri)[$T_branch_idx]) is null on all subsequent branches after the first one.