route[2]
{
# Check to see if the UAC is trying to UNREGISTER. If not test
# for NAT. If NAT is present, we mark it as such before we save()
# the location, that way flag 6 is always set for NATed UAs.
if (!search("^Contact:[ ]*\*") && nat_uac_test("19")) {
xlog("L_NOTICE", "REGISTER: NATed client, enabling NAT\n");
setflag(6);
fix_nated_register();
force_rport();
};
# We must handle replies for registrations, for caching and location
# tracking purposes.
t_on_reply("1");
t_on_failure("1");
# Check for digest
#if (radius_www_authorize(""))
#{
# xlog("L_NOTICE", "REGISTER: No Digest, sending challenge\n");
# www_challenge("", "0");
# exit;
#}
# Digest was good if we get here
#save("location");
# Relay register to porta
}
onreply_route[2]
{
if (status =~ "2[0-9][0-9]")
{
# save("location");
};
}