I didn't do it exactly that way, but that logic worked well for me. Thank you.

On Jul 24, 2006, at 4:03 AM, Klaus Darilion wrote:

failure_route 2 will only be executed if the t_relay in failure route 1 generates a failure again. In your case, the you just forward the failure back to the client.

Try this:

failure_route[1]
{
  xlog("got to failure route 1");
    if(t_check_status("302")){
      xlog("$tU has a forward");
      get_redirects("*", "redirect");
      t_relay("my.sip.proxy");
      exit;
    };

    xlog("$tU getting a vmail");
    if (t_check_status("408|486|487")){
      revert_uri();
      strip(1);
      prefix("201");
      rewriteport("5070");
      append_branch();
      t_relay();
      exit;
    };
}

or if you want ot use route blocks:

failure_route[1]
{
  xlog("got to failure route 1");
    if(t_check_status("302")){
      xlog("$tU has a forward");
      get_redirects("*", "redirect");
      t_relay("my.sip.proxy");
      exit;
    };

    route(22);
}

failure_route[2]
{
        route(22);
}

route[22] {
    xlog("got to failure route 2");
    xlog("$tU getting a vmail");
  if (t_check_status("408|486|487")){
    revert_uri();
    strip(1);
    prefix("201");
    rewriteport("5070");
    append_branch();
    t_relay();
    exit;
  };
}





regards
klaus


_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to