anchor.diff:  	    error
       end.
   
  +%% unused
   transaction_terminating(TransactionPid) ->
       gen_server:cast(transaction_layer, {unregister_pid, TransactionPid}),
       ok.
   
  +%%--------------------------------------------------------------------
  +%% Function: start_client_transaction(Request, SocketIn, Dst, Branch,
  +%%                                    Timeout, Parent)
  +%%           Request  = request record()
  +%%           SocketIn = sipsocket record(), XXX which socket is this?
  +%%           Dst      = sipdst record(), the destination for this
  +%%                      client transaction
  +%%           Branch   = string(), branch parameter to use
  +%%           Timeout  = integer(), how long to live (seconds)
  +%%           Parent   = pid(), who the client transaction should
  +%%                      report to
  +%% Descrip.: Start a new client transaction.
  +%% Returns : Pid        |
  +%%           {error, E}
  +%%           Pid = pid()
  +%%           E   = string()
  +%%--------------------------------------------------------------------
   start_client_transaction(Request, SocketIn, Dst, Branch, Timeout, Parent) ->
       %% XXX we probably want a shorter timeout on this, but since we send out the initial request
       %% in clienttransaction:init() it can take some time (if a TCP connection has to be established
  
positive.code:     logger:log(debug, "Transaction layer started"),
      {ok, #state{appmodule=AppModule, mode=Mode, tstatelist=TStateList}, ?TIMEOUT}.
  
  %%--------------------------------------------------------------------
  %% Function: handle_call/3
  %% Description: Handling call messages
  %% Returns: {reply, Reply, State}          |
  %%          {reply, Reply, State, Timeout} |
  %%          {noreply, State}               |
  %%          {noreply, State, Timeout}      |
  %%          {stop, Reason, Reply, State}   | (terminate/2 is called)
  %%          {stop, Reason, State}            (terminate/2 is called)
  %%--------------------------------------------------------------------
  
  
  %% A request has been received by the transaction layer and a SIP message handler is
  %% asking us of what to do with it. If we return {continue} the SIP message handler will
  %% terminate, but if we return {pass_to_core, Fun} the SIP message handler will pass the
  %% request on to that function.
  handle_call({sipmessage, Request, Origin, LogStr}, From, State) when record(Request, request), record(Origin, siporigin) ->
      AppModule = State#state.appmodule,
      case get_server_transaction_pid(Request, State#state.tstatelist) of
  
negative.code: 	    {reply, {continue}, State, ?TIMEOUT}
      end;
  
  %%--------------------------------------------------------------------
  %% Function: handle_call(Msg, From, State)
  %%           Msg     = {store_stateless_response_branch, Pid, Branch,
  %%                      Method}
  %%           Pid     = pid()
  %%           Branch  = string()
  %%           Method  = string()
  %% Descrip.: When sending out requests statelessly, the transport
  %%           layer (in our implementation) knows what server
  %%           transaction the request originally arrived on. To make it
  %%           possible to know exactly on which socket we should send
  %%           out any responses we receive to this stateless request
  %%           we must associate the branch we used in the request we
  %%           sent out, with the server transaction of the original
  %%           request.
  %% Returns : {reply, Reply, State, Timeout}
  %%           Reply     = {ok}               |
  %%                       {error, E}
  %%           E         = string(), description of error
  %%--------------------------------------------------------------------
  handle_call({store_stateless_response_branch, Pid, Branch, Method}, From, State) ->
      case transactionstatelist:get_server_transaction_using_stateless_response_branch(Branch, Method, State#state.tstatelist) of
  	none ->
  