anchor.diff:  %%
   %%   Proto is an atom, tcp|udp|tcp6|udp6|tls|tls6.
   %%--------------------------------------------------------------------
  -get_response_destination(TopVia) ->
  -    {Protocol, {Host, _}, Parameters} = TopVia,
  +get_response_destination(TopVia) when record(TopVia, via) ->
  +    {Protocol, Host, Parameters} = {TopVia#via.proto, TopVia#via.host, TopVia#via.param},
       ParamDict = sipheader:param_to_dict(Parameters),
       Proto = sipsocket:viaproto2proto(Protocol),
       case dict:find("received", ParamDict) of
  
positive.code: 	    lists:nth(1, Hostnames)
      end.
  
  add_record_route(Proto, Hostname, Port, Header) ->
      Param1 = ["maddr=" ++ siphost:myip(), "lr=true"],
      Param2 = case Proto of
  
negative.code: %%--------------------------------------------------------------------
  %% Function: address_to_address_and_proto/1
  %% Description: When looking at Via headers, we often have a protocol
  %%              from the SIP/2.0/FOO but we need to look at the
  %%              address to determine if our sipdst proto should be
  %%              foo or foo6. This function does that.
  %% Returns: {Address, Proto} | {error, Reason}
  %%   Proto is an atom, tcp|udp|tcp6|udp6|tls|tls6.
  %%--------------------------------------------------------------------
  address_to_address_and_proto(Addr, DefaultProto) ->
      case inet_parse:ipv4_address(Addr) of
  	{ok, _} ->
  	    %% XXX assure DefaultProto was v4 type?
  	    {Addr, DefaultProto};
  	_ ->
  	    case sipserver:get_env(enable_v6, false) of
  		true ->
  		    %% Check if it matches IPv6 address syntax
  		    case inet_parse:ipv6_address(util:remove_v6_brackets(Addr)) of
  			{ok, _} ->
  			    Proto6 = case DefaultProto of
  					 tcp -> tcp6;
  					 udp -> udp6;
  