anchor.diff:  		[]
   	end,
   
  -    FromGw ++ HasRoute.
  -
  -
  -%%--------------------------------------------------------------------
  -%% Function: auth_and_tag_verify_from(Request, YxaCtx, YXAPeerAuth,
  -%%                                    PstnCtx)
  +    AuthFlags =
  +	case IsPeerAuth of
  +	    true ->  [peer_auth];
  +	    false -> []
  +	end,
  +
  +    FromGw ++ HasRoute ++ AuthFlags.
  +
  +
  +%%--------------------------------------------------------------------
  +%% Function: auth_and_tag_verify_from(Request, YxaCtx, PstnCtx)
   %%           Request     = request record()
   %%           YxaCtx      = yxa_ctx record()
  -%%           YXAPeerAuth = bool(), user authenticated by peer of ours?
   %%           PstnCtx     = pstn_ctx record()
   %% Descrip.: If the From: has an address belonging to one of our
   %%           users, verify that the sender is authorized to use it.
  
positive.code: 		  orig_uri	= Request#request.uri
  		 },
  
      Tags = auth_and_tag_get_tags(Request, PstnCtx1),
      PstnCtx2 = PstnCtx1#pstn_ctx{tags = Tags},
  
      PstnCtx = local:pstnproxy_auth_and_tag(Request, Origin, THandler, PstnCtx2),
  
      case auth_and_tag_verify_from(Request, YxaCtx, YXAPeerAuth, PstnCtx) of
  	ok ->
  	    {ok, PstnCtx};
  	_ ->
  
negative.code: 		true ->
  		    NewHeader = add_caller_identity(PstnCtx#pstn_ctx.destination, Request#request.method,
  						    Request#request.header, Dst, PstnCtx),
  
  		    %% make sure we don't downgrade SIPS to SIP
  		    NewURI = restore_sips_proto(PstnCtx#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(PstnCtx#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, [PstnCtx]);
  		false ->
  		    ok
  	    end;
  