anchor.diff:  		true -> siprequest:add_record_route(Header);
   	        false -> Header
   	    end,
  -	    siprequest:send_proxy_request(Newheaders, Socket, {Method, Newlocation, Body, []})
  +	    {_, _, DstHost, _, _} = Newlocation,
  +	    Newheaders2 = add_caller_identity_for_sip(Newheaders, FromURI, DstHost),
  +	    siprequest:send_proxy_request(Newheaders2, Socket, {Method, Newlocation, Body, []})
       end.
   
   toPSTNrequest(Method, URI, Header, Body, Socket) ->
       {Phone, _, _, _, _} = URI,
  -    Newlocation = {Phone, none, lists:nth(1, sipserver:get_env(pstngatewaynames)), none, []},
  +    PSTNgateway = lists:nth(1, sipserver:get_env(pstngatewaynames)),
  +    Newlocation = {Phone, none, PSTNgateway, none, []},
       {_, FromURI} = sipheader:to(keylist:fetch("From", Header)),
       Fromphone = local:sipuser(FromURI),
       Classdefs = sipserver:get_env(classdefs, [{"", unknown}]),
  
positive.code:     LogStr = sipserver:make_logstr({response, Status, Reason, Header, Body}, FromIP),
      logger:log(normal, "Response to ~s: ~p ~s", [LogStr, Status, Reason]),
      siprequest:send_proxy_response(Socket, Status, Reason, Header, Body).
  
negative.code: 	true -> siprequest:add_record_route(Header);
          false -> Header
      end,
      Newheaders2 = add_caller_identity_for_pstn(Newheaders, FromURI, PSTNgateway),
      sipauth:check_and_send_auth(Header, Newheaders2, Socket, Fromphone, Phone,
  				{siprequest, send_proxy_request},
  				{Method, Newlocation, Body, []},
  				Method, Classdefs).
  