You will make a routing table, specifying the number of digits the telco is sending, the actual digits they are sending, the number of digits to delete, and the digits to add.
For instance, I have a site with 2-digit extension numbers, the Receptionist is Ext. 10. The main number is (XXX) XXX-4700. When the number was ported to the PRI, the telco is sending the last 4 digits. So entry 0 expects 4 digits, matches 4700, deletes 4 digits, and adds the digits 10. This routes the call to Ext. 10.
Do a print of your PRI information, post it here, and some information on the number you are receiving and the extension you want to send it to.