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