You need to configure in freepbx inbound routing on the first 4 digits of caller ID.
For example call number 8921XXXXXXX (where the x’s are arbitrary numbers) - enter on turn 500
call number 8911XXXXXXX (where the x’s are arbitrary numbers) - enter IVR
Is it possible to implement?
FreePBX 13.0.48 (Distro - FreePBX-64bit-10.13.66.iso)