anchor.diff:                     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
   
  --record(state, {requests = [] :: [{reference(), #req_info{}}],            % Mapping from unique request id to state
  -                transactions = [] :: [{#sip_tx_client{}, reference()}]}). % Mapping transaction key to request id
  +%% 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()}.
  
positive.code:     {noreply, State2};
  
  handle_call({cancel, Ref}, _From, State) ->
      case lists:keyfind(Ref, 2, State#state.transactions) of
          {TxKey, Ref} ->
              case sip_transaction:cancel(TxKey) of
                  {ok, TxKey} ->
                      {reply, ok, State};
                  false ->
                      % transaction have completed already
                      % FIXME: We need to notify ourselves to terminate the session!
                      {reply, {error, not_found}, State}
              end;
          false ->
              {reply, {error, not_found}, State} % could be answered already
      end;
  
  handle_call(Request, _From, State) ->
      {stop, {unexpected, Request}, State}.
  
negative.code:     {ok, State2} = do_response(Response, TxKey, State),
      {noreply, State2};
  
  handle_info({tx, _TxKey, {terminated, _Reason}}, State) ->
      % Just ignore
      {noreply, State};
  handle_info(Info, State) ->
      {stop, {unexpected, Info}, State}.
  
  