I have an unusual need: If a contact in the usrloc database is
unreachable for any reason, I must immediately delete it from the usrloc
database. I know how to do the deletion, but I don't know the right way
to write my configuration script.
Below is the script that I want to write. But I think it won't work,
because I think it's illegal for a failure_route block to call a route()
command. (Am I correct about that?)
Can anyone tell me what I should do instead of the following?
Thank you in advance!
Tim
==============
route {
[...irrelevant stuff omitted...]
if (method==INVITE) {
route(1);
}
}
route[1] {
if (lookup("location")) {
t_on_failure("99");
t_relay();
} else {
t_reply("404","Not Found");
}
}
failure_route[99] {
delete_location_from_usrloc(); # I will write this function.
route(1);
}
==============