In the office, we have a CUCME ver 4.1 connected to a PBX Panasonic 1232 using E1 cards, we use a Router 2851 between PBX and PSTN.
Extension numbers begin with 16.. and 17.., but when I dial a phone number i.e. 1673-1478, CUCME take the first 4 digits of the number, re-routing call to the extension 1673, no to the phone number.
Dial-peers in configuration are
dial-peer voice 3 pots
description EXT PANASONIC
dial-peer voice 4 pots
dial-peer voice 20 pots
corlist outgoing CoS-loc
dial-peer voice 1 pots
paramspace callsetup after-hours-exempt TRUE
incoming called-number .T
yes you have to change the dial plan but the dialplan was not good to begin with since you have overlapping between DN and outside numbers.
The only way I see is to add that extra digit to distinguish between calls inside your company and calls to outside numbers.