Try this if you wish to experiment...
Create a custom app with a span of internal and give it an extension expression to catch E-164 numbers... (or, alternatively use a prefix, like 9 or something)...
exten=>_(1-9)XXXXXXXXXX.,1,do-your-arpa-lookup
exten=>_(1-9)XXXXXXXXXX.,n,do-your-enum-sip-dial
exten=>_(1-9)XXXXXXXXXX.,n,Hangup
exten=>_(1-9)XXXXXXXXXX.,102,do-a-regular-dial (non E164!) - use dial (local/...) to send the call back into the standard SAIL routing stack
exten=>_(1-9)XXXXXXXXXX.,n,Hangup
Something like this. Now you can dial E164 format numbers and have your code do the enumlookup. You'll need to do the dial and post-dial-cleanup yourself but that's OK. Ordinary dials and failed lookups will proceed through the SAIL routing stack in the normal way.
We haven't done any of this but our best guess is that it should work OK.
Best
S