Hi Devious,
a SRV records is basically an extended CNAME record with additonal a Weigth/Priority/Port values for the resolved HOST-Name(s).
when DNS_REQUEST {
Searching for DNS request for SRV = _sip._tcp.domain.de
if { ( [string tolower [DNS::question name]] equals "_sip._tcp.domain.de" )
and ( [DNS::question type] equals "SRV" ) } then {
Defining DNS answer for the requested SRV record (Question Name = _sip._tcp.domain.de., ttl = 600, class = IN, type = SRV, priority = 100, weight = 100, port = 5060, hostname = sip.domain.de )
DNS::answer insert "_sip._tcp.domain.de. 600 IN SRV 10 100 5060 sip1.domain.de"
DNS::answer insert "_sip._tcp.domain.de. 600 IN SRV 20 100 5060 sip2.domain.de"
Changing "Authorative Answer" DNS header to true.
DNS::header aa 1
Sending the DNS response
DNS::return
}
}
}
After your DNS client gets the SRV response, it will perform an additional A or AAAA query for the just received HOST names. The subsequent A or AAAA request may then target a wide-IP as usuall...
Note: The SRV response may already include the A or AAAA DNS responses for the just resolved HOST names to speed up DNS resolution. To make those additional A or AAAA DNS answers GLBS aware you would need a handcrafted logic to perform the country checks and flip the IP based on those information. Its not rocket science, but still far more complicated than using two independent DNS queries/responses...:-)
Cheers, Kai