Yes this is quite easy to setup via the incoming call rules and if you have several DDIs from a single VOIP provider trunk you just need to configure this in 3CX so it knows to which extension these should be delivered.
Have all calls go to a dummy extension before defaulting to a ring group or DR. An extension, in Version 8 , has options to route/reject calls based on caller ID.