[Users] Some trouble with multiple failure routes.

Klaus Darilion klaus.mailinglists at pernau.at
Mon Jul 24 10:03:29 CEST 2006


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




More information about the sr-users mailing list