There's a simple way to add an extension to any of your contacts' phone numbers, so your iPhone automatically dials. This way, you'll never have to listen through the "If you know the extension of the party you're trying to reach, please enter it now" speech.
1. Click on the contact.
2. Click on Edit.
3. Press on the number. Then, press "+ * #" in the bottom left corner.
4. Press "pause", which inputs a comma. After the comma enter the extension.
this method is valid on other phones, used it on my old Motorola 8 years ago.