[Users] Failure_route help

Yago Bargalló yago.bargallo at quarea.com
Thu May 17 13:27:51 CEST 2007


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_inv_timer" , 8)

 

# -------------------------  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

                rewritehostport("172.16.51.160:5060"); 

                rewriteuser("2002");

}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20070517/e5ea4418/attachment.htm 


More information about the Users mailing list