[Users] what difference between route and failure_route when using rewriteuri
jimmy way
jimway71 at yahoo.com
Wed Mar 15 05:19:08 CET 2006
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
More information about the sr-users
mailing list