Jan Janak writes:
you didn't answer, can the above be also written as:
lookup_domain("$fd", "$fd");
if not, why?
Yes it can. In this particular case the function will assume that the domain name to be looked up is stored in the AVP $fu.fd. If the AVP identifiers does not contain the flags before the delimiting '.' then 'fu' is assumed. So the function will try to retrieve the domain name from that AVP and if it does not exist (which is likely) then the function returns -1.
i start to get lost again. i understand that i can reference avps of the above looked up domain as $fd.attribute_name. but why can't the domain that is being looked up simply be taken from the kamailio pseudo variable as it is written ($fd in the example) without assuming that it is in $fu.fd?
or is it so that second argument of lookup_domain cannot be a k pseudo variables at all? for example, can i take if from r-uri host like this:
lookup_domain("$fd", "$rd");
-- juha