anchor.diff:  	    end
       end.
   
  +%%--------------------------------------------------------------------
  +%% Function: send_to_available_dst(DstList, Request, ViaParam,
  +%%                                 SrvTHandler)
  +%%           DstList       = list() of sipdst record()
  +%%           Request       = request record()
  +%%           ViaParam      = list() of {key, value} tuple()
  +%%           SrvTHandler   = thandler record()
  +%% Descrip.: Sequentially try to get sockets for, and send request
  +%%           to, the destinations listed in DstList.
  +%% Returns : {ok, Socket, Branch} |
  +%%           {error, Reason}      |
  +%%           Socket = sipsocket record(), the socket finally used
  +%%           Branch = string(), the branch we put in the Via header
  +%%           Reason = string()
  +%%--------------------------------------------------------------------
   send_to_available_dst([], Request, ViaParam, SrvTHandler) when record(Request, request) ->
       Line1 = Request#request.method ++ " " ++ sipurl:print(Request#request.uri) ++ " SIP/2.0",
       lists:flatten(Message = Line1 ++ "\r\n" ++ sipheader:build_header(Request#request.header) ++ "\r\n" ++ Request#request.body),
  
positive.code: 	_ ->
  	    keylist:prepend({"Record-Route", [Route]}, Header)
      end.
  add_record_route(Header, Origin) when record(Origin, siporigin) ->
      Port = sipserver:get_listenport(Origin#siporigin.proto),
      add_record_route(Origin#siporigin.proto, myhostname(), Port, Header).
  
  standardcopy(Header, ExtraHeaders) ->
      keylist:appendlist(keylist:copy(Header,
  				    ["Via", "From", "To",
  
negative.code: 	    send_response_to(Socket, Response, TopVia)
      end.
  
  %%--------------------------------------------------------------------
  %% Function: send_response_to(Socket, Response, TopVia)
  %%           Socket   = sipsocket record() | none
  %%           Response = response record()
  %%           Via      = via record()
  %% Descrip.: Send a response out on a socket.
  %% Returns : ok                  |
  %%           {senderror, Reason}
  %%           Reason = string()
  %%--------------------------------------------------------------------
  send_response_to(DefaultSocket, Response, TopVia) when record(Response, response), record(TopVia, via) ->
      {Status, Reason, HeaderIn, Body} = {Response#response.status, Response#response.reason,
  					Response#response.header, Response#response.body},
  