anchor.diff:  	    Location
       end.
   
  -% Set a To-tag that includes a magic cookie to recognize the ACK of one of our
  -% challenges without having to keep state, except if there already is a to-tag
  -dropack_to(Header) ->
  -    To = keylist:fetch("To", Header),
  -    case sipheader:get_tag(To) of
  -	none ->
  -	    {DistplayName, ToURI} = sipheader:to(To),
  -	    MyHostname = siprequest:myhostname(),
  -	    NewTo = lists:concat([sipheader:to_print({DistplayName, ToURI}), ";tag=",
  -	    			siprequest:generate_branch(), "-", MyHostname, "-drop-ACK"]),
  -	    keylist:set("To", [NewTo], Header);
  -	_ ->
  -	    Header
  -    end.
  -
   get_branch_from_handler(TH) ->
       CallBranch = transactionlayer:get_branch_from_handler(TH),
       case string:rstr(CallBranch, "-UAS") of
  
positive.code: 	    logger:log(normal, "~s: incomingproxy: Redirect ~s", [LogTag, sipurl:print(Loc)]),
  	    Contact = [{none, Location}],
  	    ExtraHeaders = [{"Contact", sipheader:contact_print(Contact)}],
  	    transactionlayer:send_response_request(Request, 302, "Moved Temporarily", ExtraHeaders);
  	{relay, Loc} ->
  	    relay_request(THandler, Request, Loc, LogTag);
  	{forward, Host, Port} ->
  
negative.code: 	stale ->
  	    logger:log(debug, "Relay: STALE authentication, sending challenge"),
  	    ExtraHeaders = [{"Proxy-Authenticate", sipheader:auth_print(sipauth:get_challenge(), true)}],
  	    transactionlayer:send_response_handler(THandler, 407, "Proxy Authentication Required", ExtraHeaders);
  	false ->
  	    logger:log(debug, "Relay: Failed authentication, sending challenge"),
  	    logger:log(normal, "~s: incomingproxy: Relay ~s -> 407 Proxy Authorization Required", [LogTag, sipurl:print(DstURI)]),
  	    ExtraHeaders = [{"Proxy-Authenticate", sipheader:auth_print(sipauth:get_challenge(), false)}],
  	    transactionlayer:send_response_handler(THandler, 407, "Proxy Authentication Required", ExtraHeaders);
  	Unknown ->
  	    logger:log(error, "relay_request: Unknown result from sipauth:get_user_verified_proxy() :~n~p", [Unknown]),
  	    transactionlayer:send_response_handler(THandler, 500, "Server Internal Error")
      end.
  
  response(Status, Reason, Header, Body, Socket, FromIP) ->
  