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:[EMAIL PROTECTED]: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:[EMAIL PROTECTED]: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
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://openser.org/cgi-bin/mailman/listinfo/users