On 5/17/07, Yago Bargalló <yago.bargallo(a)quarea.com> wrote:
Hello, I'm new in Openser and now I'm trying to use a failure_route but
it doesn't work and I don't know why. The version that I'm using is Openser
1.2. What I'm trying is to forward a call after fr_inv_timer to Asterisk
but it doesn't work. This is my openser.cfg :
(…)
modparam("tm","fr_timer",4)
modparam("tm", "fr_inv_timer" ,30)
# ------------------------- request routing logic -------------------
# main routing logic
route{
(…)
if (uri==myself) {
if (method=="REGISTER") {
if (!www_authorize("
172.16.51.150", "subscriber")) {
www_challenge("172.16.51.150", "0");
exit;
};
save("location");
exit;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound
alias\r\n");
route(1);
};
if(is_method("INVITE") &&
(uri=~"sip:2[0-9]+@")) {
* t_on_failure("1");*
}
# native SIP destinations are handled using
our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not
Found");
exit;
};
append_hf("P-hint: usrloc applied\r\n");
};
route(1);
}
route[1] {
# send it out now; use stateful forwarding as it works
reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
exit;
}
*failure_route[1] {*
*#redirect to Asterisk*
* rewriteuser("2002");*
* rewritehostport("172.16.51.160:5060"); *
*# rewriteuser("2002");*
*}*
_______________________________________________
Users mailing list
Users(a)openser.org
http://openser.org/cgi-bin/mailman/listinfo/users
--
Thanks &Regards
Ravi Prakash Sunkara