anchor.diff:              end,
               case resolve_srvs(Scheme, Naptr, []) of
                   [] when Scheme==sips -> 
  -                    [{tls, Addr, 5061} || Addr <- get_ips(Domain)];
  +                    [{tls, Addr, 5061, <<>>} || Addr <- get_ips(Domain)];
                   [] -> 
  -                    [{udp, Addr, 5060} || Addr <- get_ips(Domain)];
  +                    [{udp, Addr, 5060, <<>>} || Addr <- get_ips(Domain)];
                   Srvs ->
  -                    Srvs
  +                    [
  +                        case Proto==ws orelse Proto==wss of
  +                            true  -> {Proto, Addr, Port, Path};
  +                            false -> {Proto, Addr, Port, <<>>}
  +                        end
  +                        ||
  +                        {Proto, Addr, Port} <- Srvs
  +                    ]
               end
       end;
   
  
positive.code: 
  uri_test() ->
      Test = [
          {"<sip:1.2.3.4;transport=udp>",  {ok, [{udp, {1,2,3,4}, 5060}]}},
          {"<sip:1.2.3.4;transport=tcp>",  {ok, [{tcp, {1,2,3,4}, 5060}]}},
          {"<sip:1.2.3.4;transport=tls>",  {ok, [{tls, {1,2,3,4}, 5061}]}},
          {"<sip:1.2.3.4;transport=sctp>", {ok, [{sctp, {1,2,3,4}, 5060}]}},
          {"<sip:1.2.3.4;transport=ws>",   {ok, [{ws, {1,2,3,4}, 80}]}},
          {"<sip:1.2.3.4;transport=wss>",  {ok, [{wss, {1,2,3,4}, 443}]}},
          {"<sip:1.2.3.4;transport=other>",  {ok, []}},
  
          {"<sips:1.2.3.4;transport=udp>",  {ok, []}},
          {"<sips:1.2.3.4;transport=tcp>",  {ok, [{tls, {1,2,3,4}, 5061}]}},
          {"<sips:1.2.3.4;transport=tls>",  {ok, [{tls, {1,2,3,4}, 5061}]}},
          {"<sips:1.2.3.4;transport=sctp>", {ok, []}},
          {"<sips:1.2.3.4;transport=ws>",   {ok, [{wss, {1,2,3,4}, 443}]}},
          {"<sips:1.2.3.4;transport=wss>",  {ok, [{wss, {1,2,3,4}, 443}]}},
          {"<sip:1.2.3.4;transport=other>",  {ok, []}},
  
          {"<sip:1.2.3.4:4321;transport=tcp>",  {ok, [{tcp, {1,2,3,4}, 4321}]}},
          {"<sips:127.0.0.1:4321;transport=tls>",  {ok, [{tls, {127,0,0,1}, 4321}]}},
  
          {"<sip:1.2.3.4>",  {ok, [{udp, {1,2,3,4}, 5060}]}},
          {"<sip:1.2.3.4:4321>",  {ok, [{udp, {1,2,3,4}, 4321}]}},
          {"<sips:1.2.3.4>",  {ok, [{tls, {1,2,3,4}, 5061}]}},
          {"<sips:1.2.3.4:4321>",  {ok, [{tls, {1,2,3,4}, 4321}]}},
  
          {"<sip:127.0.0.1:1234>",  {ok, [{udp, {127,0,0,1}, 1234}]}},
          {"<sips:127.0.0.1:1234>",  {ok, [{tls, {127,0,0,1}, 1234}]}},
  
          {"<sip:anyhost>",  {naptr, sip, "anyhost"}},
          {"<sips:anyhost>",  {naptr, sips, "anyhost"}}
  
negative.code: 
  -define(CHECK_INTERVAL, 60).    % secs
  
  -type connection() :: 
      {nksip:protocol(), inet:ip_address(), inet:port_number(), binary()}.
  
  
  %% ===================================================================
  %% Public
  