I'm not familiar with the avp_pushto, but on the first look I'd say you should first append_branch and then change the request-uri.
I appologize in advance if it shows as false hint. ;-)
Michal
On Wed, 2007-01-31 at 13:45 -0500, Steve Blair wrote:
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(); }; }
Serusers mailing list Serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers