anchor.diff:  	    %% equally preferred hosts in the SRV response for a destination.
   	    %% It makes more sense to try to connect to Proxy B over TCP/UDP than to
   	    %% try Proxy A over UDP when Proxy A over TCP has just failed.
  -	    NewState = case transactionlayer:start_client_transaction(NewRequest, none, FirstDst, NewBranch, Timeout, self()) of
  +	    NewState = case transactionlayer:start_client_transaction(NewRequest, none, FirstDst,
  +								      NewBranch, Timeout, self()) of
   			   BranchPid when is_pid(BranchPid) ->
  -			       State#state{clienthandler=BranchPid, branch=NewBranch, dstlist=NewDstList};
  +			       State#state{clienttransaction_pid=BranchPid, branch=NewBranch, dstlist=NewDstList};
   			   {error, E} ->
   			       logger:log(error, "sippipe: Failed starting client transaction : ~p", [E]),
  -			       transactionlayer:send_response_handler(State#state.serverhandler, 500, "Server Internal Error"),
  -			       State
  +			       erlang:exit(failed_starting_client_transaction)
   		       end,
   	    NewState
  -    end.
  -
  -%%--------------------------------------------------------------------
  -%% Function: adopt_st_and_get_branch(TH)
  -%%           TH = term(), server transaction handle
  -%% Descrip.: Adopt a server transaction, and get it's branch.
  -%% Returns : Branch    |
  -%%           error     |
  -%%           cancelled
  -%%           Branch = string()
  -%%--------------------------------------------------------------------
  -adopt_st_and_get_branch(TH) ->
  -    case transactionlayer:adopt_server_transaction_handler(TH) of
  -	{error, cancelled} ->
  -	    logger:log(normal, "sippipe: Request has allready been cancelled, aborting."),
  -	    cancelled;
  -        {error, E} ->
  -            logger:log(error, "sippipe: Could not adopt server transaction handler ~p : ~p", [TH, E]),
  -	    error;
  -	_ ->
  -	    Branch = get_branch_from_handler(TH) ++ "-UAC",
  -	    Branch
  -    end.
  -
  -%% Part of adopt_st_and_get_branch(). Query a transaction handler for it's branch,
  -%% and remove the -UAS suffix in order to get the 'branch base'.
  -get_branch_from_handler(TH) ->
  -    CallBranch = transactionlayer:get_branch_from_handler(TH),
  -    case string:rstr(CallBranch, "-UAS") of
  -	0 ->
  -	    CallBranch;
  -	Index when is_integer(Index) ->
  -	    BranchBase = string:substr(CallBranch, 1, Index - 1),
  -	    BranchBase
       end.
   
   %%--------------------------------------------------------------------
  
positive.code: 	quit ->
  	    ok;
  	_ ->
  	    case all_terminated(State) of
  		true ->
  		    ok;
  		false ->
  		    loop(NewState)
  	    end
      end.
  
  %%--------------------------------------------------------------------
  
negative.code: %%%           get a final response from one or them, or have no
  %%%           destinations left to try.
  %%%
  %%% Note    : We should erlang:monitor() our client transactions to
  %%%           be alerted when they die.
  %%%
  %%% Created :  20 Feb 2004 by Fredrik Thulin <ft@it.su.se>
  %%--------------------------------------------------------------------
  -module(sippipe).
  