Assume Asterisk, and freepbx.
Write an asterisk script that does the following:
Incoming calls goes to new script:
"If you know your 8 digit (numeric) account, enter it now.
If you don't know it, press # to continue"
If user enters 8 digit code in N seconds, confirm it. If not, or they hit # transfer call into queue, but substitute the Caller ID with the user-entered account number in the caller ID