anchor.diff:              [{Service, Name} | _Rest] = List2,
   
               Dest2 = service_dest(Service),
  -            resolve_dest_srv(Name, Dest2)
  +            resolve_dest_srv(Host, Name, Dest2)
       end.
   
   %% @doc Create `#sip_destination{}' for given NAPTR service
  
positive.code:     List = lists:sort(inet_res:lookup(Host, in, naptr)),
      case List of
          [] ->
              % no NAPTR records -- try making SRV queries
              if TLS -> Params = [tls]; not TLS -> Params = [] end,
              DomainTCP = service_proto(tcp, TLS) ++ Host,
              DestTCP = #sip_destination{transport = tcp, params = Params},
              case resolve_dest_srv(DomainTCP, DestTCP) of
                  [] ->
                      DomainUDP = service_proto(udp, TLS) ++ Host,
                      DestUDP = #sip_destination{transport = udp, params = Params},
                      resolve_dest_srv(DomainUDP, DestUDP);
                  Dests -> Dests
              end;
          _ ->
  
negative.code:            % otherwise, make SRV query
             Domain = service_proto(Transport, TLS) ++ Host,
             Dest = #sip_destination{transport = Transport, params = Params},
             resolve_dest_srv(Host, Domain, Dest)
      end.
  
  %% @doc Determine Port and IP address by SRV queries
  %% @end
  resolve_dest_srv(Target, Domain, Dest) ->
      case lookup_srv(Domain) of
          [] ->
              % FIXME: hard-coded default port
              Port = 5060,
              [Res || Res <- resolve_dest_a(Target, Dest#sip_destination{port = Port})];
          SRVs ->
              [Res || {_Pri, _Weight, Port, Host} <- SRVs,
                      Res <- resolve_dest_a(Host, Dest#sip_destination{port = Port})]
      end.
  
  %% @doc Lookup SRV records and sort them according to RFC 2782
  %% @end
  lookup_srv(Domain) ->
      SRVs = inet_res:lookup(Domain, in, srv),
  