[Serusers] sequential hunting
Steve Blair
blairs at isc.upenn.edu
Wed Jan 31 19:45:42 CET 2007
Hello:
I would like to implement sequential hunting. Hunting is when a call
arrives for a given subscriber, no one answers the original number so
the proxy populates the username portion of the r-uri with another
number (from the database) and tries again. This process continues until
all numbers in the database are exhausted. I have the "failover" working
but the r-uri field is not updated on any interation though the
failure_route. Does anyone have any ideas how to make the following work?
Thanks,Steve
# hunting (serial forking)
if (avp_db_load("$ruri/username", "s:allow_hunt")) {
if (avp_check("s:allow_hunt", "eq/y/i")) {
avp_delete("s:allow_hunt");
xlog("L_INFO", "\n[SER]: [%Tf] [%ci] Call Hunting Enabled for
<%ru>\n");
avp_db_load("$ruri/username", "s:huntlist/sam");
xlog("L_INFO", "\n[SER]: [%Tf] [%ci] Call Hunting Started to
<%ru>\n");
t_on_failure("6");
t_relay();
break;
};
};
# Iterate through extension list for subscribers with call hunting enabled
failure_route[6] {
xlog("L_INFO", "\n[SER]: [%Tf] [%ci] Failure Block #6: HUNTING for
<%ru> from <%fu> at <%is>\n");
if (avp_pushto("$ruri/username", "s:huntlist/g"))
{
append_branch();
avp_delete("s:huntlist");
t_on_failure("6");
t_relay();
};
}
More information about the sr-users
mailing list