Hello Ben
We're using lookups with postgress db and also we're doing enum query with
external dns servers that have variable response delay between 20ms and 300ms (that's
why we're using async workers).
Here is bellow our kamailio-routing:
#!KAMAILIO
loadmodule "sl"
loadmodule "tm"
children=64
async_worker=128
request_route {
route(lookup1);
route(lookup2);
route(lookup3);
if(invite_with_enum) {
async_task_route("enum_route");
} else {
route(lookup4)
route(lookup5)
route(lookup6)
route(send_reply);
}
}
route[enum_route] {
# performing enum query with external dns server
# getting the new regex
route(lookup4)
route(lookup5)
route(lookup6)
route(send_reply);
}
route[send_reply] {
if (t_exists()) {
send_reply("302", "Moved Temporarily");
} else {
sl_send_reply("302", "Moved Temporarily");
}
exit;
}