I have two extensions that are having problems being direct dialed from an outside call. When someone calls into our facility the first thing they hear is the auto attendant. At that point they can dial any extension. When someone dials 22260 or 21202 more often than not the system sends them to the operator and not the extension. Internally it works with no issues.
Make sure DTMF logging is enabled for the console (/etc/asterisk/logger_logfiles_custom) and then keep an eye on the Asterisk CLI while the extension is entered. That will give you an idea of whether the DTMF is making it to you or not. If DTMF is the problem, try changing dtmfmode to inband instead of rfc2833 for your inbound calls.
Some logs would be helpful. If it is happening more often than not you should be able to see the calls failing.
We also need to know that version of FreePBX and Asterisk you are running as well as how you installed it (i.e. hand built or Distro.)
What sort of trunking are you using.