The PABX configuration you describe would work fine. The key is that the gateway will need to see the Called number for each user so it can then send this information to OCS in the SIP Invite.
So the PABX should forward the call to the line(s) connected to the gateway.
The Called Party Number (destination number) must be the same as or associated with the line URI that you will configure in OCS for each user.
For example - if the PABX sends 5555 to the gateway then you can configure the gateway to modify this number to bring it up to a full E.164 number (eg +1-603-1234-5555) which is then sent to OCS. Or you can let the gateway pass the 5555 unchanged and configure Normalisation rules in OCS to take the 5555 and convert it to E.164 again.
So Bob would have a line URI of +1-603-1234-555, John would have +1-603-1234-5557 etc)
So each OCS user has a personal DDI.
Generally you can keep the same extension numbers, just use the PABX to forward calls to that number down to the gateway as described.