anchor.diff:  enumlookup(none) ->
       none;
   enumlookup("+" ++ Number) ->
  -    L1 = enumalldomains(Number, ["e164.arpa", "e164.sunet.se"]),
  -    L2 = chooseenum(L1, "SIP+E2U"),
  -    L3 = lists:sort(fun sortenum/2, L2),
  -    L4 = enumregexp(L3),
  -    applyregexp("+" ++ Number, L4);
  -enumlookup(Number) ->
  +    case sipserver:get_env(enum_domainlist, none) of
  +	none ->
  +	    logger:log(debug, "Resolver: Not performing ENUM lookup on ~p since enum_domainlist is empty", ["+" ++ Number]),
  +	    none;
  +	DomainList ->
  +	    logger:log(debug, "Resolver: ENUM query for ~p in ~p", ["+" ++ Number, DomainList]),
  +	    L1 = enumalldomains(Number, DomainList),
  +	    L2 = chooseenum(L1, "SIP+E2U"),
  +	    L3 = lists:sort(fun sortenum/2, L2),
  +	    L4 = enumregexp(L3),
  +	    applyregexp("+" ++ Number, L4)
  +    end;
  +enumlookup(Foo) ->
  +    logger:log(error, "Resolver: ENUM lookup on non-E.164 number (~p)", [Foo]),
       none.
   
   isnaptr(Entry) ->
  
positive.code: applyregexp(Number, []) ->
      none;
  applyregexp(Number, [Regexp | Rest]) ->
      logger:log(debug, "applyregexp: IN ~p ~p", [Number, Regexp]),
      Rewrite = case string:tokens(Regexp, "!") of
  		  [Lhs, Rhs] ->
  		      NLhs = fixplus(Lhs),
  		      Res = util:regexp_rewrite(Number, [{NLhs, Rhs}]),
  		      logger:log(debug, "applyregexp: OUT ~p", [Res]),
  		      Res;
  		  _ ->
  		      nomatch
  
negative.code: 	    {error, What}
      end.
  
  siplookup([]) ->
      none;
  siplookup(Domain) ->
      case regexp:first_match(Domain, "^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$") of
  	{match, _, _} ->
  