failure_route[1] { # authentication reply received? if ( t_check_status("401|407") ) { # have we already tried to authenticate? if (isflagset(7)) { t_reply("503","Authentication failed"); exit; } if (uac_auth()) { # mark that auth was performed setflag(7); # trigger again the failure route t_on_failure("1"); # repeat the request with auth response this time append_branch(); t_relay(); } } }