<DIV id=RTEContent>hi all,</DIV> <DIV> </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 "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? Or i m making some logical error here.</DIV> <DIV> </DIV> <DIV>snippet of my cfg file:</DIV> <DIV> </DIV> <DIV> if (uri=~"^sip:00[0-9]*@") { #forward the trusted IPs without authentication<BR>
strip(2);<BR> rewritehost("216.XX.XX.XX");<BR> t_on_failure("1");<BR> t_on_reply("2");<BR> t_relay();</DIV> <DIV> };<BR></DIV> <DIV>failure_route[1] {<BR> log(1, "trying next ip address");<BR> prefix("00");<BR>
rewritehost("63.XX.XX.XX");<BR> t_relay();<BR>}</DIV> <DIV>onreply_route[2] {<BR> if(status=~"18[0-9]") {<BR> t_on_failure("0");<BR> };<BR>}<BR></DIV> <DIV>pls help me out with this.</DIV> <DIV> </DIV> <DIV>thanx a lot in advance!!</DIV> <DIV> </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>