Usually you add a pause character to the phone number entry, between the main number and the extension. Some phones might show it as a "p" or a ";", and are entered by holding down on * or #. The idea is once the network connects to the main number and it's answered by the PBX, the phone then dials the extension.