anchor.diff:  		    logger:log(error, "sippipe: Failed resolving URI ~s : ~p", [sipurl:print(URI), Unknown]),
   		    resolve_if_necessary(T, ApproxMsgSize)
   	    end;
  -	InvalidURI ->
  -	    logger:log(error, "sippipe: Skipping destination with invalid URI : ~p", [InvalidURI]),
  +	false ->
  +	    logger:log(error, "sippipe: Skipping destination with invalid URI : ~p", [URI]),
   	    resolve_if_necessary(T, ApproxMsgSize)
       end;
  -resolve_if_necessary([Dst | T], _) when is_record(Dst, sipdst) ->
  -    [Dst | T];
  -resolve_if_necessary([Dst | T], AMS) ->
  -    logger:log(error, "sippipe: Skipping invalid destination : ~p", [Dst]),
  -    resolve_if_necessary(T, AMS);
  -resolve_if_necessary(Unknown, _) ->
  -    logger:log(error, "sippipe: Unrecognized destination input data : ~p", [Unknown]),
  -    [].
  -
  -%%--------------------------------------------------------------------
  -%% Function: all_terminated(State)
  -%% Descrip.: Check if both server transaction and client transaction
  -%%           are dead. If so, return 'true'.
  -%% Returns : true  |
  -%%           false
  -%%--------------------------------------------------------------------
  -all_terminated(State) when is_record(State, state) ->
  -    ServerAlive = transactionlayer:is_good_transaction(State#state.serverhandler),
  -    ClientAlive = client_transaction_alive(State),
  -    if
  -	ServerAlive == true -> false;
  -	ClientAlive == true -> false;
  -	true -> true
  -    end.
  -
  -%%--------------------------------------------------------------------
  -%% Function: client_transaction_alive(State)
  -%% Descrip.: Check if the client transaction is dead.
  -%% Returns : true  |
  -%%           false
  -%%--------------------------------------------------------------------
  -client_transaction_alive(State) when is_record(State, state) ->
  -    case util:safe_is_process_alive(State#state.clienthandler) of
  -	{true, _} -> true;
  -	_ -> false
  -    end.
  +resolve_if_necessary([Dst | T], _ApproxMsgSize) when is_record(Dst, sipdst) ->
  +    [Dst | T].
  +
  +%%--------------------------------------------------------------------
  +%% Function: cancel_transaction(State, Reason)
  +%%           State  = state record()
  +%%           Reason = string()
  +%% Descrip.: Our server transaction has been cancelled. Signal the
  +%%           client transaction. 
  +%% Returns : NewState = state record()
  +%%--------------------------------------------------------------------
  +cancel_transaction(#state{cancelled=false}=State, Reason) when is_list(Reason) ->
  +    logger:log(debug, "sippipe: Original request has been cancelled, asking current "
  +	       "client transaction handler (~p) to cancel, and answering "
  +	       "'487 Request Cancelled' to original request",
  +	       [State#state.clienttransaction_pid]),
  +    gen_server:cast(State#state.clienttransaction_pid, {cancel, Reason, []}),
  +    transactionlayer:send_response_handler(State#state.serverhandler, 487, "Request Cancelled"),
  +    State#state{cancelled=true};
  +cancel_transaction(#state{cancelled=true}=State, Reason) when is_list(Reason) ->
  +    %% already cancelled
  +    State.
   
   %%====================================================================
   %% Startup functions
  
positive.code: 	quit ->
  	    ok;
  	_ ->
  	    case all_terminated(State) of
  		true ->
  		    ok;
  		false ->
  		    loop(NewState)
  	    end
      end.
  
  %%--------------------------------------------------------------------
  
negative.code: %%           and then enter loop/1.
  %% Returns : Does not matter
  %%--------------------------------------------------------------------
  start(ServerHandler, ClientPid, RequestIn, DstIn, Timeout) when is_record(RequestIn, request) ->
      %% call check_proxy_request to get sanity of proxying this request verified (Max-Forwards checked etc)
      {ok, NewHeader1, ApproxMsgSize} = siprequest:check_proxy_request(RequestIn),
      Request1 = RequestIn#request{header=NewHeader1},
      %% now make sure we know some destinations of this request
      {ok, DstList, Request} = start_get_dstlist(ServerHandler, Request1, ApproxMsgSize, DstIn),
      %% Adopt server transaction and get it's branch. If ServerHandler is not a valid
      %% transaction handle, then try to figure the server transaction handler out using Request.
      case start_get_servertransaction(ServerHandler, Request) of
  	{ok, STHandler, Branch} ->
  	    guarded_start2(Branch, STHandler, ClientPid, Request, DstList, Timeout, ApproxMsgSize);
  	ok ->
  	    ok
      end.
  
  %%
  