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....
Add xlog statements to your config and watch syslog. This is how you can trace if the failure route is executed. Further you can set debug=4 to see debug messages of openser.
Further watch the SIP traffic using ngrep and dump it here
regards klaus
Yago Bargalló wrote:
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....
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
On 5/24/07, Yago Bargalló yago.bargallo@quarea.com wrote:
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
interChange the rewritehostport and rewriteuser
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….
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users