anchor.diff:      yxa_test_config:set(remote_party_id, false),
       ACI_Header5 = keylist:from_list([]),
       ACI_Header5_Res = add_caller_identity(pstn, "INVITE", ACI_Header5, ACI_Dst1, ACI_Ctx4),
  -    
  +
       autotest:mark(?LINE, "add_caller_identity/5 - pstn 5.2"),
       %% verify
       [] = keylist:fetch("Remote-Party-Id", ACI_Header5_Res),
  
positive.code: 		       "(stale auth)", [YxaCtx#yxa_ctx.app_logtag, Method, User, DstNumber, DstClass]),
  	    true;
  	IsStale ->
  	    logger:log(normal, "~s: pstnproxy: Disallowing ~s request from user ~p to number ~s, class '~p' "
  		       "(stale auth)", [YxaCtx#yxa_ctx.app_logtag, Method, User, DstNumber, DstClass]),
  	    transactionlayer:send_challenge(YxaCtx#yxa_ctx.thandler, proxy, _Stale = true, _RetryAfter = none),
  	    false;
  
negative.code: 	     app_logtag	= LogTag
  	    } = YxaCtx,
      logger:log(debug, "~s: pstnproxy: Action 'proxy' : ~p", [LogTag, Dst]),
  
      {ok, AllowedMethods} = local:pstnproxy_allowed_methods(Request, PstnCtx),
  
      {IsAllowed, NewPstnCtx} =
  	case local:pstnproxy_allowed_proxy_request(Request, PstnCtx) of
  	    true -> {true, PstnCtx};
  	    false -> {false, PstnCtx};
  	    undefined ->
  		case authorize_proxying(Request, YxaCtx, PstnCtx) of
  		    {ok, true, NewPstnCtx1} ->
  			case lists:member(Request#request.method, AllowedMethods) of
  			    true ->
  				{true, NewPstnCtx1};
  			    false ->
  				logger:log(normal, "~s: pstnproxy: Method ~s not allowed for this destination",
  					   [LogTag, Request#request.method]),
  				ExtraHeaders = [{"Allow", AllowedMethods}],
  				transactionlayer:send_response_handler(THandler, 405, "Method Not Allowed",
  								       ExtraHeaders),
  				{false, NewPstnCtx1}
  			end;
  		    {ok, false, NewPstnCtx1} ->
  			{false, NewPstnCtx1}
  		end
  	end,
  
      case IsAllowed of
  	true ->
  	    NewHeader = add_caller_identity(PstnCtx#pstn_ctx.destination, Request#request.method,
  					    Request#request.header, Dst, NewPstnCtx),
  
  	    %% make sure we don't downgrade SIPS to SIP
  	    NewURI = restore_sips_proto(NewPstnCtx#pstn_ctx.orig_uri, Request#request.uri),
  	    NewRequest1 =
  		Request#request{uri = NewURI,
  				header = NewHeader
  			       },
  	    {NewDst, NewRequest} =
  		case Dst of
  		    _ when is_record(Dst, sipurl) ->
  			NewDst1 = restore_sips_proto(NewPstnCtx#pstn_ctx.orig_uri, Dst),
  			{NewDst1, NewRequest1};
  		    route ->
  			%% XXX do we need to ensure first Route header is SIPS, if Request-URI was?
  			{Dst, NewRequest1}
  		end,
  
  	    start_sippipe(NewRequest, YxaCtx, NewDst, [NewPstnCtx]);
  	false ->
  	    ok
      end;
  
  %%--------------------------------------------------------------------
  