[Users] (no subject)

Yago Bargalló yago.bargallo at quarea.com
Thu May 24 14:30:48 CEST 2007


Hello,

First of all thaks to Kraus for his quick reply on my last question. However I can't do openser work fine.

 I'm trying to use failure_route as follows, can anybody tell me which could be the problem?? 

 

(...)

modparam("tm", "fr_inv_timer" , 10)

 

# timer for response to a request

modparam("tm","fr_timer", 4)

 

 

# -------------------------  request routing logic -------------------

 

# main routing logic

 

route{

(...)

                if (uri==myself) {

(...)

                               # Redirecciono cap a l'asterisk si marquen una extensió que comença per 3

 

                               if(uri=~"sip:2[0-9]+@" && method=="INVITE") {

                                               t_on_failure("1");

                               }

(...)

                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]{

                rewritehostport("172.16.51.160"); #asterisk

                rewriteuser("2002");

                append_branch();

                t_relay();

                exit;

}

 

 

With this openser.cfg the call is cancelled after fr_inv_timer and failure_route[1]  doesn't work but, however, if I do this:

 

route{

(...)

                if (uri==myself) {

(...)

                               # Redirecciono cap a l'asterisk si marquen una extensió que comença per 3

 

                               if(uri=~"sip:2[0-9]+@" && method=="INVITE") {

                à                           rewritehostport("172.16.51.160"); #asterisk

                à                           rewriteuser("2002");

                                                t_relay();

                                                exit;

                               }

(...)

                route(1);

}

 

If I use this the call is redirected to my asterisk but using the failure_route as my first openser.cfg it does't work.

 

Which is my problem??

 

Thanks....

 

 

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


More information about the Users mailing list