anchor.diff:  %% Descrip.: Start the processing, currently forking (in parallell or
   %%           sequentially) of Request according to Actions.
   %% Returns : ok              |
  -						%            {error, Reason}
  +%%           {error, Reason}
   %%           Reason = string()
   %% Note    : Actions is a set of actions to perform. Currently
   %%           supported actions are a list of 'call' and 'wait'. You
   %%           can mix calls and waits freely.
   %%--------------------------------------------------------------------
  -start(BranchBase, Parent, Request, Actions, Timeout) when is_record(Request, request) ->
  +start(BranchBase, Parent, Request, Actions, Timeout)
  +  when is_list(BranchBase), is_pid(Parent), is_record(Request, request), is_list(Actions), is_integer(Timeout) ->
  +    %% We need to trap exits so that we can handle client transcations failing, and
  +    %% cancel all client transactions if the parent crashes.
  +    process_flag(trap_exit, true),
       Res = case catch siprequest:check_proxy_request(Request) of
   	      {ok, NewHeader, ApproxMsgSize} ->
   		  %% sipproxy should never be invoked on a request that contains
   		  %% a Route header, but we check just in case someone screws up.
   		  case keylist:fetch('route', Request#request.header) of
   		      [] ->
  -			  State = #state{parent=Parent, branchbase=BranchBase, request=Request#request{header=NewHeader}, 
  -					 actions=Actions, timeout=Timeout, targets=targetlist:empty(),
  -					 mystate=calling, approx_msgsize=ApproxMsgSize,
  -					 endtime=util:timestamp() + Timeout, final_response_sent=false},
  -			  fork(State),
  +			  EndTime = util:timestamp() + Timeout,
  +			  State = #state{parent=Parent, branchbase=BranchBase, timeout=Timeout,
  +					 request=Request#request{header=NewHeader},
  +					 actions=Actions, targets=targetlist:empty(),
  +					 approx_msgsize=ApproxMsgSize},
  +			  fork(EndTime, State),
   			  ok;
   		      _ ->
   			  logger:log(error, "sipproxy: Can't fork request with Route header"),
   			  InternalError = {500, "Server Internal Error"},
  -			  util:safe_signal("sipproxy :", Parent, {sipproxy_all_terminated, self(), InternalError}),
  +			  Parent ! {sipproxy_all_terminated, self(), InternalError},
   			  {error, "Request with Route header could not be forked"}
   		  end;
   	      {siperror, Status, Reason} ->
  
positive.code: %% External exports
  %%--------------------------------------------------------------------
  -export([
  	 start/5
  	]).
  
  %%--------------------------------------------------------------------
  
negative.code: %%%
  %%%           sipproxy is what is called a proxy core in the
  %%%           introduction of #16.2.
  %%%
  %%%           The process invoking sipproxy:start_link() should be
  %%%           prepared to receive the following signals :
  %%%
  %%%           {sipproxy_response, Pid, Branch, Response}
  %%%           {sipproxy_all_terminated, Pid, FinalResponse}
  %%%           {sipproxy_terminating, Pid}
  %%%
  %%%              Response = response record()
  %%%              FinalResponse = Response | {Status, Reason}
  %%%              Pid      = pid() of sipproxy process
  %%%              Branch   = string(), the branch used by the client
  %%%                         transaction that received/generated a
  %%%                         response
  %%%              Status   = integer(), SIP status code
  %%%              Reason   = string(), SIP reason phrase
  %%%
  %%%           If you want to terminate a running sipproxy (for example
  %%%           if the server transaction has been cancelled), send it
  %%%           an {cancel_pending} signal.
  %%%
  %%% Created : 13 Feb 2003 by Magnus Ahltorp <ahltorp@nada.kth.se>
  %%%-------------------------------------------------------------------
  -module(sipproxy).
  