here is the configuration:
telephony-service
ip source x.x.x.x(any active interface loopback is recommended)
max-ephone x(maximum number of phones)
max-dn x(maximum number of extensions it could be bigger than ephones)
create cnf
!! this configuration is for simple CME
ephone-dn 1 dual-line
number 1000 (extension number)
ephone 1
mac xxxx.xxxx.xxxx(mac address of the phone)
button 1:1(associate first button with ephone-dn 1)
button 2:1(associate button 2 with ephone-dn 1)
type 7940
just configure all the phones like this example or you can make it automatically.
for FXO ports
if you want the call to go directly to one extension
voice-port x/x/x
connection plar opx 1000
to make a call
dial-peer voice 1 pots
destination-pattern 911
forward-digit all
port x/x/x
if you want more information i will be with.