Hi!
I've seen this problem raised several times, but couldn't quite find an
answer... I have a problem while trying to redirect the call on no
answer. Namely I get the following error on the console:
1(10197) use_table(): Invalid parameter value
1(10197) is_local(): Error while trying to use domain table
I tracked it down to this line:
if (!is_uri_host_local()) { <-----
if (!isflagset(22)) {
append_branch();
};
route(4);
route(1);
break;
};
Funny enough, when I do not use the route_failure block, everything
seems fine... Does anyone have any idea, what might be wrong? The rest
of the code involved is given below. Thanks
Regards,
Maciek
# INVITE Message Handler
#-----------------------
if (client_nat_test("3")) {
setflag(7);
force_rport();
fix_nated_contact();
};
if (!allow_trusted()) {
if(!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
break;
}
else if (!check_from()){
sl_send_reply("403","Use From=ID");
break;
};
consume_credentials();
};
if(uri=~"^sip:1[0-9]{10}@") {
strip(1);
};
lookup("aliases");
if(!is_uri_host_local()) {
route(4);
route(1);
break;
};
if (uri=~"^sip:00[0-9]*@") { #Int'l PSTN
route(4);
route(5);
break;
};
if (avp_db_load("$ruri/username", "s:callfwd")) {
setflag(22);
avp_pushto("$ruri", "s:callfwd");
route(6);
break;
};
if (!lookup("location")) { #Domestic PSTN
if (uri=~"^sip:[0-9]{10}@") {
xlog("L_INFO","Push outside \n");
route(4);
route(5);
break;
};
sl_send_reply("404", "User Not Found");
break;
};
if (avp_db_load("$ruri/username", "s:fwdbusy")) {
if (!avp_check("s:fwdbusy", "eq/$ruri/i")) {
setflag(26);
};
};
if (avp_db_load("$ruri/username", "s:fwdnoanswer")) {
if (!avp_check("s:fwdnoanswer", "eq/$ruri/i")) {
setflag(27);
};
};
t_on_failure("1");
xlog("L_INFO","Else");
route(4);
route(1);
}
route[6] {
# -------------------------
# Call Forwarding Handler
# -------------------------
xlog("L_INFO","Call forward\n");
if (uri=~"^sip:1[0-9]{10}@") {
strip(1);
};
lookup("aliases");
if (!is_uri_host_local()) {
if (!isflagset(22)) {
append_branch();
};
route(4);
route(1);
break;
};
if (uri=~"^sip:00[0-9]{10}@") {
route(4);
route(1);
break;
};
if (!lookup("location")) {
if (uri=~"^sip:[0-9]{10}@") {
route(4);
route(1);
break;
};
sl_send_reply("404", "User Not Found");
};
route(4);
route(1);
}
failure_route[1] {
if (t_check_status("487")) {
break;
};
if (isflagset(26) && t_check_status("486")) {
if (avp_pushto("$ruri", "s:fwdbusy")) {
avp_delete("s:fwdbusy");
resetflag(26);
route(6);
break;
};
};
if (isflagset(27) && t_check_status("408")) {
if (avp_pushto("$ruri", "s:fwdnoanswer")) {
avp_delete("s:fwdnoanswer");
resetflag(27);
route(6);
break;
};
};
end_media_session();
}