anchor.diff:  	    end
       end.
       
  -%%--------------------------------------------------------------------
  -%% 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;
  -					 tls -> tls6
  -				     end,
  -			    {Addr, Proto6};
  -			_ ->
  -			    {error, "not an IPv4 or IPv6 address"}
  -		    end;
  -		false ->
  -		    {error, "not an IPv4 address"}
  -	    end
  -    end.
  -
   fix_content_length(Header, Body) ->
       keylist:set("Content-Length", [integer_to_list(length(Body))], Header).
   
  
positive.code:     logger:log(error, "Siprequest: send_to_available_dst called with illegal dst ~p", [Dst]),
      send_to_available_dst(DstT, Request, ViaParam, SrvTHandler).
  
  dst2str(Dst) when record(Dst, sipdst) ->
      lists:flatten(io_lib:format("~p:~s:~p (~s)", [Dst#sipdst.proto, Dst#sipdst.addr, Dst#sipdst.port,
  						  sipurl:print(Dst#sipdst.uri)])).
  
  proxy_check_maxforwards(Header) ->
      MaxForwards =
  
negative.code: 	{ok, NewHeader, DstURI, ReqURI} when record(DstURI, sipurl), record(ReqURI, sipurl) ->
  	    logger:log(debug, "sippipe: Routing request as per the Route header, Destination ~p, Request-URI ~p",
  		       [sipurl:print(DstURI), sipurl:print(ReqURI)]),
  	    case sipdst:url_to_dstlist(DstURI, ApproxMsgSize, ReqURI) of
  		DstList when list(DstList) ->
  		    send_proxy_request(SrvTHandler, Request, DstList, ViaParameters);
  		Unknown ->
  