<DIV id=RTEContent>hi all,</DIV>  <DIV>&nbsp;</DIV>  <DIV>I was trying the following scenario:</DIV>  <DIV>If a call comes from trusted source_ip, I rewritehost and forward them. But what I want is if the reply status is greater than 400, it should go to the failure route and try that destination.</DIV>  <DIV>But the call gets replied as&nbsp;"500 service unavailable".</DIV>  <DIV>I think, the call should go to the failure route if the status is greater than 300, is it right?&nbsp; Or i m making some logical error here.</DIV>  <DIV>&nbsp;</DIV>  <DIV>snippet of my cfg file:</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;if (uri=~"^sip:00[0-9]*@") { #forward the trusted IPs without authentication<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 strip(2);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rewritehost("216.XX.XX.XX");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_failure("1");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply("2");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();</DIV>  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR></DIV>  <DIV>failure_route[1] {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log(1, "trying next ip address");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; prefix("00");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 rewritehost("63.XX.XX.XX");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();<BR>}</DIV>  <DIV>onreply_route[2] {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(status=~"18[0-9]") {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_failure("0");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>}<BR></DIV>  <DIV>pls help me out with this.</DIV>  <DIV>&nbsp;</DIV>  <DIV>thanx a lot in advance!!</DIV>  <DIV>&nbsp;</DIV>  <DIV>Jayesh</DIV><p>
                <hr size=1> 
Enjoy this Diwali with Y! India <a href="http://in.promos.yahoo.com/fabmall/index.html">Click here</a>