anchor.diff:      {ok, TxKey} = sip_transaction:start_client_tx(self(), Top, Request2),
   
       % Update ref to request info & txkey to ref mappings
  -    Requests = lists:keystore(Ref, 1, State#state.requests, {Ref, ReqInfo2}),
  -    Transactions = lists:keystore(TxKey, 1, State#state.transactions, {TxKey, Ref}),
  -    State2 = State#state{requests = Requests, transactions = Transactions},
  +    Requests = lists:keystore(Ref, 1, State#state.requests, {Ref, TxKey, ReqInfo2}),
  +    State2 = State#state{requests = Requests},
   
       % stop processing
       error_m:fail({processed, State2}).
  
positive.code:     {ok, State2}.
  
  do_response(#sip_response{status = Status} = Response, TxKey, State) ->
      {TxKey, Ref} = lists:keyfind(TxKey, 1, State#state.transactions),
      {Ref, ReqInfo} = lists:keyfind(Ref, 1, State#state.requests),
  
      Result = do([error_m ||
                   S1 <- validate_vias(Response, State),
                   handle_response(ReqInfo, Response, S1)]),
  
negative.code:                    request           :: #sip_request{},                            % SIP request message
                     destinations = [] :: [#sip_destination{}],                      % list of IP addresses to try next
                     target_set        :: sip_priority_set:priority_set(#sip_uri{}), % URI to visit next (redirects)
                     cancelled = false :: boolean(),                                 % If request was cancelled. If 2xx will arrive, send BYE immediately.
                     callback          :: callback()}).                              % Callback to invoke on responses
  
  %% Pending requests (that have not received final responses yet)
  %% First element is unique request id (that does not change accross retries),
  %% second element is current transaction that makes the request and third
  %% element is information about the request
  -record(state, {requests = [] :: [{reference(), #sip_tx_client{}, #req_info{}}]}).
  
  
  -type gen_from() :: {pid(), term()}.
  