To be able to dial ext by dialing external number followed by Extension

We Have 2 freepbx VMs.
PIAF VM 1 - Handles calls for extensions 2XX,4XX and 33XX. Main number calls get pointed to VM 1. VM 1 has 2XX, 4XX and 33XX extensions.
PIAF VM 2 - It has 3XX extensions. IAX2 trunk to VM - so from 3XX I can dial 2XX fine and from 2XX I can dial 3XX fine.
External callers are calling our main number which gets terminated to PIAF VM1. When they dial our main number (e.g. - 1234567890) when IVR plays they press 3XX extension, it says we did not receive a vaild reponse" that means it does not understand 3XX which is in PIAF VM 2. When they press 33XX and 2XX it transfer calls fine.
What do I need to make it work so that external caller can dial 3xx after main number?
Please help!!!

I strongly suggest using the PBX In A Flash forums for this; they make significant modifications to the FreePBX code and it is not supported here for that reason. That doesn’t mean nobody will try to help you, or that you won’t get a solution here, just that the members of this board may not be aware of any of the changes that PIAF has made to the code and help you get may/may not work.

Your IVR should direct 3xx to the IAX2 trunk, though, not an extension (I think).