anchor.diff:  	  do_cancel=false,	%% atom(), {true, EH} | false - have we been instructed to cancel?
   	  tl_branch,	%% string(), the branch the transaction layer actually used when sending our request
   	  initialized=no,	%% atom(), yes | no - have we finished our initialization process
  -	  cancel_pid	%% undefined | pid(), if we start a CANCEL for ourselves, this is the pid of that transaction
  +	  cancel_pid,	%% undefined | pid(), if we start a CANCEL for ourselves, this is the pid of that transaction
  +	  final_r_sent=no	%% atom(), yes | no - have we sent a final response to our parent yet?
   	 }).
   
   
  
positive.code:     LogTag = State#state.logtag,
      logger:log(debug, "~s: ~s ~s - pretend we got an '~p ~s' (and enter SIP state terminated)",
  	       [LogTag, Method, sipurl:print(URI), Status, Reason]),
      FakeResponse = {Status, Reason},
      ReportTo = State#state.report_to,
      case util:safe_is_process_alive(ReportTo) of
  	{true, ReportTo} ->
  	    logger:log(debug, "~s: Client transaction forwarding fake response '~p ~s' to ~p",
  		       [LogTag, Status, Reason, ReportTo]),
  	    Branch = State#state.branch,
  	    ReportTo ! {branch_result, self(), Branch, terminated, FakeResponse};
  	{false, _} ->
  	    logger:log(debug, "~s: Client transaction orphaned ('~p' not alive) - not sending "
  		       "fake response '~p ~s' to anyone", [LogTag, ReportTo, Status, Reason])
      end,
      NewState1 = State#state{response=FakeResponse},
      NewState = terminate_transaction(NewState1),
      NewState.
  
  %%--------------------------------------------------------------------
  %% Function: fake_request_response(Status, Reason, State)
  
negative.code: perform_branchaction(tell_parent, State) when is_record(State, state) ->
      LogTag = State#state.logtag,
      Response = State#state.response,
      {Status, Reason} = case Response of
  			   _ when is_record(Response, response) ->
  			       {Response#response.status, Response#response.reason};
  			   {Status1, Reason1} when is_integer(Status1), is_list(Reason1) ->
  			       Response
  		       end,
      Request = State#state.request,
      ReportTo = State#state.report_to,
      case util:safe_is_process_alive(ReportTo) of
  	{true, ReportTo} when is_pid(ReportTo) ->
  	    IsFinalResponse = (Status >= 200),
  	    case (IsFinalResponse == true) and (State#state.final_r_sent == true) of
  		true ->
  		    logger:log(debug, "~s: Not telling parent ~p about response '~p ~s' since we "
  			       "have already sent a final response to our parent",
  			       [LogTag, ReportTo, Status, Reason]),
  		    State;
  		false ->
  		    logger:log(debug, "~s: Client transaction telling parent ~p about response '~p ~s'",
  			       [LogTag, ReportTo, Status, Reason]),
  		    Branch = State#state.branch,
  		    SipState = State#state.sipstate,
  		    ReportTo ! {branch_result, self(), Branch, SipState, Response},
  		    if
  			IsFinalResponse ->
  			    %% Make event out of final response
  			    {Method, URI} = {Request#request.method, Request#request.uri},
  			    L = [{dst, sipdst:dst2str(State#state.dst)}],
  			    event_handler:uac_result(Branch, Method, URI, Status, Reason, L),
  			    State#state{final_r_sent = true};
  			true -> State
  		    end
  	    end;
  	{false, undefined} ->
  	    %% ReportTo == undefined, we never had a parent (typically this was a
  	    %% fire-and-forget CANCEL transaction)
  	    logger:log(debug, "~s: Independent client transaction terminating, final response : '~p ~s'",
  		       [LogTag, Status, Reason]),
  	    State;
  	{false, _} ->
  	    logger:log(error, "~s: Client transaction orphaned ('~p' not alive) - not sending "
  		       "response '~p ~s' to anyone", [LogTag, ReportTo, Status, Reason]),
  	    State
      end.
  
  %%--------------------------------------------------------------------
  %% Function: received_response_state_machine(Method, Status, State)
  