[Users] not going to failure_route

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Nov 30 17:32:00 CET 2005


Hi Jayesh,

you miss an "append_branch()" in failure  route, just before t_relay().

regards,
bogdan

Jayesh Nambiar wrote:

> hi all,
>  
> I was trying the following scenario:
> 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.
> But the call gets replied as "500 service unavailable".
> 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.
>  
> snippet of my cfg file:
>  
>  if (uri=~"^sip:00[0-9]*@") { #forward the trusted IPs without 
> authentication
>                         strip(2);
>                         rewritehost("216.XX.XX.XX");
>                         t_on_failure("1");
>                         t_on_reply("2");
>                         t_relay();
>                  };
> failure_route[1] {
>         log(1, "trying next ip address");
>         prefix("00");
>         rewritehost("63.XX.XX.XX");
>         t_relay();
> }
> onreply_route[2] {
>         if(status=~"18[0-9]") {
>                 t_on_failure("0");
>         };
> }
> pls help me out with this.
>  
> thanx a lot in advance!!
>  
> Jayesh
>
> ------------------------------------------------------------------------
> Enjoy this Diwali with Y! India Click here 
> <http://in.promos.yahoo.com/fabmall/index.html>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Users mailing list
>Users at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>  
>





More information about the sr-users mailing list