It's in the example I-CSCF config:
---
failure_route[register_failure] { if (t_branch_timeout() || t_check_status("([5-6][0-9][0-9])")){ if (I_scscf_select("1")) { t_on_reply("register_reply"); t_on_failure("register_failure"); if (!t_relay()) { t_reply("500","Error forwarding towards next S-CSCF"); break; } break; } else { t_reply("500", "Server error on UAR select next S-CSCF"); break; } } else { if (!t_check_status("(401)")){ xlog("L_DBG", "dropping scscf list on register failure"); I_scscf_drop(); } else { xlog("L_DBG", "This is a 401 - keep scscf list to do optimisation"); } break; } }