anchor.diff:  %%--------------------------------------------------------------------
   loop(State) when is_record(State, state) ->
   
  -    ClientPid = State#state.clienthandler,
  +    ClientPid = State#state.clienttransaction_pid,
       ServerHandlerPid = transactionlayer:get_pid_from_handler(State#state.serverhandler),
   
       {Res, NewState} = receive
   
   			  {servertransaction_cancelled, ServerHandlerPid} ->
  -			      gen_server:cast(State#state.clienthandler, {cancel, "server transaction cancelled"}),
  -			      {ok, State};
  -
  -			  {branch_result, _Branch, _NewTransactionState, Response} ->
  -			      NewState1 = process_client_transaction_response(Response, State),
  +			      NewState1 = cancel_transaction(State, "server transaction cancelled"),
  +			      {ok, NewState1};
  +
  +			  {branch_result, _ClientPid, _Branch, _BranchSipState, Response} ->
  +			      NewState1 = process_received_response(Response, State),
   			      {ok, NewState1};
   
   			  {servertransaction_terminating, ServerHandlerPid} ->
   			      NewState1 = State#state{serverhandler=none},
  -			      {ok, NewState1};
  -
  -			  {clienttransaction_terminating, {_Branch, ClientPid}} ->
  -			      NewState1 = State#state{clienthandler=none},
  -			      {ok, NewState1};
  -
  -			  {clienttransaction_terminating, {_Branch, _}} ->
  +			      {quit, NewState1};
  +
  +			  {clienttransaction_terminating, ClientPid, _Branch} ->
  +			      NewState1 = State#state{clienttransaction_pid=none},
  +			      {quit, NewState1};
  +
  +			  {clienttransaction_terminating, _ClientPid, _Branch} ->
   			      %% An (at this time) unknown client transaction signals us that it
   			      %% has terminated. This is probably one of our previously started
   			      %% client transactions that is now finishing - just ignore the signal.
  
positive.code: %%--------------------------------------------------------------------
  
  %%
  %% Time to quit, send a final response to server transaction and
  %% cancel any running client transaction.
  %%
  tick(State, Now) when is_record(State, state), Now >= State#state.endtime ->
      case client_transaction_alive(State) of
  	true ->
  	    gen_server:cast(State#state.clienthandler, {cancel, "sippipe decided to quit (timeout)"});
  	_ -> true
      end,
      case transactionlayer:is_good_transaction(State#state.serverhandler) of
  	true ->
  	    transactionlayer:send_response_handler(State#state.serverhandler, 500, "No reachable destination");
  	_ -> ok
      end,
      logger:log(error, "sippipe: Reached end time after ~p seconds", [State#state.timeout]),
      {quit, State#state{clienthandler=none, serverhandler=none, branch=none, dstlist=[]}};
  
  %%
  %% Time to warn
  %%
  tick(State, Now) when is_record(State, state), Now >= State#state.warntime ->
      logger:log(error, "sippipe: Warning: pipe process still alive!~nClient handler : ~p, Server handler : ~p",
  	       [State#state.clienthandler, State#state.serverhandler]),
      {ok, State#state{warntime=Now + 60}};
  
  tick(State, _Now) ->
  
negative.code: %%           send a 500 response in case we have no destinations left.
  %% Returns : NewState = state record()
  %%--------------------------------------------------------------------
  start_next_client_transaction(#state{cancelled=false}=State) ->
      DstListIn = State#state.dstlist,
      case DstListIn of
  	[_FirstDst] ->
  