anchor.diff:      end.
   
   
  +
  +
   %% @priavte
   aor(#uri{scheme=Scheme, user=User, domain=Domain}) ->
       {Scheme, User, Domain}.
  
positive.code:         UriExp>Max -> Max;
          true -> UriExp
      end,
      Q = case nksip_lib:get_list(<<"q">>, Opts) of
          [] -> 
              1.0;
          Q0 ->
  
negative.code:         undefined ->
              Acc1;
          #reg_contact{next_tmp_pos=Next} ->
              ExtOpts2 = case 
                  InstId /= <<>> andalso RegId == <<>> andalso 
                  Expires>0 andalso GruuProc 
              of
                  {true, PubUri, TmpUri} ->
                      case Scheme of
                          sip -> ok;
                          _ -> throw({forbidden, "Invalid Contact"})
                      end,
                      PubUri1 = PubUri#uri{opts=[{<<"gr">>, InstId}]},
                      Pub = list_to_binary([$", nksip_unparse:ruri(PubUri1), $"]),
                      GOpts1 = nksip_lib:store_value(<<"pub-gruu">>, Pub, ExtOpts1),
                      TmpBin = term_to_binary({aor(To), InstId, Next}),
                      TmpGr = encrypt(TmpBin),
                      TmpUri1 = TmpUri#uri{user=TmpGr, opts=[<<"gr">>]},
                      Tmp = list_to_binary([$", nksip_unparse:ruri(TmpUri1), $"]),
                      nksip_lib:store_value(<<"temp-gruu">>, Tmp, GOpts1);
                  false ->
                      ExtOpts1
              end,
              RegContact = Base#reg_contact{
                  index = Index,
                  contact = Contact#uri{ext_opts=ExtOpts2},
                  updated = LongNow,
                  expire = Now + Expires, 
                  q = Q,
  