[Users] what difference between route and failure_route when using rewriteuri

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Mar 15 10:07:27 CET 2006


Hi,

in failure_route you need to do an append_branch()  before route[1] - 
this will take the current RURI and add it as next branch for serial fork.

regards,
bogdan

jimmy way wrote:

>Hi all,
>  I wanna to use rewriteuri to forward calls to next
>gw when call to last gw fail. My testing's script like
>this:
>route[1]
>{
>        if (!t_relay()) {
>                sl_reply_error();
>        };
>}
>failure_route[1] {
>        if(t_check_status("(408)|(404)|(403)")) {
>revert_uri();
>               
>rewriteuri("sip:10001802 at 172.25.16.121:5060");
>                route(1);
>                return(0);
>        };
>        return(0);
>}
>But it worked like this(when timeout):
> 22.960402 172.25.16.250 -> 10.0.0.2     SIP Status:
>500 I'm terribly sorry, server error occurred (1/SL)
> 22.960462 172.25.16.250 -> 10.0.0.2     SIP Status:
>408 Request Timeout
>That is first it send an 500 error, then send an 408
>timeout errro
>I try it in route like this
>route {
>...
>
>       if(method=="INVITE") {
>              
>rewriteuri("sip:10001802 at 172.25.16.121:5060");
>               route(1);
>               return(0);
>       };
>...
>}
>It work fine.
>What's wrong with my scripts?
>
>
>Thanks
>Br,
>
>
>Jimway
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>_______________________________________________
>Users mailing list
>Users at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>
>  
>





More information about the sr-users mailing list