Asterisk directory can it return a value?

Ok here is what i am trying to do…

a caller calls in hits a menu… and then dials an extension number…

caller then enters first 3 letters of the extension users last name…

is there a way to call on the directory not as an app but as a function?
so i can test the caller’s entry against a name in the directory belonging to the extension number that they entered?

I dont like the fact that in true directory a caller can fish for names and have them read back to them…

this is in a hotel environment where we use it as security measure to make sure the caller knows which guest matches the room and cannot fish for names or just dial rooms arbitrarily…

I couldnt find anything that allows me to access the directory as a function only to send a caller there and then the full name is read back to them which I dont want to happen…

any ideas?
-Christopher