Create the line extensions and place them on the phones through Admin and make sure they are set to ring.
Then you have to configure the router using dial-peers:
(Example)
voice-port 2/0
connection plar 3001 (extension #)
station-id name Seattle
station-id number 3001
!
voice-port 2/1
connection plar 3001
station-id name Seattle
station-id number 3001
!
dial-peer cor custom
!
dial-peer voice 302020 pots
incoming called-number 3001
port 2/0
!
dial-peer voice 302021 pots
incoming called-number 3001
port 2/1
!
!
dial-peer voice 6007120 pots
destination-pattern 9.T
port 2/0
!
dial-peer voice 6007121 pots
destination-pattern 9.T
port 2/1
!
dial-peer voice 911120 pots
destination-pattern 9911
port 2/0
prefix 911
!
dial-peer voice 911121 pots
destination-pattern 9911
port 2/1
prefix 911
!
dial-peer voice 9911120 pots
destination-pattern 99911
port 2/0
prefix 9911
!
dial-peer voice 9911121 pots
destination-pattern 99911
port 2/1
prefix 9911
!
dial-peer voice 2319 voip
preference 1
incoming called-number .
destination-pattern [0-8]...
voice-class codec 1
voice-class h323 1
session target ipv4

ip address of Sub)
dtmf-relay h245-alphanumeric
ip qos dscp cs5 media
no vad
!
dial-peer voice 2317 voip
preference 3
incoming called-number .
destination-pattern [0-8]...
voice-class codec 1
voice-class h323 1
session target ipv4

ip address of gateway)
dtmf-relay h245-alphanumeric
ip qos dscp cs5 media
no vad
!
dial-peer voice 2318 voip
preference 2
incoming called-number .
destination-pattern [0-8]...
voice-class codec 1
voice-class h323 1
session target ipv4

ip address of Pub)
dtmf-relay h245-alphanumeric
ip qos dscp cs5 media
no vad
!
Hope this helps.