Dialplan Help Needed

I having been working of this for almost 2 weeks and really need help. Brand new to Asterisk, first time I have ever seen it.

I am trying to use Asterisk to simulate a Central Office, for training. Asterisk will not be in a production environment and will not be plugged into any Telco lines

Running Asterisk 1.6.0 with Dahdi 2.0.0

Hardware:
TE100P T1/E1 card
TDM400P with 2 FXS / 2 FXO modules ( I am not using the FXO’s)

Analog phone plugged into the first FXS port on the TDM400P (channel 25)
A RJ11 crossconnect cable running from the 2nd FXS port on the TDM400P to an FXO port on a Cisco

Router (channel 26)

T1 Crossover cable between the Asterisk T1 card and a PRI card on the Cisco Router

Asterisk is to simulate an offnet environment for the Cisco equipment

What I need is the following:

  1. When any number comes in, whether over the T1 or the FXO on the FXS port channel 26, I want Asterisk to ring the analog phone plugged in on the FXS port channel 25

  2. From the Asterisk phone, if any 7 digit number is dialed, such as 555-1212, I want Asterisk to send the call out the FXS port channel 26. This will come in on the FXO port on the Cisco router and look like a call coming in from the PSTN.

  3. From the Asterisk phone, if any 11 digit number is dialed, such as 1-222-555-1212 or 1-800-555-1212, I want Asterisk to send the call out the PRI using the top channel

Asterisk sees the hardware. When I run asterisk -vvvvvvvvgc , I can see the calls coming into Asterisk from the Cisco Router but Asterisk has no idea what to do with the call and , of course, I can’t call from the Asterisk analog phone.

I have no idea how to configure extensions.conf to accomplish what I need.

Here are my system.config and chan_dahdi.conf

system.conf

defaultzone=us
loadzone=us
echocanceller=mg2,1-23
echocanceller=mg2,25-26

span=1,0,0,esf,b8zs
bchan=1-23
dchan=24

fxols=25
fxols=26
fxsls=27
fxsls=28


chan_dahdi.conf

[trunkgroups]

[channels]
switchtype = 4ess
pridialplan=national
signalling = pri_net
echocancel=yes

group=1
signalling = pri_net
channel => 1-23
signalling=fxo_ls

group=2
channel=25
context=incoming
signalling=fxo_ls

group=3
channel=26
context=phones
signalling=fxs_ls

group=4
channel=27,28

Appreciate all help that I receive.