<div dir="ltr">Can someone tell me how to handle a 401 from a 302 redirect?  I am attempting to register with the uac module.  Normally, I set a failure route for the 401 and call auc_auth().  In this case, I am receiving a 302, sending the register with get_redirects(), then getting a 401.  However, Kamailio seems to be ignoring the 401.  I see it in an onrely_route, but not a failure route.<div>
<p class=""><font face="courier new, monospace">failure_route[REG_AUTH] {<br>  xlog("L_NOTICE","route[REG_AUTH]\n");<br><br>  # Handle redirects<br>  if ($T_reply_code == 302) {<br>    get_redirects("*", "Redirected");<br>
    t_on_failure("REG_AUTH");<br>    route(RELAY);<br>  } else if ($T_reply_code == 401) {<br>    uac_auth();<br>    t_on_reply("REG_REPLY");<br>    route(RELAY);<br> }<br>}<br><br>route[RELAY] {<br>  xlog("L_NOTICE","route[RELAY] ($rm)\n");<br>
<br>  if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) {<br>    if (!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH");<br>  }<br><br>  if (is_method("INVITE|SUBSCRIBE|UPDATE")) {<br>
    if (!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");<br>  }<br><br>  if (is_method("INVITE")) {<br>    if (!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");<br>
  }<br><br>  xlog("L_NOTICE","t_relay()'ing ($rm)\n");<br><br>  if (!t_relay()) {<br>    sl_reply_error();<br>  }<br>  exit;<br>}</font></p>Thanks!</div><div><br></div><div>Marc</div></div>