anchor.diff:  
   update_regcontacts([], _Req, _Times, _Path, _ObProc, _GruuProc, Acc) ->
       lists:reverse(lists:keysort(#reg_contact.updated, Acc)).
  +
  +
  +%% @private
  +update_checks(Contact, Req) ->
  +    #uri{scheme=Scheme, user=User, domain=Domain, opts=Opts} = Contact,
  +    #sipmsg{to=To} = Req,
  +    case Domain of
  +        <<"*">> -> throw(invalid_request);
  +        _ -> ok
  +    end,
  +    case aor(To) of
  +        {Scheme, User, Domain} -> throw({forbidden, "Invalid Contact"});
  +        _ -> ok
  +    end,
  +    case lists:member(<<"gr">>, Opts) of
  +        true ->
  +            case catch decrypt(User) of
  +                LoopTmp when is_binary(LoopTmp) ->
  +                    {{LScheme, LUser, LDomain}, _, _} = binary_to_term(LoopTmp),
  +                    case aor(To) of
  +                        {LScheme, LUser, LDomain} -> 
  +                            throw({forbidden, "Invalid Contact"});
  +                        _ -> 
  +                            ok
  +                    end;
  +                _ ->
  +                    ok
  +            end;
  +        false ->
  +            ok
  +    end.
   
   
   %% @private
  
positive.code:     [reg_contact()].
  
  update_regcontacts([Contact|Rest], Req, Times, Path, ObProc, GruuProc, Acc) ->
      #uri{scheme=Scheme, user=User, domain=Domain, ext_opts=Opts} = Contact,
      #sipmsg{to=To, call_id=CallId, cseq=CSeq, transport=Transp} = Req,
      {Min, Max, Default, Now, LongNow} = Times,
      case Domain of
          <<"*">> -> throw(invalid_request);
          _ -> ok
      end,
      UriExp = case nksip_lib:get_list(<<"expires">>, Opts) of
          [] ->
              Default;
          Exp1List ->
  
negative.code:     end.
  
  
  
  
  %% @priavte
  aor(#uri{scheme=Scheme, user=User, domain=Domain}) ->
      {Scheme, User, Domain}.
  