anchor.diff:  %% Returns : ok                  |
   %%           {senderror, Reason}
   %%           Reason = string()
  +%% Note    : XXX this function does not handle errors returned from
  +%%           sub-functions in a very consistent manner. Should be
  +%%           fixed.
   %%--------------------------------------------------------------------
   send_response_to(DefaultSocket, Response, TopVia) when is_record(Response, response), record(TopVia, via) ->
       {Status, Reason, HeaderIn, Body} = {Response#response.status, Response#response.reason,
  
positive.code: %%--------------------------------------------------------------------
  %% Function: send_proxy_request(Socket, Request, Dst, ViaParameters)
  %%           Socket        = sipsocket record() | none, socket to use
  %%                           for sending this request 
  %%           Request       = request record()
  %%           Dst           = sipdst record()
  %%           ViaParameters = list() of {key, value} tuple()
  
negative.code: %%           Reason = string()
  %%--------------------------------------------------------------------
  send_response(Socket, Response) when is_record(Response, response) ->
      case sipheader:topvia(Response#response.header) of
  	none ->
  	    {Status, Reason} = {Response#response.status, Response#response.reason},
  	    logger:log(error, "Transport layer: Can't send response '~p ~s', no Via left.", [Status, Reason]),
  	    {senderror, "malformed response"};
  	TopVia when is_record(TopVia, via) ->
  