anchor.diff:  
   %%--------------------------------------------------------------------
   %% Function: create_dialog_state_uas(Request, Response)
  +%%           create_dialog_state_uas(Request, ResponseToTag,
  +%%                                   ResponseContact)
   %%           Request  = request record()
   %%           Response = response record()
  +%%           ResponseToTag = string(), To-tag of server transcation
  +%%           ResponseContact = string(), Contact that will be used
   %% Descrip.: Call this when a local UAS prepares to answer a request
   %%           and thereby establishes a dialog, if you want a dialog
   %%           record() with all the information about the dialog filled
  
positive.code:     case ets:lookup(?ETS_DIALOG_TABLE, Id) of
  	[{Id, #dialog_attrs{pid = Pid}}] ->
  	    logger:log(debug, "Sipdialog: Extra debug: Found dialog controller ~p for dialog ~p",
  		       [Id, Pid]),
  	    {ok, Pid};
  	_ ->
  	    HalfId = Id#dialogid{remote_tag = undefined},
  
negative.code: %%           RFC3261 #12.1.1 (UAS behavior).
  %%--------------------------------------------------------------------
  create_dialog_state_uas(Request, Response) when is_record(Request, request), is_record(Response, response) ->
      [ResponseContact] = keylist:fetch('contact', Response#response.header),
      ResponseToTag =
  	case sipheader:get_tag(keylist:fetch('to', Response#response.header)) of
  	    none ->
  		throw({error, "No To: tag in response"});
  	    ToTag1 ->
  		ToTag1
  	end,
      create_dialog_state_uas(Request, ResponseToTag, ResponseContact).
  
  create_dialog_state_uas(Request, ResponseToTag, ResponseContact)
    when is_record(Request, request), is_list(ResponseToTag), is_list(ResponseContact) ->
      Header = Request#request.header,
  
      %% If the request arrived over TLS, and the Request-URI contained a SIPS
      %% URI, the "secure" flag is set to TRUE.
      Secure = create_dialog_state_uas_is_secure(Request, [ResponseContact]),
  
      %% The route set MUST be set to the list of URIs in the Record-Route
      %% header field from the request, taken in order and preserving all URI
  