anchor.diff:  	 %% dialog record users helper functions
   	 create_dialog_state_uac/2,
   	 create_dialog_state_uas/2,
  +	 create_dialog_state_uas/3,
   
   	 update_dialog_recv_request/2,
   
  
positive.code: 
  %%--------------------------------------------------------------------
  %% Function: create_dialog_state_uas(Request, Response)
  %%           Request  = request record()
  %%           Response = response record()
  %% 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
  
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
  