anchor.diff:  %%           "Digest username=\"test\",realm=\"example.org\" ...",
   %%           a SIP message can have multiple of those header values
   %%           in it. This function only handles one at a time.
  +%% XXX We should preserve the type in the repsonse as well. Define a
  +%% new record for parsed authentication data and use that.
   %%--------------------------------------------------------------------
   auth(In) when is_list(In) ->
       %% lowercase first word (to implement case insensitivity)
  
positive.code: %% Returns : Branch = string() | none
  %%--------------------------------------------------------------------
  get_via_branch(TopVia) when is_record(TopVia, via) ->
      Branch = get_via_branch_full(TopVia),
      remove_loop_cookie(Branch).
  
  
negative.code: 
  
  %% start of quoted uri
  comma(Parsed, [$< | Rest], _InQuote = false, false) ->
      comma([$< | Parsed], Rest, false, true);
  
  %% end of quoted uri
  comma(Parsed, [$> | Rest], _InQuote = false, true) ->
      comma([$> | Parsed], Rest, false, false);
  
  %% inside quoted uri - ignore comma or any other special chars
  comma(Parsed, [Char | Rest], _InQuote = false, true) ->
      comma([Char | Parsed], Rest, false, true);
  
  %% -------------
  
  %% an escape code e.g. "\," has been found, don't treat it in any special manner
  %% only done inside a quoted segment of the string
  comma(Parsed, [$\\, Char | Rest], _InQuote = true, false) ->
      comma([Char, $\\ | Parsed], Rest, true, false);
  
  %% Inquote = false, we have now entered inside a quoted ("...") string segment
  comma(Parsed, [$\" | Rest], _InQuote = false, false) ->
      comma([$\" | Parsed], Rest, true, false);
  
  %% Inquote = true and a new quote (") found - end of quoted string segment
  comma(Parsed, [$\" | Rest], _InQuote = true, false) ->
      comma([$\" | Parsed], Rest, false, false);
  
  %% regular char, store in current string
  comma(Parsed, [Char | Rest], _InQuote = true, false) ->
      comma([Char | Parsed], Rest, true, false);
  
  %% -------------
  
  %% Inquote = false, so comma is a comma that splits string
  %% start looking for the next one
  comma(Parsed, [$, | Rest], _InQuote = false, false) ->
      [lists:reverse(string:strip(Parsed, both)) | comma([], Rest, false, false)];
  
  %% regular char, store in current string
  comma(Parsed, [Char | Rest], _InQuote = false, false) ->
      comma([Char | Parsed], Rest, false, false);
  
  %% end of string, clean up last comma separated entry (it's an error
  %% if Inquote or InUriQuote = true, the quotes are then unbalanced)
  comma(Parsed, [], _InQuote = false, false) ->
      [lists:reverse(string:strip(Parsed, both))].
  
  %%--------------------------------------------------------------------
  