lookup_domain("$fd", "$fd");
the first $fd must be an avp, because lookup_domain expects an avp name
as first param and the second could be either a pvar or avp, but that
can be determined at fixup time.
That does not work right now, but it would be very easy to make it work.
that and is_domain api function seem to be the conditions for adopting s
domain module.
-- juha